aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--debian/control2
-rw-r--r--src/service.c15
3 files changed, 22 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 3edd1fb..2cc426b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+indicator-power (12.10.6+15.04.20150331-0ubuntu1) vivid; urgency=medium
+
+ [ Charles Kerr ]
+ * For the brightness slider, use the same left & right icons as ubunu-
+ system-settings (LP: #1289465)
+
+ -- CI Train Bot <ci-train-bot@canonical.com> Tue, 31 Mar 2015 20:24:46 +0000
+
indicator-power (12.10.6+15.04.20150212-0ubuntu1) vivid; urgency=medium
[ Charles Kerr ]
diff --git a/debian/control b/debian/control
index ef641b4..20869e3 100644
--- a/debian/control
+++ b/debian/control
@@ -30,7 +30,7 @@ Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
upower,
-Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings | switchboard-plug-power | xfce4-power-manager,
+Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings | switchboard-plug-power | xfce4-power-manager | mate-power-manager,
indicator-applet (>= 0.2) | indicator-renderer,
Suggests: powerd,
unity-system-compositor (>= 0.0.4),
diff --git a/src/service.c b/src/service.c
index 0ff818c..dad6dc8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -547,14 +547,21 @@ create_phone_devices_section (IndicatorPowerService * self G_GNUC_UNUSED)
static GMenuItem *
create_brightness_menu_item(void)
{
+ GIcon * icon;
GMenuItem * item;
item = g_menu_item_new(NULL, "indicator.brightness");
g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.unity.slider");
g_menu_item_set_attribute(item, "min-value", "d", 0.0);
g_menu_item_set_attribute(item, "max-value", "d", 1.0);
- g_menu_item_set_attribute(item, "min-icon", "s", "torch-off" );
- g_menu_item_set_attribute(item, "max-icon", "s", "torch-on" );
+
+ icon = g_themed_icon_new("display-brightness-min");
+ g_menu_item_set_attribute_value(item, "min-icon", g_icon_serialize(icon));
+ g_clear_object(&icon);
+
+ icon = g_themed_icon_new("display-brightness-max");
+ g_menu_item_set_attribute_value(item, "max-icon", g_icon_serialize(icon));
+ g_clear_object(&icon);
return item;
}
@@ -779,6 +786,10 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
{
control_center_cmd = "xfce4-power-manager-settings";
}
+ else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate"))
+ {
+ control_center_cmd = "mate-power-preferences";
+ }
else if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Pantheon"))
{
control_center_cmd = "switchboard --open-plug system-pantheon-power";