From 4b27302d7f9d0bb000090e16e1a2f04f8316eb84 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 29 Aug 2013 16:26:13 -0500 Subject: Fix dependendencies to include url-dispatcher and allow system-settings --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fc1c924..b5cd919 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 9), libgtest-dev, libglib2.0-dev (>= 2.36), libgudev-1.0-dev, + liburl-dispatcher1-dev, python, Standards-Version: 3.9.2 Homepage: https://launchpad.net/indicator-power @@ -23,7 +24,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, upower, - gnome-control-center (>= 3.1), + gnome-control-center (>= 3.1) | ubuntu-system-settings, Recommends: indicator-applet (>= 0.2) | indicator-renderer, Description: Indicator showing power state. This indicator displays current power management information and gives -- cgit v1.2.3 From 0f4852ebe00b8381d0c6ffbb4509873f4282ff15 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 29 Aug 2013 16:26:41 -0500 Subject: Adding build items on url dispatcher --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ba39dec..ca7e793 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,8 @@ GUDEV_REQUIRED_VERSION=204 PKG_CHECK_MODULES([SERVICE_DEPS],[glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION - gudev-1.0 >= $GUDEV_REQUIRED_VERSION]) + gudev-1.0 >= $GUDEV_REQUIRED_VERSION + url-dispatcher-1]) ########################### # GSETTINGS -- cgit v1.2.3 From 2dc4a6eac35392b8bc8428198b33759e19d57640 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 29 Aug 2013 16:27:16 -0500 Subject: Add a new action for phone settings and call the dispatcher --- src/service.c | 14 +++++++++++--- 1 file 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 #include +#include #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 } }; -- cgit v1.2.3