Re: Gtk::GladeXML Bug?
- From: Paolo Molaro <lupus ximian com>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk::GladeXML Bug?
- Date: Mon, 19 Feb 2001 16:01:06 +0100
On 02/14/01 Gregory S Hayes wrote:
I am using Gtk::GladeXML to manipulate a glade file I have generated for
my program. In this glade file I have an about box that is displayed via
a menu selection. When this selection happens the first time the dialog
is displayed correctly. However, if closed and reselected from the menu
the dialog appears in a tiny unresizeable window. So tiny in fact that
none of the wm decorations, much less the ok button, are visible. The
follow is printed to STDOUT:
Gtk-CRITICAL **: file gtkstyle.c: line 522 (gtk_style_attach): assertion
`style != NULL' failed.
Gtk-CRITICAL **: file gtkstyle.c: line 1128 (gtk_style_set_background):
assertion `style != NULL' failed.
Gtk-CRITICAL **: file gtkstyle.c: line 3532 (gtk_paint_flat_box):
assertion `style != NULL' failed.
Gtk-CRITICAL **: file gtkcontainer.c: line 739
(gtk_container_dequeue_resize_handler): assertion
`GTK_CONTAINER_RESIZE_PENDING (container)' failed.
Ok, there is a bug in your code and a (mis)feature of Gnome::About
(that derives from Gnome::Dialog). First the bug:
a signal handler for "delete_event" should return TRUE (1) if
you don't want the related window to be destroyed, so make sure
you return 1 from your gtk_widget_hide callback.
When the ok button in Gnome::About is clicked, the dialog
is destroyed, so next time you try to show() it you get warnings.
A workaround is to call the Gnome::Dialog method that makes the
dialog hide instead of destroying it:
$about = $g->get_widget('about1');
$about->close_hides;
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]