[Xfce4-commits] <xfce4-indicator-plugin:master> Hiding one of "hidden"/"visible" columns to minimize confusion.
Andrzej
noreply at xfce.org
Thu Apr 4 17:44:27 CEST 2013
Updating branch refs/heads/master
to 346cfe1ab16173fc0c5fe13a23c144a94f99239e (commit)
from b552265a8ed94468d24f6eeb387a2a7b762cc94c (commit)
commit 346cfe1ab16173fc0c5fe13a23c144a94f99239e
Author: Andrzej <ndrwrdck at gmail.com>
Date: Wed Mar 13 01:16:13 2013 +0000
Hiding one of "hidden"/"visible" columns to minimize confusion.
panel-plugin/indicator-dialog.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/indicator-dialog.c b/panel-plugin/indicator-dialog.c
index d4740fe..7422231 100644
--- a/panel-plugin/indicator-dialog.c
+++ b/panel-plugin/indicator-dialog.c
@@ -259,6 +259,32 @@ indicator_dialog_visible_toggled (GtkCellRendererToggle *renderer,
static void
+indicator_dialog_mode_whitelist_toggled (GtkCheckButton *check_box,
+ IndicatorDialog *dialog)
+{
+ GtkTreeViewColumn *column_visible, *column_hidden;
+ GObject *treeview;
+ gboolean mode_whitelist;
+
+ g_return_if_fail (GTK_IS_CHECK_BUTTON (check_box));
+ g_return_if_fail (XFCE_IS_INDICATOR_DIALOG (dialog));
+
+ mode_whitelist = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_box));
+
+ treeview = gtk_builder_get_object (GTK_BUILDER (dialog), "indicators-treeview");
+ g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
+
+ column_visible = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), COLUMN_VISIBLE);
+ column_hidden = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), COLUMN_HIDDEN);
+
+ gtk_tree_view_column_set_visible (column_visible, mode_whitelist);
+ gtk_tree_view_column_set_visible (column_hidden, !mode_whitelist);
+}
+
+
+
+
+static void
indicator_dialog_swap_rows (IndicatorDialog *dialog,
GtkTreeIter *iter_prev,
GtkTreeIter *iter)
@@ -445,6 +471,9 @@ indicator_dialog_build (IndicatorDialog *dialog)
g_return_if_fail (GTK_IS_WIDGET (object));
exo_mutual_binding_new (G_OBJECT (dialog->config), "mode-whitelist",
G_OBJECT (object), "active");
+ g_signal_connect (G_OBJECT (object), "toggled",
+ G_CALLBACK (indicator_dialog_mode_whitelist_toggled), dialog);
+ indicator_dialog_mode_whitelist_toggled (GTK_CHECK_BUTTON (object), dialog);
dialog->store = gtk_builder_get_object (builder, "indicators-store");
g_return_if_fail (GTK_IS_LIST_STORE (dialog->store));
More information about the Xfce4-commits
mailing list