From 2eaf97512d47c37baf5639055e8adc1a47c18984 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sat, 2 Aug 2014 16:24:22 +0200 Subject: [PATCH] sensor update interval setting use gsettings instead of gconf --- src/cfg.c | 8 +++----- src/psensor.schemas | 12 ++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/cfg.c b/src/cfg.c index c47bd06..1218129 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -50,7 +50,7 @@ static const char *ATT_SENSOR_POSITION = "position"; /* Update interval of the measures of the sensors */ static const char *KEY_SENSOR_UPDATE_INTERVAL -= "/apps/psensor/sensor/update_interval"; += "sensor-update-interval"; /* Graph settings */ static const char *KEY_GRAPH_UPDATE_INTERVAL = "graph-update-interval"; @@ -388,7 +388,7 @@ struct config *config_load() c->slog_interval = config_get_slog_interval(); c->sensor_update_interval - = gconf_client_get_int(client, KEY_SENSOR_UPDATE_INTERVAL, NULL); + = get_int(KEY_SENSOR_UPDATE_INTERVAL); if (c->sensor_update_interval < 1) c->sensor_update_interval = 1; @@ -450,9 +450,7 @@ void config_save(const struct config *c) set_int(KEY_GRAPH_MONITORING_DURATION, c->graph_monitoring_duration); - gconf_client_set_int(client, - KEY_SENSOR_UPDATE_INTERVAL, - c->sensor_update_interval, NULL); + set_int(KEY_SENSOR_UPDATE_INTERVAL, c->sensor_update_interval); set_bool(KEY_INTERFACE_MENU_BAR_DISABLED, c->menu_bar_disabled); diff --git a/src/psensor.schemas b/src/psensor.schemas index 70c81fc..5799424 100644 --- a/src/psensor.schemas +++ b/src/psensor.schemas @@ -269,6 +269,18 @@ Vertical position of the graph window. + + + /schemas/apps/psensor/sensor/update_interval + /apps/psensor/sensor/update_interval + psensor + int + 2 + + Update interface of the sensor values + Update interface of the sensor values. + + -- 2.7.4