aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-02 21:41:27 -0600
committerCharles Kerr <charles.kerr@canonical.com>2015-03-02 21:41:27 -0600
commit39439d941b1e392aa4007fcf7aea6cf21bdad850 (patch)
tree0f94ce8591bca5b73e9310968cea269eafb36ce5
parente33b4e73c4f96a1b77aedd8422dee7e05eba7f35 (diff)
downloadayatana-indicator-power-39439d941b1e392aa4007fcf7aea6cf21bdad850.tar.gz
ayatana-indicator-power-39439d941b1e392aa4007fcf7aea6cf21bdad850.tar.bz2
ayatana-indicator-power-39439d941b1e392aa4007fcf7aea6cf21bdad850.zip
use a GThemedIcon
-rw-r--r--src/service.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index d6ccde4..d58f1c6 100644
--- a/src/service.c
+++ b/src/service.c
@@ -530,14 +530,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", "display-brightness-min" );
- g_menu_item_set_attribute(item, "max-icon", "s", "display-brightness-max" );
+
+ 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;
}