Merge lp:~charlesk/indicator-power/lp-1223635 into lp:indicator-power/13.10

Proposed by Charles Kerr on 2013-09-11
Status: Merged
Approved by: Ted Gould on 2013-09-11
Approved revision: 197
Merged at revision: 196
Proposed branch: lp:~charlesk/indicator-power/lp-1223635
Merge into: lp:indicator-power/13.10
Diff against target: 36 lines (+4/-11)
1 file modified
src/service.c (+4/-11)
To merge this branch: bzr merge lp:~charlesk/indicator-power/lp-1223635
Reviewer Review Type Date Requested Status
Ted Gould (community) 2013-09-11 Approve on 2013-09-11
PS Jenkins bot (community) continuous-integration Approve on 2013-09-11
Review via email: mp+185105@code.launchpad.net

Description of the change

Adds a title in the header's action state

To post a comment you must log in.

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 2013-09-04 15:32:43 +0000
3+++ src/service.c 2013-09-11 16:54:51 +0000
4@@ -332,15 +332,13 @@
5
6 g_variant_builder_init (&b, G_VARIANT_TYPE("a{sv}"));
7
8+ g_variant_builder_add (&b, "{sv}", "title", g_variant_new_string (_("Battery")));
9+
10 g_variant_builder_add (&b, "{sv}", "visible",
11 g_variant_new_boolean (should_be_visible (self)));
12
13 if (label != NULL)
14- {
15- g_variant_builder_add (&b, "{sv}", "label", g_variant_new_string (label));
16-
17- g_free (label);
18- }
19+ g_variant_builder_add (&b, "{sv}", "label", g_variant_new_take_string (label));
20
21 if (icon != NULL)
22 {
23@@ -350,12 +348,7 @@
24 }
25
26 if (a11y != NULL)
27- {
28- g_variant_builder_add (&b, "{sv}", "accessible-desc",
29- g_variant_new_string (a11y));
30-
31- g_free (a11y);
32- }
33+ g_variant_builder_add (&b, "{sv}", "accessible-desc", g_variant_new_take_string (a11y));
34
35 return g_variant_builder_end (&b);
36 }

Subscribers

People subscribed via source and target branches