aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-10 17:02:43 -0500
committerTed Gould <ted@canonical.com>2009-06-10 17:02:43 -0500
commit257c07fe3c71a19a116a5d9f64e6ffb4e3f9fb0d (patch)
tree1f2b193b93f8743bc2d8f5c13c4313742ae84664
parentbf4f01129a8fcec1b0dc800036ee3990436644bc (diff)
downloadayatana-indicator-session-257c07fe3c71a19a116a5d9f64e6ffb4e3f9fb0d.tar.gz
ayatana-indicator-session-257c07fe3c71a19a116a5d9f64e6ffb4e3f9fb0d.tar.bz2
ayatana-indicator-session-257c07fe3c71a19a116a5d9f64e6ffb4e3f9fb0d.zip
Connecting in a callback.
-rw-r--r--src/status-service.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/status-service.c b/src/status-service.c
index 1615985..840e164 100644
--- a/src/status-service.c
+++ b/src/status-service.c
@@ -38,7 +38,14 @@ static const gchar * status_icons[STATUS_SERVICE_STATUS_LAST] = {
static DbusmenuMenuitem * root_menuitem = NULL;
static GMainLoop * mainloop = NULL;
-gboolean
+static void
+menu_click (DbusmenuMenuitem * mi, gpointer data)
+{
+ StatusServiceStatus stat = (StatusServiceStatus)GPOINTER_TO_INT(data);
+
+}
+
+static gboolean
build_menu (gpointer data)
{
DbusmenuMenuitem * root = DBUSMENU_MENUITEM(data);
@@ -50,6 +57,7 @@ build_menu (gpointer data)
dbusmenu_menuitem_property_set(mi, "label", _(status_strings[i]));
dbusmenu_menuitem_property_set(mi, "icon", status_icons[i]);
+ g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, 0, GINT_TO_POINTER(i));
dbusmenu_menuitem_child_append(root, mi);