#ifndef _PSENSOR_CONFIG_H_
#define _PSENSOR_CONFIG_H_
-#include <gconf/gconf-client.h>
-
-#include "bool.h"
-#include "color.h"
+#include <bool.h>
+#include <color.h>
enum temperature_unit {
- CELCIUS,
+ CELSIUS,
FAHRENHEIT
};
bool alpha_channel_enabled;
- /*
- * Position of the sensors list table
- */
+ /* Position of the sensors list table */
enum sensorlist_position sensorlist_position;
bool window_decoration_enabled;
int slog_interval;
};
-/*
- Loads config from GConf
-*/
+/* Loads psensor configuration */
struct config *config_load();
void config_save(const struct config *);
bool config_is_appindicator_label_enabled(const char *);
void config_set_appindicator_label_enabled(const char *, bool);
-void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data);
bool is_slog_enabled();
+void config_set_slog_enabled_changed_cbk(void (*)(void *), void *);
int config_get_slog_interval();
char *config_get_notif_script();
void config_set_notif_script(const char *);
+
+/*
+ * Returns the user directory containing psensor data (configuration
+ * and log).
+ * Corresponds to $HOME/.psensor/
+ * Creates the directory if it does not exist;
+ * Returns NULL if it cannot be determined.
+ */
+const char *get_psensor_user_dir();
+
+void config_sync();
+
#endif