#include <libintl.h>
#define _(str) gettext(str)
-#include <gio/gio.h>
-
#include <cfg.h>
+#include <graph.h>
#include <pio.h>
#include <plog.h>
/* Graph settings */
static const char *KEY_GRAPH_UPDATE_INTERVAL = "graph-update-interval";
-
static const char *KEY_GRAPH_MONITORING_DURATION = "graph-monitoring-duration";
-
static const char *KEY_GRAPH_BACKGROUND_COLOR = "graph-background-color";
-
static const char *DEFAULT_GRAPH_BACKGROUND_COLOR = "#e8f4e8f4a8f5";
-
static const char *KEY_GRAPH_BACKGROUND_ALPHA = "graph-background-alpha";
-
static const char *KEY_GRAPH_FOREGROUND_COLOR
= "graph-foreground-color";
+static const char *KEY_GRAPH_SMOOTH_CURVES_ENABLED
+= "graph-smooth-curves-enabled";
static const char *DEFAULT_GRAPH_FOREGROUND_COLOR = "#000000000000";
set_bool(KEY_INTERFACE_WINDOW_KEEP_BELOW_ENABLED, enabled);
}
+bool config_is_smooth_curves_enabled()
+{
+ return get_bool(KEY_GRAPH_SMOOTH_CURVES_ENABLED);
+}
+
+void config_set_smooth_curves_enabled(bool b)
+{
+ set_bool(KEY_GRAPH_SMOOTH_CURVES_ENABLED, b);
+}
+
+
static void init()
{
log_fct_enter();
if (c->graph_monitoring_duration < 1)
c->graph_monitoring_duration = 10;
- c->sensor_values_max_length
- = (c->graph_monitoring_duration * 60) / c->sensor_update_interval;
-
- if (c->sensor_values_max_length < 3)
- c->sensor_values_max_length = 3;
-
c->menu_bar_disabled = get_bool(KEY_INTERFACE_MENU_BAR_DISABLED);
c->unity_launcher_count_disabled
c->temperature_unit = get_int(KEY_INTERFACE_TEMPERATURE_UNIT);
+ c->sensor_values_max_length = compute_values_max_length(c);
+
return c;
}
{
sensor_set_bool(sid, ATT_SENSOR_APPINDICATOR_LABEL_ENABLED, enabled);
}
+
+GSettings *config_get_GSettings()
+{
+ return settings;
+}