Merge lp:~charlesk/indicator-power/1p-1186181-prefer-battery-charging-XXX-icons into lp:indicator-power/14.10

Proposed by Ted Gould
Status: Merged
Approved by: Ted Gould
Approved revision: 242
Merged at revision: 245
Proposed branch: lp:~charlesk/indicator-power/1p-1186181-prefer-battery-charging-XXX-icons
Merge into: lp:indicator-power/14.10
Diff against target: 73 lines (+12/-6)
2 files modified
src/device.c (+2/-1)
tests/test-device.cc (+10/-5)
To merge this branch: bzr merge lp:~charlesk/indicator-power/1p-1186181-prefer-battery-charging-XXX-icons
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+222814@code.launchpad.net

This proposal supersedes a proposal from 2014-05-05.

Commit message

Prefer the 'battery-XXX-charging' (eg, 'battery-020-charging') icons over the 'battery-low-charging' ones because the former are more precise and likely closer to the actual battery level.

Description of the change

Prefer the 'battery-XXX-charging' (eg, 'battery-020-charging') icons over the 'battery-low-charging' ones because the former are more precise and likely closer to the actual battery level.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Ted Gould (ted) wrote :

Resubmit for 14.10

Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/device.c'
2--- src/device.c 2014-03-25 19:48:57 +0000
3+++ src/device.c 2014-06-11 14:59:37 +0000
4@@ -416,8 +416,9 @@
5 case UP_DEVICE_STATE_CHARGING:
6 suffix_str = get_device_icon_suffix (percentage);
7 index_str = get_device_icon_index (percentage);
8+ g_ptr_array_add (names, g_strdup_printf ("%s-%s-charging", kind_str, index_str));
9+ g_ptr_array_add (names, g_strdup_printf ("gpm-%s-%s-charging", kind_str, index_str));
10 g_ptr_array_add (names, g_strdup_printf ("%s-%s-charging-symbolic", kind_str, suffix_str));
11- g_ptr_array_add (names, g_strdup_printf ("gpm-%s-%s-charging", kind_str, index_str));
12 g_ptr_array_add (names, g_strdup_printf ("%s-%s-charging", kind_str, suffix_str));
13 break;
14
15
16=== modified file 'tests/test-device.cc'
17--- tests/test-device.cc 2014-03-25 19:48:57 +0000
18+++ tests/test-device.cc 2014-06-11 14:59:37 +0000
19@@ -324,8 +324,9 @@
20 INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0,
21 NULL);
22
23- g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
24+ g_string_append_printf (expected, "%s-100-charging;", kind_str);
25 g_string_append_printf (expected, "gpm-%s-100-charging;", kind_str);
26+ g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
27 g_string_append_printf (expected, "%s-full-charging", kind_str);
28 check_icon_names (device, expected->str);
29 g_string_truncate (expected, 0);
30@@ -335,8 +336,9 @@
31 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
32 INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
33 NULL);
34- g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
35+ g_string_append_printf (expected, "%s-080-charging;", kind_str);
36 g_string_append_printf (expected, "gpm-%s-080-charging;", kind_str);
37+ g_string_append_printf (expected, "%s-full-charging-symbolic;", kind_str);
38 g_string_append_printf (expected, "%s-full-charging", kind_str);
39 check_icon_names (device, expected->str);
40 g_string_truncate (expected, 0);
41@@ -346,8 +348,9 @@
42 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
43 INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
44 NULL);
45+ g_string_append_printf (expected, "%s-060-charging;", kind_str);
46+ g_string_append_printf (expected, "gpm-%s-060-charging;", kind_str);
47 g_string_append_printf (expected, "%s-good-charging-symbolic;", kind_str);
48- g_string_append_printf (expected, "gpm-%s-060-charging;", kind_str);
49 g_string_append_printf (expected, "%s-good-charging", kind_str);
50 check_icon_names (device, expected->str);
51 g_string_truncate (expected, 0);
52@@ -357,8 +360,9 @@
53 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
54 INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
55 NULL);
56+ g_string_append_printf (expected, "%s-020-charging;", kind_str);
57+ g_string_append_printf (expected, "gpm-%s-020-charging;", kind_str);
58 g_string_append_printf (expected, "%s-low-charging-symbolic;", kind_str);
59- g_string_append_printf (expected, "gpm-%s-020-charging;", kind_str);
60 g_string_append_printf (expected, "%s-low-charging", kind_str);
61 check_icon_names (device, expected->str);
62 g_string_truncate (expected, 0);
63@@ -368,8 +372,9 @@
64 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_CHARGING,
65 INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
66 NULL);
67+ g_string_append_printf (expected, "%s-000-charging;", kind_str);
68+ g_string_append_printf (expected, "gpm-%s-000-charging;", kind_str);
69 g_string_append_printf (expected, "%s-caution-charging-symbolic;", kind_str);
70- g_string_append_printf (expected, "gpm-%s-000-charging;", kind_str);
71 g_string_append_printf (expected, "%s-caution-charging", kind_str);
72 check_icon_names (device, expected->str);
73 g_string_truncate (expected, 0);

Subscribers

People subscribed via source and target branches