Menu Item problem
- From: "kartikay malhotra" <kartikay malhotra gmail com>
- To: gtk-list gnome org
- Subject: Menu Item problem
- Date: Tue, 29 Jan 2008 17:53:19 +0530
Dear All,
I am back. This time I have a different problem. How do I disable a menu item from a pop-up menu?
When I create a menu, I use :
.
.
.
child = gtk_menu_item_new_with_label("XXX");
gtk_menu_insert(submenu, child, 1);
g_signal_connect(G_OBJECT(child), "activate", GTK_SIGNAL_FUNC(
menu_callback), (gpointer)child);
menuAction = gtk_action_new("MenuAction", NULL, NULL, NULL);
gtk_action_connect_proxy(menuAction, child);
gtk_action_set_sensitive(GTK_ACTION(menuAction), FALSE);
I get a warning, Gtk-CRITICAL **: gtk_label_set_label: assertion `str != NULL' failed. However, the item gets disconnected (means it turns gray, non-selectable).
But when I use the same in
menu_callback, no change occurs. What to do?
1. Do I use some other signal, instead of
activate?
Many Thanks
--
Best Regards
Er. Kartikay Malhotra
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]