[Xfce4-commits] <xfce4-power-manager:eric/bugzilla-patches> Display power percentage
Eric Koegel
noreply at xfce.org
Sun Jan 19 07:28:01 CET 2014
Updating branch refs/heads/eric/bugzilla-patches
to 4549373bdd56d42892cdda414b655e4a0b853a6c (commit)
from 2382793018f1c3848929d019be706bf5dcacf039 (commit)
commit 4549373bdd56d42892cdda414b655e4a0b853a6c
Author: Pascal de Bruijn <pmjdebruijn at pcode.nl>
Date: Mon Dec 23 16:43:34 2013 +0100
Display power percentage
This is particularly relevant for Logitech Unifying devices.
My test device was a Logitech M185 wireless mouse, which has no power
related properties except for "percentage".
Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
src/xfpm-power-info.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/xfpm-power-info.c b/src/xfpm-power-info.c
index e365da9..f0c9e50 100644
--- a/src/xfpm-power-info.c
+++ b/src/xfpm-power-info.c
@@ -465,6 +465,19 @@ xfpm_info_add_device_view (XfpmInfo *info, GHashTable *props, const gchar *objec
g_free (str);
}
+ /*Percentage*/
+ str = xfpm_info_get_energy_property (props, "Percentage", _("%"));
+ if ( str )
+ {
+ gtk_list_store_append (list_store, &iter);
+ gtk_list_store_set (list_store, &iter,
+ XFPM_DEVICE_INFO_NAME, _("Percentage"),
+ XFPM_DEVICE_INFO_VALUE, str,
+ -1);
+ i++;
+ g_free (str);
+ }
+
/*Vendor*/
value = g_hash_table_lookup (props, "Vendor");
More information about the Xfce4-commits
mailing list