X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fcfg.h;h=b8fccd1fde76f00d01036ce6ac0dfc6ec3b7713f;hb=c2a9b90f809d55a0a771abcbeb451774ff04085a;hp=e076d0268e36ac5e05543091f425ae6683c0ea94;hpb=94cd6e094ffb603809880f854a71dcef093257e5;p=psensor.git diff --git a/src/cfg.h b/src/cfg.h index e076d02..b8fccd1 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2013 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 @@ -19,6 +19,9 @@ #ifndef _PSENSOR_CONFIG_H_ #define _PSENSOR_CONFIG_H_ +#include + +#include "bool.h" #include "color.h" enum temperature_unit { @@ -39,16 +42,16 @@ struct config { double graph_bg_alpha; - int alpha_channel_enabled; + bool alpha_channel_enabled; /* * Position of the sensors list table */ enum sensorlist_position sensorlist_position; - int window_decoration_enabled; - int window_keep_below_enabled; - int window_restore_enabled; + bool window_decoration_enabled; + bool window_keep_below_enabled; + bool window_restore_enabled; /* Last saved position of the window. */ int window_x; int window_y; @@ -64,13 +67,16 @@ struct config { int sensor_values_max_length; int sensor_update_interval; - int menu_bar_disabled; + bool menu_bar_disabled; - int unity_launcher_count_disabled; + bool unity_launcher_count_disabled; int hide_on_startup; enum temperature_unit temperature_unit; + + bool slog_enabled; + int slog_interval; }; /* @@ -85,16 +91,32 @@ void config_cleanup(); struct color *config_get_sensor_color(const char *sid, const struct color *); void config_set_sensor_color(const char *sid, const struct color *); -int config_get_sensor_alarm_high_thresold(const char *); -void config_set_sensor_alarm_high_thresold(const char *, int); +int config_get_sensor_alarm_high_threshold(const char *); +void config_set_sensor_alarm_high_threshold(const char *, int); -int config_get_sensor_alarm_enabled(const char *); -void config_set_sensor_alarm_enabled(const char *, int); +int config_get_sensor_alarm_low_threshold(const char *); +void config_set_sensor_alarm_low_threshold(const char *, int); -int config_is_sensor_enabled(const char *); -void config_set_sensor_enabled(const char *, int); +bool config_get_sensor_alarm_enabled(const char *); +void config_set_sensor_alarm_enabled(const char *, bool); + +bool config_is_sensor_enabled(const char *); +void config_set_sensor_enabled(const char *, bool); char *config_get_sensor_name(const char *); void config_set_sensor_name(const char *, const char *); +bool config_is_appindicator_enabled(const char *); +void config_set_appindicator_enabled(const char *, bool); + +void config_slog_enabled_notify_add(GConfClientNotifyFunc cbk, void *data); +bool is_slog_enabled(); + +int config_get_slog_interval(); + +int config_get_sensor_position(const char *); +void config_set_sensor_position(const char *, int); + +char *config_get_notif_script(); +void config_set_notif_script(const char *); #endif