diff options
author | Ted Gould <ted@gould.cx> | 2013-09-15 20:51:11 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2013-09-15 20:51:11 -0500 |
commit | 22f3ee8a2f2c10dd51379da2f33b495465c3efef (patch) | |
tree | 359da4ea652053924c8fd6cc292396ff8b0809c8 /src/service.c | |
parent | 0becc25cc08c819dcbdfb41ad124efc17c965014 (diff) | |
parent | 830e6a6aa03392294bc8fcb8e57b52f502ce93ba (diff) | |
download | ayatana-indicator-power-22f3ee8a2f2c10dd51379da2f33b495465c3efef.tar.gz ayatana-indicator-power-22f3ee8a2f2c10dd51379da2f33b495465c3efef.tar.bz2 ayatana-indicator-power-22f3ee8a2f2c10dd51379da2f33b495465c3efef.zip |
Update to trunk before revert
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/service.c b/src/service.c index b4f05ea..b5227f6 100644 --- a/src/service.c +++ b/src/service.c @@ -332,15 +332,13 @@ create_header_state (IndicatorPowerService * self) g_variant_builder_init (&b, G_VARIANT_TYPE("a{sv}")); + g_variant_builder_add (&b, "{sv}", "title", g_variant_new_string (_("Battery"))); + g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (should_be_visible (self))); if (label != NULL) - { - g_variant_builder_add (&b, "{sv}", "label", g_variant_new_string (label)); - - g_free (label); - } + g_variant_builder_add (&b, "{sv}", "label", g_variant_new_take_string (label)); if (icon != NULL) { @@ -350,12 +348,7 @@ create_header_state (IndicatorPowerService * self) } if (a11y != NULL) - { - g_variant_builder_add (&b, "{sv}", "accessible-desc", - g_variant_new_string (a11y)); - - g_free (a11y); - } + g_variant_builder_add (&b, "{sv}", "accessible-desc", g_variant_new_take_string (a11y)); return g_variant_builder_end (&b); } |