[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 01/01: Some corrections wrt. presentation of power values

noreply at xfce.org noreply at xfce.org
Mon Oct 22 23:33:52 CEST 2018


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

t   i   m   y   s   t   e   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-sensors-plugin.

commit 319829cd3001e97f6ab9d44144c0edd977ba84e5
Author: Fabian <timystery at arcor.de>
Date:   Mon Oct 22 23:33:34 2018 +0200

    Some corrections wrt. presentation of power values
---
 lib/acpi.c                     | 8 ++++++--
 lib/sensors-interface-common.c | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/acpi.c b/lib/acpi.c
index 614cd38..ebc4067 100644
--- a/lib/acpi.c
+++ b/lib/acpi.c
@@ -627,8 +627,8 @@ read_power_zone (t_chip *ptr_chip)
 
                     ptr_chipfeature->color = g_strdup("#0000B0");
                     ptr_chipfeature->address = ptr_chip->chip_features->len;
-                    ptr_chipfeature->devicename = g_strdup_printf (_("%s - %s"), ptr_dirent->d_name, _("Power"));
-                    ptr_chipfeature->name = g_strdup (ptr_chipfeature->devicename);
+                    ptr_chipfeature->devicename = g_strdup(ptr_dirent->d_name);
+                    ptr_chipfeature->name = g_strdup_printf (_("%s - %s"), ptr_dirent->d_name, _("Power"));
                     ptr_chipfeature->formatted_value = NULL;
                     ptr_chipfeature->raw_value = get_power_zone_value(ptr_dirent->d_name);
                     ptr_chipfeature->valid = TRUE;
@@ -757,6 +757,10 @@ refresh_acpi (gpointer ptr_chipfeature, gpointer ptr_unused)
             cf->raw_value = get_battery_zone_value (cf->devicename);
             break;
 
+        case POWER:
+            cf->raw_value = get_power_zone_value (cf->devicename);
+            break;
+
         case STATE:
             str_filename = g_strdup_printf ("%s/%s/%s/state", ACPI_PATH, ACPI_DIR_FAN, cf->devicename);
 
diff --git a/lib/sensors-interface-common.c b/lib/sensors-interface-common.c
index aff9fa2..a72c67a 100644
--- a/lib/sensors-interface-common.c
+++ b/lib/sensors-interface-common.c
@@ -167,7 +167,7 @@ format_sensor_value (t_tempscale temperaturescale, t_chipfeature *ptr_chipfeatur
                break;
 
         case POWER:
-               *dptr_str_formattedvalue = g_strdup_printf(_("%.0f W"), val_sensorfeature);
+               *dptr_str_formattedvalue = g_strdup_printf(_("%.0f mW"), val_sensorfeature);
                break;
 
         case STATE:

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


More information about the Xfce4-commits mailing list