summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-06-21 16:19:59 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-06-21 16:19:59 +0000
commit2a98bc6a31dd136058f9068435227cf10713e0ff (patch)
tree53bf4b442175fd18d6be6599dcdf2bf96fd769a4 /tests
parent8a01e98fdf760692c1c90dc0192388a09cb09eb2 (diff)
downloadgtk+-2a98bc6a31dd136058f9068435227cf10713e0ff.tar.gz
Remove use of libunicode in favor of new GLib functions.
Wed Jun 21 11:41:43 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c gtk/gtkimcontextsimple.c gtk/gtklabel.c gtk/gtktexttypes.c gtk/testtext.c modules/linux-fb/basic.c: Remove use of libunicode in favor of new GLib functions. * gtk/gtkcolorsel.c: Remove conditional includes for FB, win32, nano-x, framebuffer. The X11 include is just a hack until we get the necessary functions in gdkcolor.h, so there is no reason to add other includes of platforms. * gtk/gtkwindow.c (gtk_window_compute_default_size): Revert window bigger than the screen change. * gtk/testgtk.c: Revert some random changes from Elliot that had no particular point and were causing testgtkrc not to function correctly. * gdk/gdkregion-generic.h: Revert change from Elliot. Just because GdkSegment and GdkRegionBox have the same fields, it doesn't mean that 'typedef GdkSegment GdkRegionBox' results in clearer code. * gdk/x11/gdkinput-x11.c (gdk_input_common_select_events, gdk_input_translate_coordinates): Fix missed GdkObjectification
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c7
-rw-r--r--tests/testtext.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index accc42d7cf..04e6c0822a 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -8510,7 +8510,7 @@ do_exit (GtkWidget *widget, GtkWidget *window)
gtk_main_quit ();
}
-GtkWidget *
+void
create_main_window (void)
{
struct {
@@ -8627,7 +8627,6 @@ create_main_window (void)
for (i = 0; i < nbuttons; i++)
{
button = gtk_button_new_with_label (buttons[i].label);
- gtk_widget_set_name(button, buttons[i].label);
if (buttons[i].func)
gtk_signal_connect (GTK_OBJECT (button),
"clicked",
@@ -8654,8 +8653,6 @@ create_main_window (void)
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
-
- return window;
}
int
@@ -8685,7 +8682,9 @@ main (int argc, char *argv[])
"debug_msg",
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
+
create_main_window ();
+
gtk_main ();
return 0;
diff --git a/tests/testtext.c b/tests/testtext.c
index 3393596cdf..fad48f0399 100644
--- a/tests/testtext.c
+++ b/tests/testtext.c
@@ -3,7 +3,6 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <unicode.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
@@ -608,7 +607,6 @@ fill_file_buffer (GtkTextBuffer *buffer, const char *filename)
{
gint count;
char *leftover, *next;
- unicode_char_t wc;
int to_read = 2047 - remaining;
count = fread (buf + remaining, 1, to_read, f);
@@ -621,7 +619,7 @@ fill_file_buffer (GtkTextBuffer *buffer, const char *filename)
if (!*leftover)
break;
- next = unicode_get_utf8 (next, &wc);
+ next = g_utf8_next_char (next);
}
gtk_text_buffer_insert (buffer, &iter, buf, leftover - buf);