summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--ChangeLog.pre-2-015
-rw-r--r--ChangeLog.pre-2-1015
-rw-r--r--ChangeLog.pre-2-215
-rw-r--r--ChangeLog.pre-2-415
-rw-r--r--ChangeLog.pre-2-615
-rw-r--r--ChangeLog.pre-2-815
-rw-r--r--Makefile.am2
-rw-r--r--configure.in15
-rw-r--r--gtk/Makefile.am13
-rw-r--r--gtk/gtkbutton.c2
-rw-r--r--gtk/gtkcolorsel.c4
-rw-r--r--gtk/gtkdnd.c2
-rw-r--r--gtk/gtklabel.c4
-rw-r--r--gtk/gtkplug.c8
-rw-r--r--gtk/gtkrange.c16
-rw-r--r--gtk/gtkselection.c6
-rw-r--r--gtk/gtksocket.c10
-rw-r--r--gtk/gtkstyle.c6
-rw-r--r--gtk/gtkwindow.c5
-rw-r--r--gtk/testgtk.c9
-rw-r--r--tests/testgtk.c9
22 files changed, 174 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index cb3c157082..eaaadd5c58 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,18 @@
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
diff --git a/Makefile.am b/Makefile.am
index c27fb1f355..641ccd0869 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for GTK+
-SRC_SUBDIRS = gdk gtk
+SRC_SUBDIRS = gdk modules gtk
SUBDIRS = po $(SRC_SUBDIRS) docs
bin_SCRIPTS = gtk-config
diff --git a/configure.in b/configure.in
index 28eaea121f..c99eeb8f25 100644
--- a/configure.in
+++ b/configure.in
@@ -513,9 +513,15 @@ AC_PATH_PROG(PANGO_CONFIG, pango-config, no)
if test x$PANGO_CONFIG = xno ; then
AC_MSG_ERROR([*** pango-config not found])
fi
-PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
+
+if test "x$gdktarget" = "xx11"; then
+ PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
+ PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
+else
+ PANGO_CFLAGS="`$PANGO_CONFIG --cflags pango`"
+ PANGO_LIBS="`$PANGO_CONFIG --libs pango`"
+fi
CFLAGS="$CFLAGS $PANGO_CFLAGS"
-PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
AC_SUBST(PANGO_LIBS)
AC_SUBST(PANGO_CFLAGS)
@@ -707,7 +713,8 @@ elif test "x$gdktarget" = "xnanox" ; then
#define GDK_WINDOWING_NANOX'
elif test "x$gdktarget" = "xlinux-fb" ; then
gdk_windowing='
-#define GDK_WINDOWING_FB'
+#define GDK_WINDOWING_FB
+#define GDK_NATIVE_WINDOW_POINTER'
fi
if test x$gdk_wchar_h = xyes; then
@@ -744,4 +751,6 @@ gdk/linux-fb/Makefile
gtk/Makefile
gtk/gtkfeatures.h
gtk/gtkcompat.h
+modules/Makefile
+modules/linux-fb/Makefile
], [chmod +x gtk-config])
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index a564e53091..ec19afdbf9 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -7,9 +7,9 @@ INCLUDES = @STRIP_BEGIN@ \
-DGTK_DATA_PREFIX=\"$(prefix)\" \
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
-DGTK_LOCALEDIR=\"$(gtklocaledir)\" \
+ -DTESTGTK_RCFILE=\"`pwd`/$(srcdir)/testgtkrc\" \
-I$(top_srcdir) -I../gdk \
-I$(top_srcdir)/gdk \
- -I$(top_srcdir)/gdk/x11 \
@GTK_DEBUG_FLAGS@ \
@GTK_XIM_FLAGS@ \
@GTK_LOCALE_FLAGS@ \
@@ -35,6 +35,7 @@ LDFLAGS = @STRIP_BEGIN@ \
@more_libs@ \
-lm \
@STRIP_END@
+
# $(top_builddir)/gdk/libgdk.la
@@ -516,12 +517,12 @@ uninstall-local:
# test programs, not to be installed
#
noinst_PROGRAMS = testgtk testcalendar testinput testselection testrgb testdnd testtext simple testtextbuffer # testthreads
-DEPS = libgtk-x11.la $(top_builddir)/gdk/libgdk-x11.la
+DEPS = @gtktargetlib@ $(top_builddir)/gdk/@gdktargetlib@
LDADDS = @STRIP_BEGIN@ \
- libgtk-x11.la \
- $(top_builddir)/gdk/libgdk-x11.la \
- @x_ldflags@ \
- @x_libs@ \
+ @gtktargetlib@ \
+ $(top_builddir)/gdk/@gdktargetlib@ \
+ @more_ldflags@ \
+ @more_libs@ \
@GDK_WLIBS@ \
@PANGO_LIBS@ \
@GLIB_LIBS@ \
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 3f0e4ff620..2c9113aed7 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -595,7 +595,7 @@ gtk_button_paint (GtkWidget *widget,
y -= 1;
width += 2;
height += 2;
-
+
gtk_paint_focus (widget->style, widget->window,
area, widget, "button",
x, y, width - 1, height - 1);
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index d292106bfa..c43c18438c 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -33,6 +33,8 @@
#include "win32/gdkwin32.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkprivate-fb.h"
#endif
#include "gdk/gdkkeysyms.h"
#include "gtkcolorsel.h"
@@ -581,7 +583,7 @@ palette_paint (GtkWidget *drawing_area,
gc = drawing_area->style->black_gc;
else
gc = drawing_area->style->white_gc;
-
+
gdk_draw_rectangle (drawing_area->window,
gc, FALSE, 0, 0,
drawing_area->allocation.width - 1,
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index e00fa7d59f..5de66cfa2f 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -30,6 +30,8 @@
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined(GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
#endif
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 92357439db..823dcb4970 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -622,8 +622,8 @@ gtk_label_expose (GtkWidget *widget,
gdk_draw_layout (widget->window, widget->style->fg_gc [widget->state], x, y, label->layout);
- gdk_gc_set_clip_mask (widget->style->white_gc, NULL);
- gdk_gc_set_clip_mask (widget->style->fg_gc[widget->state], NULL);
+ gdk_gc_set_clip_rectangle (widget->style->white_gc, NULL);
+ gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], NULL);
}
return TRUE;
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 3329218f6e..ae6397e51a 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -26,6 +26,7 @@
*/
#include "gdkconfig.h"
+#include "gdkprivate.h"
#if defined (GDK_WINDOWING_X11)
#include "x11/gdkx.h"
@@ -33,6 +34,8 @@
#include "win32/gdkwin32.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#endif
#include "gdk/gdkkeysyms.h"
@@ -53,7 +56,6 @@ static void gtk_plug_set_focus (GtkWindow *window,
/* From Tk */
#define EMBEDDED_APP_WANTS_FOCUS NotifyNormal+20
-
static GtkWindowClass *parent_class = NULL;
@@ -115,7 +117,7 @@ gtk_plug_init (GtkPlug *plug)
}
void
-gtk_plug_construct (GtkPlug *plug, guint32 socket_id)
+gtk_plug_construct (GtkPlug *plug, GdkNativeWindow socket_id)
{
plug->socket_window = gdk_window_lookup (socket_id);
plug->same_app = TRUE;
@@ -128,7 +130,7 @@ gtk_plug_construct (GtkPlug *plug, guint32 socket_id)
}
GtkWidget*
-gtk_plug_new (guint32 socket_id)
+gtk_plug_new (GdkNativeWindow socket_id)
{
GtkPlug *plug;
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 92f49210c4..42a59fe160 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -29,7 +29,6 @@
#include "gtkrange.h"
#include "gtksignal.h"
-
#define SCROLL_TIMER_LENGTH 20
#define SCROLL_INITIAL_DELAY 100
#define SCROLL_DELAY_LENGTH 300
@@ -988,8 +987,6 @@ gtk_range_motion_notify (GtkWidget *widget,
GdkEventMotion *event)
{
GtkRange *range;
- GdkModifierType mods;
- gint x, y, mask;
g_return_val_if_fail (GTK_IS_RANGE (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -998,13 +995,14 @@ gtk_range_motion_notify (GtkWidget *widget,
if (range->click_child == RANGE_CLASS (range)->slider)
{
- x = event->x;
- y = event->y;
+ GdkModifierType mods;
+ gint x, y, mask, x2, y2;
- if (event->is_hint || (event->window != range->slider))
- gdk_window_get_pointer (range->slider, &x, &y, &mods);
- else
- mods = event->state;
+ gdk_window_get_pointer (range->trough, &x, &y, &mods);
+ gdk_window_get_position (range->slider, &x2, &y2);
+
+ x -= x2;
+ y -= y2;
switch (range->button)
{
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index c443282e90..ea0abcf32d 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -844,9 +844,13 @@ gtk_selection_request (GtkWidget *widget,
/* Create GdkWindow structure for the requestor */
+#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11)
info->requestor = gdk_window_lookup (event->requestor);
if (!info->requestor)
info->requestor = gdk_window_foreign_new (event->requestor);
+#else
+ info->requestor = NULL;
+#endif
/* Determine conversions we need to perform */
@@ -1293,8 +1297,10 @@ gtk_selection_property_notify (GtkWidget *widget,
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
+#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11)
if ((event->state != GDK_PROPERTY_NEW_VALUE) || /* property was deleted */
(event->atom != gdk_selection_property)) /* not the right property */
+#endif
return FALSE;
#ifdef DEBUG_SELECTION
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 860e06817f..28ffe4dce5 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -31,6 +31,8 @@
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined(GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#endif
#include "gdk/gdkkeysyms.h"
@@ -145,7 +147,7 @@ gtk_socket_new (void)
}
void
-gtk_socket_steal (GtkSocket *socket, guint32 id)
+gtk_socket_steal (GtkSocket *socket, GdkNativeWindow id)
{
GtkWidget *widget;
@@ -543,7 +545,7 @@ gtk_socket_send_configure_event (GtkSocket *socket)
}
static void
-gtk_socket_add_window (GtkSocket *socket, guint32 xid)
+gtk_socket_add_window (GtkSocket *socket, GdkNativeWindow xid)
{
socket->plug_window = gdk_window_lookup (xid);
socket->same_app = TRUE;
@@ -757,7 +759,7 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
return return_val;
}
-#elif defined (GDK_WINDOWING_WIN32)
+#else
GtkType
gtk_socket_get_type (void)
@@ -774,7 +776,7 @@ gtk_socket_new ()
}
void
-gtk_socket_steal (GtkSocket *socket, guint32 id)
+gtk_socket_steal (GtkSocket *socket, GdkNativeWindow id)
{
g_error ("GtkSocket not implemented");
}
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 84cc604310..d2fb0f7150 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -404,20 +404,18 @@ gtk_style_new (void)
style = g_new0 (GtkStyle, 1);
style->font_desc = pango_font_description_from_string ("Sans 10");
-
+
if (!default_font)
{
default_font = gdk_font_from_description (style->font_desc);
if (!default_font)
- default_font = gdk_font_load ("fixed");
- if (!default_font)
g_error ("Unable to load default font.");
}
style->font = default_font;
gdk_font_ref (style->font);
-
+
style->ref_count = 1;
style->attach_count = 0;
style->colormap = NULL;
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1be60d5b03..11a0d83cff 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -33,6 +33,8 @@
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
#endif
@@ -1826,6 +1828,9 @@ gtk_window_compute_default_size (GtkWindow *window,
*width = info->width > 0 ? info->width : *width;
*height = info->height > 0 ? info->height : *height;
}
+
+ *width = MIN(*width, gdk_screen_width());
+ *height = MIN(*width, gdk_screen_height());
}
/* Constrain a window size to obey the hints passed in geometry
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index 6a2303ce68..accc42d7cf 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -5886,7 +5886,7 @@ create_text (void)
gtk_text_freeze (GTK_TEXT (text));
- font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
+ font = NULL;
for (i=0; i<ntext_colors; i++)
{
@@ -8510,7 +8510,7 @@ do_exit (GtkWidget *widget, GtkWidget *window)
gtk_main_quit ();
}
-void
+GtkWidget *
create_main_window (void)
{
struct {
@@ -8627,6 +8627,7 @@ 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",
@@ -8653,6 +8654,8 @@ create_main_window (void)
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
+
+ return window;
}
int
@@ -8682,9 +8685,7 @@ 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/testgtk.c b/tests/testgtk.c
index 6a2303ce68..accc42d7cf 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5886,7 +5886,7 @@ create_text (void)
gtk_text_freeze (GTK_TEXT (text));
- font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
+ font = NULL;
for (i=0; i<ntext_colors; i++)
{
@@ -8510,7 +8510,7 @@ do_exit (GtkWidget *widget, GtkWidget *window)
gtk_main_quit ();
}
-void
+GtkWidget *
create_main_window (void)
{
struct {
@@ -8627,6 +8627,7 @@ 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",
@@ -8653,6 +8654,8 @@ create_main_window (void)
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
+
+ return window;
}
int
@@ -8682,9 +8685,7 @@ main (int argc, char *argv[])
"debug_msg",
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
-
create_main_window ();
-
gtk_main ();
return 0;