From e33b4e73c4f96a1b77aedd8422dee7e05eba7f35 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 2 Mar 2015 20:43:35 -0600 Subject: in the brightness slider, use the display-brightness-min and display-brightness-max icons. --- src/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/service.c b/src/service.c index fc07619..d6ccde4 100644 --- a/src/service.c +++ b/src/service.c @@ -536,8 +536,8 @@ create_brightness_menu_item(void) 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" ); + g_menu_item_set_attribute(item, "min-icon", "s", "display-brightness-min" ); + g_menu_item_set_attribute(item, "max-icon", "s", "display-brightness-max" ); return item; } -- cgit v1.2.3 From 39439d941b1e392aa4007fcf7aea6cf21bdad850 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 2 Mar 2015 21:41:27 -0600 Subject: use a GThemedIcon --- src/service.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3 From 708527d147163c45bf283622b50cd06166e935cd Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 31 Mar 2015 14:33:48 -0500 Subject: oops, forgot to commit this tyop fix before pushing --- src/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/service.c b/src/service.c index d58f1c6..9ac559b 100644 --- a/src/service.c +++ b/src/service.c @@ -530,7 +530,7 @@ create_phone_devices_section (IndicatorPowerService * self G_GNUC_UNUSED) static GMenuItem * create_brightness_menu_item(void) { - GICon * icon; + GIcon * icon; GMenuItem * item; item = g_menu_item_new(NULL, "indicator.brightness"); -- cgit v1.2.3