summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-01-20 21:54:38 +0100
committerStefano Karapetsas <[email protected]>2013-01-20 21:54:38 +0100
commitf108ccca26b7a56009063b01e23b9df878d021ce (patch)
tree6c8695e333400d511ca3f09a937617ac1807a74b
parent5e29d576c0c137a389a4d686c946a30a20eb40ff (diff)
downloadmate-sensors-applet-f108ccca26b7a56009063b01e23b9df878d021ce.tar.bz2
mate-sensors-applet-f108ccca26b7a56009063b01e23b9df878d021ce.tar.xz
Fix load of saved enabled sensors in GSettings
-rw-r--r--sensors-applet/sensors-applet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
index 63ed3f9..9dcea39 100644
--- a/sensors-applet/sensors-applet.c
+++ b/sensors-applet/sensors-applet.c
@@ -103,7 +103,7 @@ static void destroy_cb(GtkWidget *widget, gpointer data) {
g_source_remove(sensors_applet->timeout_id);
}
- if (sensors_applet->settings ) {
+ if (sensors_applet->settings) {
g_object_unref (sensors_applet->settings);
sensors_applet->settings = NULL;
}
@@ -1069,6 +1069,7 @@ gboolean sensors_applet_add_sensor(SensorsApplet *sensors_applet,
gchar *settings_id = g_settings_get_string (settings, ID);
if (settings_id != NULL && settings_id[0] != '\0') {
+ enable = g_settings_get_boolean (settings, ENABLED);
icon = sensors_applet_load_icon(g_settings_get_int (settings, ICON_TYPE));
gtk_tree_store_set(sensors_applet->sensors,
&sensors_iter,
@@ -1077,7 +1078,7 @@ gboolean sensors_applet_add_sensor(SensorsApplet *sensors_applet,
LABEL_COLUMN, g_settings_get_string (settings, LABEL),
INTERFACE_COLUMN, g_settings_get_string (settings, INTERFACE),
SENSOR_TYPE_COLUMN, g_settings_get_int (settings, SENSOR_TYPE),
- ENABLE_COLUMN, g_settings_get_boolean (settings, ENABLED),
+ ENABLE_COLUMN, enable,
VISIBLE_COLUMN, TRUE,
LOW_VALUE_COLUMN, g_settings_get_double (settings, LOW_VALUE),
HIGH_VALUE_COLUMN, g_settings_get_double (settings, HIGH_VALUE),