Merge lp:~charlesk/indicator-power/lp-1289465-make-brightness-icons-consistent-with-system-settings into lp:indicator-power/15.04

Proposed by Charles Kerr
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 282
Merged at revision: 280
Proposed branch: lp:~charlesk/indicator-power/lp-1289465-make-brightness-icons-consistent-with-system-settings
Merge into: lp:indicator-power/15.04
Diff against target: 27 lines (+9/-2)
1 file modified
src/service.c (+9/-2)
To merge this branch: bzr merge lp:~charlesk/indicator-power/lp-1289465-make-brightness-icons-consistent-with-system-settings
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Alejandro J. Cura (community) Approve
Review via email: mp+254821@code.launchpad.net

Commit message

For the brightness slider, use the same left & right icons as ubunu-system-settings

Description of the change

== Description of the Change

For the brightness slider, use the same left & right icons as ubunu-system-settings.

== Checklist

> Are there any related MPs required for this MP to build/function as expected? Please list.

Yes:
https://code.launchpad.net/~charlesk/ubuntu-themes/lp-1289465-add-display-brightness-icons-to-ubuntu-mobile/+merge/254820

> Is your branch in sync with latest trunk? (e.g. bzr pull lp:trunk -> no changes)

Yes

> Did the code build without warnings?

Yes

> Did the tests run successfully?

Yes

> Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

> If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

> Did your component test plan pass? If on a device, what image number?

mako vivid r150

> Please list which manual tests are germane for the reviewer in this MR.

This is a one-off, so putting the test here in the MP:

Steps:
1. Pull down battery indicator's menu
2. Make a note of the icons on the brightness slider
3. Click on "Battery settings..."
4. In the "Battery settings" page, click on "Display brightness"
5. Make a note of the icons on the brightness slider

Expected Results:
The icons in steps 2 and 5 should be the same.

> Did you provide a link to this page https://wiki.ubuntu.com/Process/Merges/Checklists/indicator-power

Yes

To post a comment you must log in.
282. By Charles Kerr

oops, forgot to commit this tyop fix before pushing

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service.c'
2--- src/service.c 2015-01-30 17:58:57 +0000
3+++ src/service.c 2015-03-31 19:34:08 +0000
4@@ -530,14 +530,21 @@
5 static GMenuItem *
6 create_brightness_menu_item(void)
7 {
8+ GIcon * icon;
9 GMenuItem * item;
10
11 item = g_menu_item_new(NULL, "indicator.brightness");
12 g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.unity.slider");
13 g_menu_item_set_attribute(item, "min-value", "d", 0.0);
14 g_menu_item_set_attribute(item, "max-value", "d", 1.0);
15- g_menu_item_set_attribute(item, "min-icon", "s", "torch-off" );
16- g_menu_item_set_attribute(item, "max-icon", "s", "torch-on" );
17+
18+ icon = g_themed_icon_new("display-brightness-min");
19+ g_menu_item_set_attribute_value(item, "min-icon", g_icon_serialize(icon));
20+ g_clear_object(&icon);
21+
22+ icon = g_themed_icon_new("display-brightness-max");
23+ g_menu_item_set_attribute_value(item, "max-icon", g_icon_serialize(icon));
24+ g_clear_object(&icon);
25
26 return item;
27 }

Subscribers

People subscribed via source and target branches