Merge lp:~charlesk/indicator-power/lp-1054146 into lp:indicator-power/12.10

Proposed by Charles Kerr
Status: Merged
Approved by: Lars Karlitski
Approved revision: 149
Merged at revision: 149
Proposed branch: lp:~charlesk/indicator-power/lp-1054146
Merge into: lp:indicator-power/12.10
Diff against target: 97 lines (+17/-8)
2 files modified
src/device.c (+2/-1)
tests/test-device.cc (+15/-7)
To merge this branch: bzr merge lp:~charlesk/indicator-power/lp-1054146
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+127822@code.launchpad.net

Description of the change

lp:~charlesk/indicator-power/fix-battery-icons-for-q contains fixes for Bug #1054146 and Bug #1054209.

Since 1054209 is not happening for 12.10, this branch contains only the 1054146-specific changes from that branch.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

That does look familiar!

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 2012-09-20 08:25:00 +0000
3+++ src/device.c 2012-10-03 16:38:25 +0000
4@@ -390,8 +390,9 @@
5
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", kind_str, index_str));
9+ g_ptr_array_add (names, g_strdup_printf ("gpm-%s-%s", kind_str, index_str));
10 g_ptr_array_add (names, g_strdup_printf ("battery-%s-symbolic", suffix_str));
11- g_ptr_array_add (names, g_strdup_printf ("gpm-%s-%s", kind_str, index_str));
12 g_ptr_array_add (names, g_strdup_printf ("battery-%s", suffix_str));
13 break;
14
15
16=== modified file 'tests/test-device.cc'
17--- tests/test-device.cc 2012-09-05 21:20:25 +0000
18+++ tests/test-device.cc 2012-10-03 16:38:25 +0000
19@@ -310,8 +310,9 @@
20 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
21 INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0,
22 NULL);
23- check_icon_names (device, "battery-full-symbolic;"
24+ check_icon_names (device, "battery-100;"
25 "gpm-battery-100;"
26+ "battery-full-symbolic;"
27 "battery-full");
28
29 // discharging battery, 85%
30@@ -319,8 +320,9 @@
31 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
32 INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
33 NULL);
34- check_icon_names (device, "battery-full-symbolic;"
35+ check_icon_names (device, "battery-080;"
36 "gpm-battery-080;"
37+ "battery-full-symbolic;"
38 "battery-full");
39
40 // discharging battery, 50% -- 1 hour left
41@@ -329,8 +331,9 @@
42 INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
43 INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
44 NULL);
45- check_icon_names (device, "battery-good-symbolic;"
46+ check_icon_names (device, "battery-060;"
47 "gpm-battery-060;"
48+ "battery-good-symbolic;"
49 "battery-good");
50
51 // discharging battery, 25% -- 1 hour left
52@@ -339,8 +342,9 @@
53 INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
54 INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
55 NULL);
56- check_icon_names (device, "battery-good-symbolic;"
57+ check_icon_names (device, "battery-040;"
58 "gpm-battery-040;"
59+ "battery-good-symbolic;"
60 "battery-good");
61
62 // discharging battery, 25% -- 15 minutes left
63@@ -349,8 +353,9 @@
64 INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
65 INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
66 NULL);
67- check_icon_names (device, "battery-low-symbolic;"
68+ check_icon_names (device, "battery-020;"
69 "gpm-battery-020;"
70+ "battery-low-symbolic;"
71 "battery-low");
72
73 // discharging battery, 5% -- 1 hour left
74@@ -359,8 +364,9 @@
75 INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
76 INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
77 NULL);
78- check_icon_names (device, "battery-good-symbolic;"
79+ check_icon_names (device, "battery-040;"
80 "gpm-battery-040;"
81+ "battery-good-symbolic;"
82 "battery-good");
83
84 // discharging battery, 5% -- 15 minutes left
85@@ -369,9 +375,11 @@
86 INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
87 INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
88 NULL);
89- check_icon_names (device, "battery-caution-symbolic;"
90+ check_icon_names (device, "battery-000;"
91 "gpm-battery-000;"
92+ "battery-caution-symbolic;"
93 "battery-caution");
94+
95 // state unknown
96 g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
97 INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN,

Subscribers

People subscribed via source and target branches