summaryrefslogtreecommitdiff
path: root/sensors-applet/sensors-applet.c
diff options
context:
space:
mode:
Diffstat (limited to 'sensors-applet/sensors-applet.c')
-rw-r--r--sensors-applet/sensors-applet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
index e67a82d..a1e421c 100644
--- a/sensors-applet/sensors-applet.c
+++ b/sensors-applet/sensors-applet.c
@@ -165,10 +165,8 @@ static void style_set_cb(GtkWidget *widget, GtkStyle *old_style, gpointer data)
/* update all icons in the sensors tree and update all active sensors */
GtkTreeIter interfaces_iter, sensors_iter;
- GtkTreePath *path;
gboolean not_end_of_interfaces = TRUE, not_end_of_sensors = TRUE;
IconType icon_type;
- GdkPixbuf *new_icon;
gboolean enabled;
SensorsApplet *sensors_applet;
DisplayMode display_mode;
@@ -188,6 +186,8 @@ static void style_set_cb(GtkWidget *widget, GtkStyle *old_style, gpointer data)
not_end_of_sensors;
not_end_of_sensors = gtk_tree_model_iter_next(GTK_TREE_MODEL(sensors_applet->sensors), &sensors_iter)) {
+ GdkPixbuf *new_icon;
+
gtk_tree_model_get(GTK_TREE_MODEL(sensors_applet->sensors),
&sensors_iter,
ENABLE_COLUMN, &enabled,
@@ -207,6 +207,8 @@ static void style_set_cb(GtkWidget *widget, GtkStyle *old_style, gpointer data)
(display_mode == DISPLAY_ICON ||
display_mode == DISPLAY_ICON_WITH_VALUE)) {
+ GtkTreePath *path;
+
path = gtk_tree_model_get_path(GTK_TREE_MODEL(sensors_applet->sensors), &sensors_iter);
sensors_applet_icon_changed(sensors_applet, path);
gtk_tree_path_free(path);