[Xfce4-commits] [xfce/xfce4-power-manager] 03/13: Display power percentage

noreply at xfce.org noreply at xfce.org
Tue Apr 8 18:42:57 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 788ca362f2ce261da75e10a0637bf2b057257771
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");
 	

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list