diff options
author | Cody Russell <crussell@canonical.com> | 2009-12-07 13:31:36 -0600 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2009-12-07 13:31:36 -0600 |
commit | 95ecb480de8da2e06b07be2313537093bb47069a (patch) | |
tree | 90ac61e11c32c5ed8ff18ab4cce195744053d436 /src/libappindicator | |
parent | fe16a243e5f101635bc3ec89d1cbfe0edd4e49ad (diff) | |
download | libayatana-appindicator-95ecb480de8da2e06b07be2313537093bb47069a.tar.gz libayatana-appindicator-95ecb480de8da2e06b07be2313537093bb47069a.tar.bz2 libayatana-appindicator-95ecb480de8da2e06b07be2313537093bb47069a.zip |
Add 'activate' signal support
Diffstat (limited to 'src/libappindicator')
-rw-r--r-- | src/libappindicator/app-indicator.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index f61723d..bd72499 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -633,6 +633,14 @@ app_indicator_set_icon (AppIndicator *self, const gchar *icon_name) } static void +activate_menuitem (DbusmenuMenuitem *mi, gpointer user_data) +{ + GtkWidget *widget = (GtkWidget *)user_data; + + gtk_menu_item_activate (GTK_MENU_ITEM (widget)); +} + +static void container_iterate (GtkWidget *widget, gpointer data) { @@ -643,6 +651,9 @@ container_iterate (GtkWidget *widget, dbusmenu_menuitem_property_set (child, DBUSMENU_MENUITEM_PROP_LABEL, gtk_menu_item_get_label (GTK_MENU_ITEM (widget))); + g_signal_connect (G_OBJECT(child), + DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (activate_menuitem), widget); dbusmenu_menuitem_child_append (root, child); } |