diff options
author | Ted Gould <ted@canonical.com> | 2009-01-30 12:21:13 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-01-30 12:21:13 -0600 |
commit | 02384bcdef0d2de9bd96fa60a5cfb6bdd0cba8da (patch) | |
tree | b216032465c68030152feaf38e96929de2e3991d | |
parent | 77684366fce43fd4f99cfc8ce4262479d43d9e0a (diff) | |
download | ayatana-indicator-messages-02384bcdef0d2de9bd96fa60a5cfb6bdd0cba8da.tar.gz ayatana-indicator-messages-02384bcdef0d2de9bd96fa60a5cfb6bdd0cba8da.tar.bz2 ayatana-indicator-messages-02384bcdef0d2de9bd96fa60a5cfb6bdd0cba8da.zip |
Adding in an activate callback
-rw-r--r-- | src/im-menu-item.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c index e34df4b..7ffa4bb 100644 --- a/src/im-menu-item.c +++ b/src/im-menu-item.c @@ -171,6 +171,14 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat return; } +void +activate_cb (ImMenuItem * self, gpointer data) +{ + ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self); + + indicate_listener_display(priv->listener, priv->server, priv->indicator); +} + ImMenuItem * im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator) { @@ -191,5 +199,7 @@ im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server, indicate_listener_get_property(listener, server, indicator, "icon", icon_cb, self); g_debug(" ...icon"); + g_signal_connect(G_OBJECT(self), "activate", G_CALLBACK(activate_cb), NULL); + return self; } |