aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-09-04 10:32:43 -0500
committerTed Gould <ted@gould.cx>2013-09-04 10:32:43 -0500
commit5ec494416be68f1231331a68b80cac1087c04ba0 (patch)
tree45dc33460ae77c3bcb44240fd3d491253e193737
parent627005e7c04157b25f016f9fdafa5293c7aceb9d (diff)
downloadayatana-indicator-power-5ec494416be68f1231331a68b80cac1087c04ba0.tar.gz
ayatana-indicator-power-5ec494416be68f1231331a68b80cac1087c04ba0.tar.bz2
ayatana-indicator-power-5ec494416be68f1231331a68b80cac1087c04ba0.zip
Adding a phone settings action
-rw-r--r--src/service.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c
index 1976332..b4f05ea 100644
--- a/src/service.c
+++ b/src/service.c
@@ -22,6 +22,7 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <url-dispatcher.h>
#include "device.h"
#include "device-provider.h"
@@ -532,7 +533,7 @@ create_phone_settings_section (IndicatorPowerService * self G_GNUC_UNUSED)
update_brightness_action_state (self);
g_object_unref (item);
- g_menu_append (section, _("Battery settingsā€¦"), "indicator.activate-settings");
+ g_menu_append (section, _("Battery settingsā€¦"), "indicator.activate-phone-settings");
return G_MENU_MODEL (section);
}
@@ -685,8 +686,6 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
- /* FIXME: unity8 settings */
-
execute_command ("gnome-control-center power");
}
@@ -698,6 +697,14 @@ on_statistics_activated (GSimpleAction * a G_GNUC_UNUSED,
execute_command ("gnome-power-statistics");
}
+static void
+on_phone_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
+ GVariant * param G_GNUC_UNUSED,
+ gpointer gself G_GNUC_UNUSED)
+{
+ url_dispatch_send("settings://system/battery", NULL, NULL);
+}
+
/***
****
***/
@@ -739,6 +746,7 @@ init_gactions (IndicatorPowerService * self)
GActionEntry entries[] = {
{ "activate-settings", on_settings_activated },
+ { "activate-phone-settings", on_phone_settings_activated },
{ "activate-statistics", on_statistics_activated }
};