diff options
author | Ted Gould <ted@gould.cx> | 2010-02-12 16:10:26 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-12 16:10:26 -0600 |
commit | 2cc377b1d730787d4d1ae15ebeaf8563f264813f (patch) | |
tree | 0dbb535c56f69d8c0efdfbd8a6d9da53d705455b /example/simple-client.c | |
parent | 350a70175f0165a6e160f13619bdcf79bb2ee99c (diff) | |
parent | 84137b6a811bda3e3e9c0457fba32fc7294d45d6 (diff) | |
download | libayatana-appindicator-2cc377b1d730787d4d1ae15ebeaf8563f264813f.tar.gz libayatana-appindicator-2cc377b1d730787d4d1ae15ebeaf8563f264813f.tar.bz2 libayatana-appindicator-2cc377b1d730787d4d1ae15ebeaf8563f264813f.zip |
Fixing visibility changes and when menuitems get added and deleted.
Diffstat (limited to 'example/simple-client.c')
-rw-r--r-- | example/simple-client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/example/simple-client.c b/example/simple-client.c index 997a446..a698b48 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -57,7 +57,6 @@ toggle_sensitivity_cb (GtkWidget *widget, gpointer data) { GtkWidget *target = (GtkWidget *)data; - gtk_menu_item_set_label (GTK_MENU_ITEM (target), "modified!!"); gtk_widget_set_sensitive (target, !GTK_WIDGET_IS_SENSITIVE (target)); } @@ -73,6 +72,7 @@ append_submenu (GtkWidget *item) { GtkWidget *menu; GtkWidget *mi; + GtkWidget *prev_mi; menu = gtk_menu_new (); @@ -81,10 +81,11 @@ append_submenu (GtkWidget *item) g_signal_connect (mi, "activate", G_CALLBACK (item_clicked_cb), "Sub 1"); + prev_mi = mi; mi = gtk_menu_item_new_with_label ("Sub 2"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); g_signal_connect (mi, "activate", - G_CALLBACK (item_clicked_cb), "Sub 2"); + G_CALLBACK (toggle_sensitivity_cb), prev_mi); mi = gtk_menu_item_new_with_label ("Sub 3"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); |