done
-for ac_header in arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h getopt.h
+for ac_header in stdbool.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdbool_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_STDBOOL_H 1
_ACEOF
fi
top_srcdir = ..
-prefix = /usr/local
+prefix = /tmp
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
static const char *KEY_INTERFACE_TEMPERATURE_UNIT
= "/apps/psensor/interface/temperature_unit";
+static const char *KEY_SLOG_ENABLED = "/apps/psensor/slog/enabled";
+
static GConfClient *client;
static char *get_string(const char *key, const char *default_value)
free(key);
}
+static bool is_slog_enabled()
+{
+ return gconf_client_get_bool(client, KEY_SLOG_ENABLED, NULL);
+}
+
+static void set_slog_enabled(bool enabled)
+{
+ gconf_client_set_bool(client, KEY_SLOG_ENABLED, enabled, NULL);
+}
static bool is_window_decoration_enabled()
{
c->sensorlist_position = get_sensorlist_position();
c->window_decoration_enabled = is_window_decoration_enabled();
c->window_keep_below_enabled = is_window_keep_below_enabled();
+ c->slog_enabled = is_slog_enabled();
c->sensor_update_interval
= gconf_client_get_int(client, KEY_SENSOR_UPDATE_INTERVAL, NULL);
set_sensorlist_position(c->sensorlist_position);
set_window_decoration_enabled(c->window_decoration_enabled);
set_window_keep_below_enabled(c->window_keep_below_enabled);
+ set_slog_enabled(c->slog_enabled);
gconf_client_set_int(client,
KEY_GRAPH_UPDATE_INTERVAL,
int hide_on_startup;
enum temperature_unit temperature_unit;
+
+ bool slog_enabled;
};
/*
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="enable_slog">
+ <property name="label" translatable="yes">Enable log of measures</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_left">4</property>
+ <property name="margin_right">4</property>
+ <property name="margin_top">4</property>
+ <property name="margin_bottom">4</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
GtkComboBox *w_sensorlist_pos;
GtkToggleButton *w_hide_window_decoration, *w_keep_window_below,
*w_enable_menu, *w_enable_launcher_counter, *w_hide_on_startup,
- *w_win_restore;
+ *w_win_restore, *w_slog_enabled;
GtkComboBoxText *w_temp_unit;
cfg = ui->config;
gtk_toggle_button_set_active(w_enable_launcher_counter,
!cfg->unity_launcher_count_disabled);
+ w_slog_enabled = GTK_TOGGLE_BUTTON
+ (gtk_builder_get_object(builder, "enable_slog"));
+ gtk_toggle_button_set_active(w_slog_enabled, cfg->slog_enabled);
+
w_hide_on_startup
= GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder,
"hide_on_startup"));
cfg->window_restore_enabled
= gtk_toggle_button_get_active(w_win_restore);
+ cfg->slog_enabled
+ = gtk_toggle_button_get_active(w_slog_enabled);
+
cfg->temperature_unit
= gtk_combo_box_get_active(GTK_COMBO_BOX(w_temp_unit));