X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fcfg.c;h=820dd4da9db10fcee2c0ef9e93d76cc680dd0621;hb=cb2b7143c2d307a423f899e30b6b0c1dd056e5b1;hp=5a6f8e80fbb5c810fe23bfcdc8f42c80f1d7ffdf;hpb=d9eaecbb54ed59e6102dab239ae6ccf819a86fd1;p=psensor.git diff --git a/src/cfg.c b/src/cfg.c index 5a6f8e8..820dd4d 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -21,9 +21,8 @@ #include #include -#include - #include "cfg.h" +#include "log.h" static const char *KEY_SENSORS = "/apps/psensor/sensors"; @@ -387,7 +386,7 @@ void config_set_appindicator_enabled(const char *sid, bool enabled) free(key); } -static bool is_slog_enabled() +bool is_slog_enabled() { return gconf_client_get_bool(client, KEY_SLOG_ENABLED, NULL); } @@ -397,6 +396,22 @@ static void set_slog_enabled(bool enabled) gconf_client_set_bool(client, KEY_SLOG_ENABLED, enabled, NULL); } + +void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data) +{ + log_debug("config_slog_enabled_notify_add"); + gconf_client_add_dir(client, + KEY_SLOG_ENABLED, + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_notify_add(client, + KEY_SLOG_ENABLED, + cbk, + data, + NULL, + NULL); +} + static bool is_window_decoration_enabled() { return !gconf_client_get_bool(client,