aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-06-27 04:09:40 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-06-27 04:09:40 +0100
commit10f1e36dafac3c1491ef2c8ed6cd1bc93449c75d (patch)
tree11241a811781f45617fcef9a006b4838d04f2e45
parent09c4a9167b0bd484367ff98e8e58dd68fb5b51c1 (diff)
downloadayatana-indicator-power-10f1e36dafac3c1491ef2c8ed6cd1bc93449c75d.tar.gz
ayatana-indicator-power-10f1e36dafac3c1491ef2c8ed6cd1bc93449c75d.tar.bz2
ayatana-indicator-power-10f1e36dafac3c1491ef2c8ed6cd1bc93449c75d.zip
power-service: Add an item to the menu
-rw-r--r--src/power-service.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/power-service.c b/src/power-service.c
index 7d8e514..e3bbc32 100644
--- a/src/power-service.c
+++ b/src/power-service.c
@@ -44,6 +44,8 @@ static DbusmenuMenuitem *root_menuitem = NULL;
/*TODO Do we need this?*/
/*static PowerServiceDbus *dbus_interface = NULL;*/
+/* Global Items */
+static DbusmenuMenuitem *settings = NULL;
/* Repsonds to the service object saying it's time to shutdown.
It stops the mainloop. */
@@ -60,6 +62,20 @@ static void
build_menus (gpointer data)
{
/*TODO*/
+
+ settings = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set (settings,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Power Settings..."));
+ /* insensitive until we check for available apps */
+/*
+ dbusmenu_menuitem_property_set_bool (settings, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
+ g_signal_connect (G_OBJECT (settings),
+ DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
+ G_CALLBACK (activate_cb),
+ "indicator-power-preferences");
+*/
+ dbusmenu_menuitem_child_append (root_menuitem, settings);
}
gint