[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 01/01: - correct handling of left and right click and double click - adapt to new sensors.h with renewed sensors_chip_name structure - better handling of dummy sensors_chip_name entry for ACPI

noreply at xfce.org noreply at xfce.org
Wed Feb 18 20:57:26 CET 2015


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

timystery pushed a commit to branch master
in repository panel-plugins/xfce4-sensors-plugin.

commit f9021d30afd4ef22b7dea33084f4bba331532723
Author: Fabian <timystery at arcor.de>
Date:   Wed Feb 18 20:56:07 2015 +0100

    - correct handling of left and right click and double click
    - adapt to new sensors.h with renewed sensors_chip_name structure
    - better handling of dummy sensors_chip_name entry for ACPI
---
 include/types.h               |    4 ++--
 lib/acpi.c                    |    8 ++++++--
 panel-plugin/sensors-plugin.c |    2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/include/types.h b/include/types.h
index e1859a2..51ee915 100644
--- a/include/types.h
+++ b/include/types.h
@@ -38,9 +38,9 @@
 #else
  typedef struct sensors_chip_name {
   char *prefix;
-  int bus;
+  int bus; /* newer sensors.h has sensors_bus_id as struct{short,short} */
   int addr;
-  char *busname;    /* if dummy */
+  char *path;    /* if dummy */
  } sensors_chip_name;
 #endif
 
diff --git a/lib/acpi.c b/lib/acpi.c
index 98fde2a..da40dcc 100644
--- a/lib/acpi.c
+++ b/lib/acpi.c
@@ -522,6 +522,7 @@ int read_fan_zone (t_chip *chip)
 int initialize_ACPI (GPtrArray *chips)
 {
     t_chip *chip;
+    sensors_chip_name *ptr_chipname_tmp;
 
     TRACE ("enters initialize_ACPI");
 
@@ -533,8 +534,11 @@ int initialize_ACPI (GPtrArray *chips)
 
     chip->type = ACPI;
 
-    chip->chip_name = (const sensors_chip_name *)
-                            ( g_strdup(_("ACPI")), 0, 0, g_strdup(_("ACPI")) );
+    ptr_chipname_tmp = g_new0 (sensors_chip_name, 1);
+    ptr_chipname_tmp->prefix = g_strdup(_("ACPI"));
+    ptr_chipname_tmp->path = g_strdup(_("ACPI"));
+    
+    chip->chip_name = (const sensors_chip_name *) ptr_chipname_tmp;
 
     chip->chip_features = g_ptr_array_new ();
 
diff --git a/panel-plugin/sensors-plugin.c b/panel-plugin/sensors-plugin.c
index d13a49a..b80d88f 100644
--- a/panel-plugin/sensors-plugin.c
+++ b/panel-plugin/sensors-plugin.c
@@ -1043,7 +1043,7 @@ execute_command (GtkWidget *widget, GdkEventButton *event, gpointer data)
     }
     else {
         TRACE ("leaves execute_command with FALSE");
-        return TRUE;
+        return FALSE;
     }
 }
 

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


More information about the Xfce4-commits mailing list