diff options
author | Cody Russell <crussell@canonical.com> | 2010-02-12 15:38:02 -0600 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-02-12 15:38:02 -0600 |
commit | 1c7a301a115fd4b333fea061c48fa6065316cd80 (patch) | |
tree | 82eb9b41ee9414a9bb900713cc3a61f3a1a9b50e /example | |
parent | 02b61440e93c17963c76f1423b29fd83e7cea78a (diff) | |
download | ayatana-indicator-application-1c7a301a115fd4b333fea061c48fa6065316cd80.tar.gz ayatana-indicator-application-1c7a301a115fd4b333fea061c48fa6065316cd80.tar.bz2 ayatana-indicator-application-1c7a301a115fd4b333fea061c48fa6065316cd80.zip |
Just to be safe, let's connect these at the end.
Diffstat (limited to 'example')
-rw-r--r-- | example/simple-client.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/example/simple-client.c b/example/simple-client.c index 997a446..ee7bad2 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -69,10 +69,17 @@ image_clicked_cb (GtkWidget *widget, gpointer data) } static void +item_clicked_2_cb (GtkWidget *widget, GtkWidget *old) +{ + gtk_widget_set_sensitive (old, FALSE); +} + +static void append_submenu (GtkWidget *item) { GtkWidget *menu; GtkWidget *mi; + GtkWidget *prev_mi; menu = gtk_menu_new (); @@ -81,10 +88,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 (item_clicked_2_cb), prev_mi); mi = gtk_menu_item_new_with_label ("Sub 3"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); |