]> Pileus Git - ~andy/gtk/commitdiff
(follow-on from previous commit)
authorElliot Lee <sopwith@redhat.com>
Tue, 20 Jun 2000 20:22:05 +0000 (20:22 +0000)
committerElliot Lee <sopwith@src.gnome.org>
Tue, 20 Jun 2000 20:22:05 +0000 (20:22 +0000)
(follow-on from previous commit)
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.

22 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
configure.in
gtk/Makefile.am
gtk/gtkbutton.c
gtk/gtkcolorsel.c
gtk/gtkdnd.c
gtk/gtklabel.c
gtk/gtkplug.c
gtk/gtkrange.c
gtk/gtkselection.c
gtk/gtksocket.c
gtk/gtkstyle.c
gtk/gtkwindow.c
gtk/testgtk.c
tests/testgtk.c

index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
--- 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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index cb3c1570827312b5ab6776cccbb208662195c835..eaaadd5c588f590e17079b107c7997d2b3f74588 100644 (file)
@@ -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
index c27fb1f35516ecd3b1cfcee32068104df3e869e2..641ccd0869588c41859badbe5caff99ac9be5621 100644 (file)
@@ -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
index 28eaea121f89c1e06531b3362e7bebe206c5b883..c99eeb8f252c6a5b82c80257f8eb71c628d2df62 100644 (file)
@@ -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])
index a564e530914ba8157895092bee0c56719de6988b..ec19afdbf9b47d2fa09258046f255209b6245e06 100644 (file)
@@ -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@                     \
index 3f0e4ff6204bf12844dbc478776b96a5fe3333a2..2c9113aed7ce60d0d0980696b56a386431a12215 100644 (file)
@@ -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);
index d292106bfac552b9f269b0a2aed4b75f584d81be..c43c18438c897f751c33599cea89efcf495b8dc2 100644 (file)
@@ -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,
index e00fa7d59f10fdf6a69bfb42f66ec74dad3e28e0..5de66cfa2f2917d9611e3891efd2e7a63e34a15d 100644 (file)
@@ -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
index 92357439dbf2794bf3bc55f440eac59959b617b6..823dcb49702817cc8baf06b833e480040a387b89 100644 (file)
@@ -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;
index 3329218f6ebcf8cd28b7e74cbc14160b2beed756..ae6397e51aed1a6b4c80149424753084bf17bd36 100644 (file)
@@ -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;
 
index 92f49210c469ba2b0ac92808376b1e8706e79668..42a59fe160a8ba90f18a1f07f95ec859316a8a7c 100644 (file)
@@ -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)
        {
index c443282e90fdaa726399c3e403109a30304df8d5..ea0abcf32da048e590cbcf612fce3affe0732573 100644 (file)
@@ -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
index 860e06817fb870d42b7dad87a8d34c29f824b9fd..28ffe4dce587cf3d56fa999aaa011846054ed157 100644 (file)
@@ -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");
 }
index 84cc6043102c6a7d1aab77e24fb6640d2888b36e..d2fb0f7150da115b4d8bc4a09d154d0ad20a440a 100644 (file)
@@ -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;
index 1be60d5b03f6f95eb190e1fcc1234afc5961038d..11a0d83cff42064a1df9d1d851178cf5c7513e11 100644 (file)
@@ -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
index 6a2303ce68bad2b4841578e3c9a8f6db3b3866d0..accc42d7cfcedb47da4ee497766066d21c6dc090 100644 (file)
@@ -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;
index 6a2303ce68bad2b4841578e3c9a8f6db3b3866d0..accc42d7cfcedb47da4ee497766066d21c6dc090 100644 (file)
@@ -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;