[nautilus] navigation-state: bind "active" for toggle actions



commit eb9a291ad09d77cd01131209f68beaa04ef45626
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Feb 20 19:11:37 2011 -0500

    navigation-state: bind "active" for toggle actions
    
    So that we can use this objet for "Search"

 src/nautilus-navigation-state.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-navigation-state.c b/src/nautilus-navigation-state.c
index 5f3c756..af76849 100644
--- a/src/nautilus-navigation-state.c
+++ b/src/nautilus-navigation-state.c
@@ -73,6 +73,13 @@ update_bindings (NautilusNavigationState *self)
 						  slave_action, "sensitive",
 						  G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
 
+		/* bind "active" too for toggle actions */
+		if (GTK_IS_TOGGLE_ACTION (master_action)) {
+			binding = g_object_bind_property (master_action, "active",
+							  slave_action, "active",
+							  G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+		}
+
 		self->priv->active_bindings = g_list_prepend (self->priv->active_bindings, binding);
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]