James Henstridge <[EMAIL PROTECTED]> writes:
> Currently libglade does not support the default width/height tags in glade
> files. I will be releasing a new version of libglade soon, which should
> do this.
I have 2 patches for libglade.
- the EXIT-alias for GNOME_STOCK_xxxx_QUIT is inserted at the wrong
position so its not found by binary search (glade-gnome.c)
- the GTK_CAN_FOCUS flag must be explicitly unset when its not set in
the glade XML file (glade-xml.c)
And one question:
Why isn't the refcount for gtk wigdets incremented when they are put
into the hash table? get_widget() returns an invalid memory block
after a destroy when no other code was referencing the widget.
ciao
Andreas
Index: glade-gnome.c
===================================================================
RCS file: /cvs/gnome/libglade/glade/glade-gnome.c,v
retrieving revision 1.23
diff -u -r1.23 glade-gnome.c
--- glade-gnome.c 1999/11/01 02:28:56 1.23
+++ glade-gnome.c 1999/11/10 09:15:05
@@ -669,6 +669,7 @@
{ "DISABLED", GNOME_STOCK_PIXMAP_DISABLED },
{ "DOWN", GNOME_STOCK_PIXMAP_DOWN },
{ "EXEC", GNOME_STOCK_PIXMAP_EXEC },
+ { "EXIT", GNOME_STOCK_PIXMAP_QUIT },
{ "FIRST", GNOME_STOCK_PIXMAP_FIRST },
{ "FOCUSED", GNOME_STOCK_PIXMAP_FOCUSED },
{ "FONT", GNOME_STOCK_PIXMAP_FONT },
@@ -698,7 +699,6 @@
{ "PRINT", GNOME_STOCK_PIXMAP_PRINT },
{ "PROPERTIES", GNOME_STOCK_PIXMAP_PROPERTIES },
{ "QUIT", GNOME_STOCK_PIXMAP_QUIT },
- { "EXIT", GNOME_STOCK_PIXMAP_QUIT },
{ "REDO", GNOME_STOCK_PIXMAP_REDO },
{ "REFRESH", GNOME_STOCK_PIXMAP_REFRESH },
{ "REGULAR", GNOME_STOCK_PIXMAP_REGULAR },
@@ -753,6 +753,7 @@
{ "CUT", GNOME_STOCK_MENU_CUT },
{ "DOWN", GNOME_STOCK_MENU_DOWN },
{ "EXEC", GNOME_STOCK_MENU_EXEC },
+ { "EXIT", GNOME_STOCK_MENU_QUIT },
{ "FIRST", GNOME_STOCK_MENU_FIRST },
{ "FONT", GNOME_STOCK_MENU_FONT },
{ "FORWARD", GNOME_STOCK_MENU_FORWARD },
@@ -778,7 +779,6 @@
{ "PRINT", GNOME_STOCK_MENU_PRINT },
{ "PROP", GNOME_STOCK_MENU_PROP },
{ "QUIT", GNOME_STOCK_MENU_QUIT },
- { "EXIT", GNOME_STOCK_MENU_QUIT },
{ "REDO", GNOME_STOCK_MENU_REDO },
{ "REFRESH", GNOME_STOCK_MENU_REFRESH },
{ "REVERT", GNOME_STOCK_MENU_REVERT },
Index: glade-xml.c
===================================================================
RCS file: /cvs/gnome/libglade/glade/glade-xml.c,v
retrieving revision 1.32
diff -u -r1.32 glade-xml.c
--- glade-xml.c 1999/10/28 16:12:38 1.32
+++ glade-xml.c 1999/11/10 09:15:06
@@ -1042,6 +1042,8 @@
GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_DEFAULT);
if (info->can_focus)
GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
+ else
+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
if (info->has_default)
self->priv->default_widget = widget;
if (info->has_focus)
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]