Hi, Attached is a patch against the 0.5.9 tar ball which adds gtk_window_activate_default and gtk_widget_grab_focus to the list of standard GTK functions which can be used as signal handlers. Both are used by specifying the object to act on. I've found that I use these two functions so often for routine dialog navigation that it's so useful if glade can set them up. Less coding for me so less mistakes :-). Hope you find this useful. Cheers, Matt. -- Matt Goodall, Software Engineer | Isotek Electronics Ltd mailto:[EMAIL PROTECTED] | Claro House, Servia Road http://www.isotek.co.uk | Leeds, LS7 1NL Tel: +44 113 234320 | England
diff -r -c ../glade-0.5.9-orig/glade/gbsource.c ./glade/gbsource.c *** ../glade-0.5.9-orig/glade/gbsource.c Thu Mar 23 19:36:10 2000 --- ./glade/gbsource.c Wed Jun 28 10:47:56 2000 *************** *** 499,507 **** signal->data, handler); /* We don't need to output code for standard GTK functions. */ ! if (!strcmp (handler, "gtk_widget_show") || !strcmp (handler, "gtk_widget_hide") || !strcmp (handler, "gtk_widget_destroy") || !strcmp (handler, "gtk_true") || !strcmp (handler, "gtk_false") || !strcmp (handler, "gtk_main_quit")) --- 499,510 ---- signal->data, handler); /* We don't need to output code for standard GTK functions. */ ! if ( ! !strcmp (handler, "gtk_window_activate_default") ! || !strcmp (handler, "gtk_widget_show") || !strcmp (handler, "gtk_widget_hide") || !strcmp (handler, "gtk_widget_destroy") + || !strcmp (handler, "gtk_widget_grab_focus") || !strcmp (handler, "gtk_true") || !strcmp (handler, "gtk_false") || !strcmp (handler, "gtk_main_quit")) diff -r -c ../glade-0.5.9-orig/glade/property.c ./glade/property.c *** ../glade-0.5.9-orig/glade/property.c Wed Mar 8 12:15:47 2000 --- ./glade/property.c Wed Jun 28 10:48:00 2000 *************** *** 1371,1379 **** --- 1371,1381 ---- /* FIXME: These are copied in gbsource.c, and should be language-specific, i.e. we may need to change them when the project option changes. */ + handler_list = g_list_append (handler_list, "gtk_window_activate_default"); handler_list = g_list_append (handler_list, "gtk_widget_show"); handler_list = g_list_append (handler_list, "gtk_widget_hide"); handler_list = g_list_append (handler_list, "gtk_widget_destroy"); + handler_list = g_list_append (handler_list, "gtk_widget_grab_focus"); handler_list = g_list_append (handler_list, "gtk_true"); handler_list = g_list_append (handler_list, "gtk_false"); handler_list = g_list_append (handler_list, "gtk_main_quit"); Only in .: patch