diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-04-15 09:23:24 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-04-15 09:23:24 -0500 |
commit | 820cc22b429e6b89f107b9d7baf4414e4c49a338 (patch) | |
tree | 27aee66625ac0bc491f8c8c2e65257bbedec916a /src | |
parent | 3e9263995e880ac53322ed8229ca0b47dc5a7064 (diff) | |
download | ayatana-indicator-power-820cc22b429e6b89f107b9d7baf4414e4c49a338.tar.gz ayatana-indicator-power-820cc22b429e6b89f107b9d7baf4414e4c49a338.tar.bz2 ayatana-indicator-power-820cc22b429e6b89f107b9d7baf4414e4c49a338.zip |
tweak: in put_primary_device(), peek at the variant's strings instead of dup'ing them
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-power.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index cf16fbf..1b3794e 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -785,15 +785,15 @@ put_primary_device (IndicatorPower *self, gchar *short_details = NULL; gchar *details = NULL; gchar *accessible_name = NULL; - gchar *device_icon = NULL; - gchar *object_path = NULL; + const gchar *device_icon = NULL; + const gchar *object_path = NULL; gdouble percentage; guint64 time; const gchar *device_name; /* set the icon and text */ g_variant_get (device, - "(susdut)", + "(&su&sdut)", &object_path, &kind, &device_icon, @@ -825,8 +825,6 @@ put_primary_device (IndicatorPower *self, g_free (short_details); g_free (details); g_free (accessible_name); - g_free (device_icon); - g_free (object_path); } static void |