diff options
-rw-r--r-- | debian/changelog | 32 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | src/device.c | 2 | ||||
-rw-r--r-- | src/service.c | 24 |
4 files changed, 57 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index ff1261a..1c40b83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,35 @@ +indicator-power (12.10.6+14.04.20140127-0ubuntu1) trusty; urgency=low + + [ Ricardo Salveti de Araujo ] + * device.c: pending_charge means not charging. + + [ Ubuntu daily release ] + * Automatic snapshot from revision 224 + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 27 Jan 2014 13:17:49 +0000 + +indicator-power (12.10.6+14.04.20140124-0ubuntu1) trusty; urgency=low + + [ Robert Ancell ] + * Use unity-control-center if it is available. (LP: #1257505) + + [ Simon Steinbeiß ] + * Run xfce-powermanager-settings when in an Xubuntu session. + + [ Lars Uebernickel ] + * gcov.m4: add 1.10 to the lcov version list. + * Run xfce-powermanager-settings when in an Xubuntu session. + + [ Calum Lind ] + * From bug 1255655: "focus[es] the correct tab upon opening gnome- + power-statistics when clicking the indicator battery.". (LP: + #1255655) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 222 + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 24 Jan 2014 10:59:48 +0000 + indicator-power (12.10.6+14.04.20131129-0ubuntu1) trusty; urgency=low [ Lars Uebernickel ] diff --git a/debian/control b/debian/control index f0ed35e..d64c903 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, upower, -Recommends: gnome-control-center (>= 3.1) | ubuntu-system-settings, +Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings, indicator-applet (>= 0.2) | indicator-renderer, Description: Indicator showing power state. This indicator displays current power management information and gives diff --git a/src/device.c b/src/device.c index 508a734..7f1b14f 100644 --- a/src/device.c +++ b/src/device.c @@ -385,7 +385,6 @@ indicator_power_device_get_icon_names (const IndicatorPowerDevice * device) break; case UP_DEVICE_STATE_CHARGING: - case UP_DEVICE_STATE_PENDING_CHARGE: suffix_str = get_device_icon_suffix (percentage); index_str = get_device_icon_index (percentage); g_ptr_array_add (names, g_strdup_printf ("%s-%s-charging-symbolic", kind_str, suffix_str)); @@ -393,6 +392,7 @@ indicator_power_device_get_icon_names (const IndicatorPowerDevice * device) g_ptr_array_add (names, g_strdup_printf ("%s-%s-charging", kind_str, suffix_str)); break; + case UP_DEVICE_STATE_PENDING_CHARGE: case UP_DEVICE_STATE_DISCHARGING: case UP_DEVICE_STATE_PENDING_DISCHARGE: /* Don't show the caution/red icons unless we have <=30 min left. diff --git a/src/service.c b/src/service.c index 2670a67..982a24e 100644 --- a/src/service.c +++ b/src/service.c @@ -692,7 +692,29 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED, GVariant * param G_GNUC_UNUSED, gpointer gself G_GNUC_UNUSED) { - execute_command ("gnome-control-center power"); + static const gchar *control_center_cmd = NULL; + + if (control_center_cmd == NULL) + { + if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu")) + { + control_center_cmd = "xfce4-power-manager-settings"; + } + else + { + gchar *path; + + path = g_find_program_in_path ("unity-control-center"); + if (path != NULL) + control_center_cmd = "unity-control-center power"; + else + control_center_cmd = "gnome-control-center power"; + + g_free (path); + } + } + + execute_command (control_center_cmd); } static void |