diff options
author | Guillaume Laurent <glaurent@src.gnome.org> | 1998-11-07 00:33:22 +0000 |
---|---|---|
committer | Guillaume Laurent <glaurent@src.gnome.org> | 1998-11-07 00:33:22 +0000 |
commit | 75fff482b91691ca465d8f343ce018955fb212fe (patch) | |
tree | 889e1a7fab04b36c01b91ec31055031955df04f3 /gtk/gtkitemfactory.c | |
parent | b0f8915fe79a62bd12b02e74ca2ffee9555a94b5 (diff) | |
download | gdk-pixbuf-75fff482b91691ca465d8f343ce018955fb212fe.tar.gz |
Added warning about callback on <Branch> items
Diffstat (limited to 'gtk/gtkitemfactory.c')
-rw-r--r-- | gtk/gtkitemfactory.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index 7f9b6a5cf..8639cb46a 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1087,6 +1087,10 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, { GtkAccelGroup *menu_group; + if (entry->callback) + g_warning ("gtk_item_factory_create_item(): Can't specify a callback on a branch: \"%s\"", + entry->path); + menu_group = gtk_accel_group_new (); if (type_id == quark_type_last_branch) @@ -1103,7 +1107,9 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory, gtk_item_factory_add_item (ifactory, path, entry->accelerator, - entry->callback, entry->callback_action, callback_data, + (type_id == quark_type_branch || + type_id == quark_type_last_branch) ? NULL : entry->callback, + entry->callback_action, callback_data, callback_type, item_type_path, widget); |