[PATCH] GtkItemFactory : warn about callbacks on <Branch>es
- From: Guillaume Laurent <glaurent worldnet fr>
- To: gtk-devel-list redhat com
- Subject: [PATCH] GtkItemFactory : warn about callbacks on <Branch>es
- Date: 18 Oct 1998 12:44:38 +0200
The patch below adds a warning in GtkItemFactory when a callback is
specified on a <Branch> element. Otherwise, the corresponding element
created is a GtkMenu, which has no "activate" signal (hence a warning
when trying to connect it in gtk_item_factory_add_item() (current CVS
version of testgtk shows this problem).
--- gtkitemfactory.c.org Sun Oct 18 12:32:04 1998
+++ gtkitemfactory.c Sun Oct 18 12:35:22 1998
@@ -1087,6 +1087,12 @@
{
GtkAccelGroup *menu_group;
+ if(entry->callback) {
+ g_warning ("GtkItemFactory: Can't specify a callback on a branch");
+ entry->callback = NULL;
+ }
+
+
menu_group = gtk_accel_group_new ();
if (type_id == quark_type_last_branch)
--
Guillaume.
http://www.worldnet.fr/~glaurent
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]