summaryrefslogtreecommitdiff
path: root/src/trg-preferences-dialog.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-03-07 09:30:52 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-03-07 09:30:52 +0000
commitecbd6bbb7423bc9b6f329f937bf740b7dc87598d (patch)
treed94b975144b1aed8300d75ab5e4a12fbc8d906de /src/trg-preferences-dialog.c
parent5cf07d32732a12cc049fde68213d4589cb951e67 (diff)
Make the presence of the graph configurable, and prevent ":" showing (introduced by gettext changes) for empty labels like errors (usually).
Diffstat (limited to 'src/trg-preferences-dialog.c')
-rw-r--r--src/trg-preferences-dialog.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/trg-preferences-dialog.c b/src/trg-preferences-dialog.c
index 02c831c..a0c51a4 100644
--- a/src/trg-preferences-dialog.c
+++ b/src/trg-preferences-dialog.c
@@ -208,6 +208,14 @@ static GtkWidget *new_entry(GConfClient * gconf, const char *key)
return w;
}
+static void toggle_show_graph(GtkToggleButton * w, gpointer win)
+{
+ if (gtk_toggle_button_get_active(w))
+ trg_main_window_add_graph(TRG_MAIN_WINDOW(win), TRUE);
+ else
+ trg_main_window_remove_graph(TRG_MAIN_WINDOW(win));
+}
+
static void toggle_tray_icon(GtkToggleButton * w, gpointer win)
{
if (gtk_toggle_button_get_active(w))
@@ -224,6 +232,14 @@ static GtkWidget *trg_prefs_desktopPage(GConfClient * gconf,
t = hig_workarea_create();
+ hig_workarea_add_section_title(t, &row, _("Features"));
+
+ w = new_check_button(gconf, _("Show graph"),
+ TRG_GCONF_KEY_SHOW_GRAPH);
+ g_signal_connect(G_OBJECT(w), "toggled",
+ G_CALLBACK(toggle_show_graph), win);
+ hig_workarea_add_wide_control(t, &row, w);
+
hig_workarea_add_section_title(t, &row, _("System Tray"));
tray = new_check_button(gconf, _("Show in system tray"),