aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c15
1 files changed, 13 insertions, 2 deletions
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";