summaryrefslogtreecommitdiff
path: root/src/trg-preferences-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trg-preferences-dialog.c')
-rw-r--r--src/trg-preferences-dialog.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/trg-preferences-dialog.c b/src/trg-preferences-dialog.c
index c187301..84cfb7c 100644
--- a/src/trg-preferences-dialog.c
+++ b/src/trg-preferences-dialog.c
@@ -306,6 +306,12 @@ static void menu_bar_toggle_filter_dirs(GtkToggleButton * w, gpointer win) {
trg_state_selector_set_show_dirs(selector, gtk_toggle_button_get_active(w));
}
+static void view_states_toggled_cb(GtkToggleButton * w, gpointer data) {
+ GtkWidget *scroll = gtk_widget_get_parent(GTK_WIDGET(trg_main_window_get_state_selector(TRG_MAIN_WINDOW(data))));
+ trg_widget_set_visible(scroll,
+ gtk_toggle_button_get_active(w));
+}
+
static void notebook_toggled_cb(GtkToggleButton *b, gpointer data) {
trg_main_window_notebook_set_visible(TRG_MAIN_WINDOW(data), gtk_toggle_button_get_active(b));
}
@@ -313,21 +319,27 @@ static void notebook_toggled_cb(GtkToggleButton *b, gpointer data) {
static GtkWidget *trg_prefs_desktopPage(TrgPreferencesDialog *dlg) {
TrgPreferencesDialogPrivate *priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(dlg);
- GtkWidget *tray, *w, *t;
+ GtkWidget *tray, *w, *dep, *t;
gint row = 0;
t = hig_workarea_create();
hig_workarea_add_section_title(t, &row, _("Features"));
+ dep = w = trgp_check_new(dlg, _("State selector"),
+ TRG_PREFS_KEY_SHOW_STATE_SELECTOR, TRG_PREFS_GLOBAL, NULL);
+ g_signal_connect(G_OBJECT(w), "toggled",
+ G_CALLBACK(view_states_toggled_cb), priv->win);
+ hig_workarea_add_wide_control(t, &row, w);
+
w = trgp_check_new(dlg, _("Directory filters"), TRG_PREFS_KEY_FILTER_DIRS,
- TRG_PREFS_GLOBAL, NULL);
+ TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(dep));
g_signal_connect(G_OBJECT(w), "toggled",
G_CALLBACK(menu_bar_toggle_filter_dirs), priv->win);
hig_workarea_add_wide_control(t, &row, w);
w = trgp_check_new(dlg, _("Tracker filters"),
- TRG_PREFS_KEY_FILTER_TRACKERS, TRG_PREFS_GLOBAL, NULL);
+ TRG_PREFS_KEY_FILTER_TRACKERS, TRG_PREFS_GLOBAL, GTK_TOGGLE_BUTTON(dep));
g_signal_connect(G_OBJECT(w), "toggled",
G_CALLBACK(toggle_filter_trackers), priv->win);
hig_workarea_add_wide_control(t, &row, w);