Glade MenuBars cause errors



I'm trying to use Gtk2::GladeXML and perl Gtk2 to build an app that
(among other things) contains a toolbox with a menubar.  I tore my hair
out over it all day yesterday and find the same problem recurs today:
If I include a menubar, even if I define all the callbacks, I get a
whole raft of errors as soon as I make the

        my $glade =  Gtk2::GladeXML->new("knitit.glade");

The errors look like this:

Initializing glade ...
(knitit.pl:3999): Gnome-CRITICAL **: file gnome-program.c: line 739
(gnome_program_get_app_id): assertion `program != NULL' failed
GLib-CRITICAL **: file gstring.c: line 552 (g_string_prepend): assertion
`val != NULL' failed at knitit.pl line 54.

(knitit.pl:3999): Gnome-CRITICAL **: file gnome-program.c: line 739
(gnome_program_get_app_id): assertion `program != NULL' failed

(knitit.pl:3999): GConf-CRITICAL **: file gconf-client.c: line 547
(gconf_client_add_dir): assertion `gconf_valid_key (dirname, NULL)'
failed

(knitit.pl:3999): Gnome-CRITICAL **: file gnome-program.c: line 870
(gnome_program_locate_file): assertion `program != NULL' failed

(knitit.pl:3999): Gnome-CRITICAL **: file gnome-program.c: line 870
(gnome_program_locate_file): assertion `program != NULL' failed

(knitit.pl:3999): Gnome-CRITICAL **: file gnome-program.c: line 739
(gnome_program_get_app_id): assertion `program != NULL' failed
GLib-CRITICAL **: file gstring.c: line 552 (g_string_prepend): assertion
`val != NULL' failed at knitit.pl line 54.
Gtk-CRITICAL **: file gtkaccelmap.c: line 157 (gtk_accel_map_add_entry):
assertion `_gtk_accel_path_is_valid (accel_path)' failed at knitit.pl
line 54.
Gtk-CRITICAL **: file gtkwidget.c: line 3232
(gtk_widget_set_accel_path): assertion `_gtk_accel_path_is_valid
(accel_path)' failed at knitit.pl line 54.

 ... repeat ad lib

The number of repetitions of the "accel_path" errors seems related to
the number of entries in the menu.  So far I've just been using the
default glade menu, with File, Edit, View, and Help top level entries; 
File, for example, contains New, Open, Save, Save As, a separator, and
Quit; and I've provided the appropriate callbacks for each of these.

The example program (fileman.glade) in the source works fine, with no
errors, and I can't see what I'm doing (or not doing) differently, but
my code just generates oodles of errors as above whenever I add the menu
bar.  I have also noticed that the number of error messages is directly
related to the amount of stuff in the menus (when I stripped it down to
contain only File/Quit, I got far fewer messages).  

The weird thing is that the resultant code seems to run, and the
standard menu accelerators are there, and work.  Alt-F/Q actually quits,
just as it should.  Yes, I do have callbacks for all the menu entries.

What am I missing?

Thanks,
-- 
Jeff





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]