From ecbd6bbb7423bc9b6f329f937bf740b7dc87598d Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Mon, 7 Mar 2011 09:30:52 +0000 Subject: Make the presence of the graph configurable, and prevent ":" showing (introduced by gettext changes) for empty labels like errors (usually). --- src/trg-preferences-dialog.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/trg-preferences-dialog.c') 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"), -- cgit v1.2.3