/*
- * Copyright (C) 2010-2013 jeanfi@gmail.com
+ * Copyright (C) 2010-2014 jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
#include <ctype.h>
#include "cfg.h"
-#include "log.h"
+#include <plog.h>
static const char *KEY_SENSORS = "/apps/psensor/sensors";
static const char *ATT_SENSOR_ENABLED = "enabled";
static const char *ATT_SENSOR_NAME = "name";
static const char *ATT_SENSOR_APPINDICATOR_DISABLED = "appindicator/disabled";
+static const char *ATT_SENSOR_APPINDICATOR_LABEL_ENABLED
+= "appindicator/menu/enabled";
+
static const char *ATT_SENSOR_POSITION = "position";
static const char *KEY_SENSOR_UPDATE_INTERVAL
free(key);
}
+bool config_is_appindicator_label_enabled(const char *sid)
+{
+ char *key;
+ gboolean b;
+
+ key = get_sensor_att_key(sid, ATT_SENSOR_APPINDICATOR_LABEL_ENABLED);
+ b = gconf_client_get_bool(client, key, NULL);
+ free(key);
+
+ return b;
+}
+
+void config_set_appindicator_label_enabled(const char *sid, bool enabled)
+{
+ char *key;
+
+ key = get_sensor_att_key(sid, ATT_SENSOR_APPINDICATOR_LABEL_ENABLED);
+ gconf_client_set_bool(client, key, enabled, NULL);
+ free(key);
+}
+
bool is_slog_enabled()
{
return gconf_client_get_bool(client, KEY_SLOG_ENABLED, NULL);