[nautilus-actions] NactMatchList: fix wrong display selection



commit 7dcc9c2ae2c659e5a96bf753bbc75bb6fd7e3cd8
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Mar 4 07:34:55 2012 +0100

    NactMatchList: fix wrong display selection
    
    The NactMatchList pseudo-interface used to connect to selection-changed from its initialization code
    instead of from the base windows initialization callback.

 ChangeLog                  |    4 ++++
 src/nact/nact-match-list.c |   14 +++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 728e744..4f0a093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-03-04 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-match-list.c (initialize_pseudo_iface): Fix bad display of
+	the current selection (selection-changed callback has to be connected from
+	window initialization code).
+
 	* src/core/na-icontext.c (is_candidate_for_folders): Improve code
 	readability.
 
diff --git a/src/nact/nact-match-list.c b/src/nact/nact-match-list.c
index 5617300..0d9b4eb 100644
--- a/src/nact/nact-match-list.c
+++ b/src/nact/nact-match-list.c
@@ -206,13 +206,6 @@ initialize_pseudo_iface( MatchListData *data )
 			G_CALLBACK( on_base_initialize_window ),
 			data );
 
-	base_window_signal_connect_with_data(
-			data->window,
-			G_OBJECT( data->window ),
-			MAIN_SIGNAL_SELECTION_CHANGED,
-			G_CALLBACK( on_main_selection_changed ),
-			data );
-
 	g_object_weak_ref( G_OBJECT( data->window ), ( GWeakNotify ) on_instance_finalized, data );
 }
 
@@ -379,6 +372,13 @@ on_base_initialize_window( BaseWindow *window, MatchListData *data )
 
 	column = gtk_tree_view_get_column( data->listview, ITEM_COLUMN );
 	sort_on_column( column, data, ITEM_COLUMN );
+
+	base_window_signal_connect_with_data(
+			window,
+			G_OBJECT( window ),
+			MAIN_SIGNAL_SELECTION_CHANGED,
+			G_CALLBACK( on_main_selection_changed ),
+			data );
 }
 
 /*



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