[nautilus-actions] NactMainWindow: rather connect to signals when initializing the BaseWindow



commit a2ddd04e89acd649c6d6a5b46eae90358e9c8657
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Feb 14 06:49:21 2012 +0100

    NactMainWindow: rather connect to signals when initializing the BaseWindow

 ChangeLog                   |    6 ++++++
 src/nact/nact-main-window.c |   26 ++++++++++++++------------
 2 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 72b39f6..44e322e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-02-14 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-main-window.c
+	(on_base_initialize_gtk, on_base_initialize_window): Move connections to
+	the signals when initializing window; this is not a big difference as the
+	main window is the only window of its class, but does the right thing in
+	the right place.
+
 	* src/core/na-object-item.c
 	(na_object_item_copyref_items, na_object_item_free_items):
 	Improve debug messages.
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 1afcd85..eb2e537 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -868,18 +868,6 @@ on_base_initialize_gtk( NactMainWindow *window, GtkWindow *toplevel, gpointer us
 				"ActionsList",
 				TREE_MODE_EDITION );
 
-		base_window_signal_connect(
-				BASE_WINDOW( window ),
-				G_OBJECT( window ),
-				TREE_SIGNAL_SELECTION_CHANGED,
-				G_CALLBACK( on_tree_view_selection_changed ));
-
-		base_window_signal_connect(
-				BASE_WINDOW( window ),
-				G_OBJECT( window ),
-				TREE_SIGNAL_MODIFIED_STATUS_CHANGED,
-				G_CALLBACK( on_tree_view_modified_status_changed ));
-
 		nact_main_statusbar_initialize_gtk_toplevel( window );
 
 		/* enable popup menu on  the notebook
@@ -931,6 +919,20 @@ on_base_initialize_window( NactMainWindow *window, gpointer user_data )
 				BASE_SIGNAL_QUIT_REQUESTED,
 				G_CALLBACK( on_base_quit_requested ));
 
+		/* connect to treeview signals
+		 */
+		base_window_signal_connect(
+				BASE_WINDOW( window ),
+				G_OBJECT( window ),
+				TREE_SIGNAL_SELECTION_CHANGED,
+				G_CALLBACK( on_tree_view_selection_changed ));
+
+		base_window_signal_connect(
+				BASE_WINDOW( window ),
+				G_OBJECT( window ),
+				TREE_SIGNAL_MODIFIED_STATUS_CHANGED,
+				G_CALLBACK( on_tree_view_modified_status_changed ));
+
 		/* restore the notebook tabs position
 		 */
 		pos = na_iprefs_get_tabs_pos( NULL );



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