On 08/13/2010 07:56 AM, dhk wrote: > The GtkWidget key-press-event signal doesn't seem to be filling in the > name of the widget. When I print the name in the debugger it's 0x0. > > I haven't run the program in a couple of months, but the last time I did > everything worked. Since then I've been keeping up on the upgrades > (using Gentoo Linux with an amd64 processor). > > The program uses GtkBuilder. There is an xml file with a treeview which > has a key-press-event signal. When the event occurs the callback is > called and the parameters look right, but the name of the widget is 0x0. > Is this a bug from a recent release? See below. > > Breakpoint 2, rxTvKeyPressEventCb (treeview=0x8f6120, event=0x945ca0, > user_data=0x0) at possubs.c:1886 > 1886 gboolean add_row=FALSE; > (gdb) p *treeview > $27 = {object = {parent_instance = {g_type_instance = {g_class = > 0x6d1520}, ref_count = 9, qdata = 0x988b20}, flags = 2166720}, > private_flags = 1536, state = 0 '\000', saved_state = 0 '\000', name = > 0x0, style = 0x930070, requisition = {width = 707, height = 191}, > allocation = {x = 7, y = 81, width = 768, height = 258}, window = > 0x8c5a30, parent = 0x8c4350} > (gdb) p *event > $28 = {type = GDK_KEY_PRESS, window = 0x696c10, send_event = 0 '\000', > time = 4862537, state = 16, keyval = 65289, length = 0, > string = 0x9960b0 "", hardware_keycode = 23, group = 0 '\000', > is_modifier = 0} > (gdb) > > Thanks, > > dhk > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list >
One more thing. I get my widgets as follows and all the name's are 0x0. if(!gtk_builder_add_from_file(builder, filename, &error)) { g_warning("Couldn't load builder file: %s", error->message); g_error_free(error); } gtk_builder_connect_signals(builder, NULL); w=GTK_WIDGET(gtk_builder_get_object(builder, "rxNb")); All w->name's are 0x0. This never use to be the case. So this seems to be the root of the problem. Is this a bug in Gtk Builder? Thanks, dhk _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list