[nautilus-actions] Cosmetic changes in user interface management



commit d8ed22f8cb2baf807546209aa4a7e722a328a769
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Jan 29 16:55:21 2011 +0100

    Cosmetic changes in user interface management

 src/core/Makefile.am           |    6 +-
 src/core/na-settings.c         |    4 +-
 src/io-xml/naxml-reader.c      |    6 +-
 src/nact/nact-iactions-list.c  |   14 +-
 src/nact/nact-main-statusbar.c |    6 +-
 src/nact/nact-main-statusbar.h |    2 +-
 src/nact/nact-main-window.c    |  320 +++++++++++++++++++---------------------
 src/nact/nact-main-window.h    |   17 ++-
 src/nact/nact-sort-buttons.c   |   14 --
 src/nact/nact-sort-buttons.h   |    1 -
 10 files changed, 190 insertions(+), 200 deletions(-)
---
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 7aff493..6628f55 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -129,13 +129,13 @@ EXTRA_DIST = \
 	na-marshal											\
 	$(NULL)
 
+na-marshal.h: na-marshal
+	glib-genmarshal --prefix=na_cclosure_marshal --header na-marshal > $@
+
 na-marshal.c: na-marshal.h
 	echo "#include \"na-marshal.h\"" > $@
 	glib-genmarshal --prefix=na_cclosure_marshal --body na-marshal >> $@
 
-na-marshal.h: na-marshal
-	glib-genmarshal --prefix=na_cclosure_marshal --header na-marshal > $@
-
 CLEANFILES = \
 	na-marshal.c										\
 	na-marshal.h										\
diff --git a/src/core/na-settings.c b/src/core/na-settings.c
index 043ae25..711d79a 100644
--- a/src/core/na-settings.c
+++ b/src/core/na-settings.c
@@ -1170,11 +1170,11 @@ on_keyfile_changed_timeout( NASettings *settings )
 			g_free( group_prefix );
 		}
 
-		g_debug( "%s: sending signal for group=%s, key=%s", thisfn, changed->group, changed->def->key );
+		/*g_debug( "%s: sending signal for group=%s, key=%s", thisfn, changed->group, changed->def->key );
 		g_signal_emit_by_name( settings,
 				SETTINGS_SIGNAL_KEY_CHANGED,
 				g_strdup( changed->group ),
-				g_strdup( changed->def->key ), na_boxed_copy( changed->boxed ), changed->mandatory );
+				g_strdup( changed->def->key ), na_boxed_copy( changed->boxed ), changed->mandatory );*/
 	}
 
 	g_list_foreach( settings->private->content, ( GFunc ) release_key_value, NULL );
diff --git a/src/io-xml/naxml-reader.c b/src/io-xml/naxml-reader.c
index af6cd80..2051fdc 100644
--- a/src/io-xml/naxml-reader.c
+++ b/src/io-xml/naxml-reader.c
@@ -338,7 +338,7 @@ naxml_reader_import_from_uri( const NAIImporter *instance, NAIImporterImportFrom
 	code = reader_parse_xmldoc( reader );
 
 	if( code == IMPORTER_CODE_OK ){
-		g_assert( NA_IS_OBJECT_ITEM( reader->private->parms->imported ));
+		g_return_val_if_fail( NA_IS_OBJECT_ITEM( reader->private->parms->imported ), IMPORTER_CODE_PROGRAM_ERROR );
 		code = manage_import_mode( reader );
 	}
 
@@ -1377,7 +1377,9 @@ publish_undealt_nodes( NAXMLReader *reader )
 
 		if( !g_list_find( reader->private->dealt, node )){
 			text = xmlNodeGetContent( node );
-			na_core_utils_slist_add_message( &reader->private->parms->messages, WARN_UNDEALT_NODE, ( const gchar * ) text, node->line );
+			g_debug( "test=%s, line=%d", ( const gchar * ) text, node->line );
+			na_core_utils_slist_add_message(
+					&reader->private->parms->messages, WARN_UNDEALT_NODE, ( const gchar * ) text, node->line );
 			xmlFree( text );
 		}
 	}
diff --git a/src/nact/nact-iactions-list.c b/src/nact/nact-iactions-list.c
index f276ab6..24c60fd 100644
--- a/src/nact/nact-iactions-list.c
+++ b/src/nact/nact-iactions-list.c
@@ -182,7 +182,8 @@ interface_base_init( NactIActionsListInterface *klass )
 		 * selection has changed in the treeview.
 		 *
 		 * It is not just a proxy, as we add a list of currently selected
-		 * objects as user_data (see #nact_iactions_list_on_treeview_selection_changed()).
+		 * objects as signal data
+		 * (see nact_iactions_list_on_treeview_selection_changed()).
 		 *
 		 * Note that IActionsList is itself connected to this signal,
 		 * in order to convert the signal to an interface API
@@ -859,9 +860,11 @@ display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *m
 	gboolean valid = TRUE;
 	IActionsListInstanceData *ialid;
 	NAObjectItem *item;
+#if 0
 	gboolean writable_item;
 	NactApplication *application;
 	NAUpdater *updater;
+#endif
 
 	gtk_tree_model_get( model, iter, IACTIONS_LIST_NAOBJECT_COLUMN, &object, -1 );
 	g_object_unref( object );
@@ -879,10 +882,6 @@ display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *m
 		valid = na_object_is_valid( object );
 		item = NA_IS_OBJECT_PROFILE( object ) ? na_object_get_parent( object ) : NA_OBJECT_ITEM( object );
 
-		application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( instance )));
-		updater = nact_application_get_updater( application );
-		writable_item = na_updater_is_item_writable( updater, item, NULL );
-
 		if( modified ){
 			g_object_set( cell, "style", PANGO_STYLE_ITALIC, "style-set", TRUE, NULL );
 		}
@@ -891,7 +890,12 @@ display_label( GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *m
 			g_object_set( cell, "foreground", "Red", "foreground-set", TRUE, NULL );
 		}
 
+#if 0
+		application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( instance )));
+		updater = nact_application_get_updater( application );
+		writable_item = na_updater_is_item_writable( updater, item, NULL );
 		g_object_set( cell, "editable", writable_item, NULL );
+#endif
 	}
 
 	g_object_set( cell, "text", label, NULL );
diff --git a/src/nact/nact-main-statusbar.c b/src/nact/nact-main-statusbar.c
index 96cee00..d663635 100644
--- a/src/nact/nact-main-statusbar.c
+++ b/src/nact/nact-main-statusbar.c
@@ -51,15 +51,15 @@ static gboolean      display_timeout( StatusbarTimeoutDisplayStruct *stds );
 static void          display_timeout_free( StatusbarTimeoutDisplayStruct *stds );
 
 /**
- * nact_main_statusbar_initial_load_toplevel:
+ * nact_main_statusbar_initialize_gtk_toplevel:
  * @window: the #NactMainWindow.
  *
  * Initial loading of the UI.
  */
 void
-nact_main_statusbar_initial_load_toplevel( NactMainWindow *window )
+nact_main_statusbar_initialize_gtk_toplevel( NactMainWindow *window )
 {
-	static const gchar *thisfn = "nact_main_statusbar_initial_load_toplevel";
+	static const gchar *thisfn = "nact_main_statusbar_initialize_gtk_toplevel";
 	gint width, height;
 	GtkStatusbar *bar;
 	GtkFrame *frame;
diff --git a/src/nact/nact-main-statusbar.h b/src/nact/nact-main-statusbar.h
index 56b20df..8a17889 100644
--- a/src/nact/nact-main-statusbar.h
+++ b/src/nact/nact-main-statusbar.h
@@ -41,7 +41,7 @@
 
 G_BEGIN_DECLS
 
-void  nact_main_statusbar_initial_load_toplevel( NactMainWindow *window );
+void  nact_main_statusbar_initialize_gtk_toplevel( NactMainWindow *window );
 
 void  nact_main_statusbar_display_status( NactMainWindow *window, const gchar *context, const gchar *status );
 void  nact_main_statusbar_display_with_timeout( NactMainWindow *window, const gchar *context, const gchar *status );
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 3a9b482..5be793f 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -105,6 +105,10 @@ struct _NactMainWindowPrivate {
 	 * Can be null if @selected_item is a menu, or an action with more
 	 * than one profile and action is selected, or an action without
 	 * any profile, or the list is empty, or in case of multiple selection.
+	 *
+	 * In other words, it is not null if:
+	 * a) a profile is selected,
+	 * b) an action is selected and it has exactly one profile.
 	 */
 	NAObjectProfile *selected_profile;
 
@@ -162,13 +166,13 @@ static void     instance_set_property( GObject *object, guint property_id, const
 static void     instance_dispose( GObject *application );
 static void     instance_finalize( GObject *application );
 
-static gboolean actually_delete_item( NactMainWindow *window, NAObject *item, NAUpdater *updater, GList **not_deleted, GSList **messages );
-
-static void     on_base_initialize_gtk_toplevel( BaseWindow *window, GtkWindow *toplevel );
+static void     on_base_initialize_gtk_toplevel( NactMainWindow *window, GtkWindow *toplevel );
 static void     on_base_initialize_base_window( NactMainWindow *window );
 static gchar   *on_base_get_wsp_id( const BaseWindow *window );
 static void     on_base_all_widgets_showed( NactMainWindow *window );
 
+static gboolean actually_delete_item( NactMainWindow *window, NAObject *item, NAUpdater *updater, GList **not_deleted, GSList **messages );
+
 static gboolean base_is_willing_to_quit( const BaseWindow *window );
 
 static void     on_main_window_level_zero_order_changed( NactMainWindow *window, gpointer user_data );
@@ -384,7 +388,6 @@ class_init( NactMainWindowClass *klass )
 	klass->private = g_new0( NactMainWindowClassPrivate, 1 );
 
 	base_class = BASE_WINDOW_CLASS( klass );
-	base_class->initialize_gtk_toplevel = on_base_initialize_gtk_toplevel;
 	base_class->get_wsp_id = on_base_get_wsp_id;
 	base_class->is_willing_to_quit = base_is_willing_to_quit;
 
@@ -628,6 +631,9 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	self->private = g_new0( NactMainWindowPrivate, 1 );
 
 	base_window_signal_connect( BASE_WINDOW( instance ),
+			G_OBJECT( instance ), BASE_SIGNAL_INITIALIZE_GTK, G_CALLBACK( on_base_initialize_gtk_toplevel ));
+
+	base_window_signal_connect( BASE_WINDOW( instance ),
 			G_OBJECT( instance ), BASE_SIGNAL_INITIALIZE_WINDOW, G_CALLBACK( on_base_initialize_base_window ));
 
 	base_window_signal_connect( BASE_WINDOW( instance ),
@@ -805,6 +811,151 @@ nact_main_window_new( const NactApplication *application )
 	return( window );
 }
 
+/*
+ * note that for this NactMainWindow, on_baseinitialize_gtk_toplevel() and
+ * on_base_initialize_base_window() are roughly equivalent, as there is only
+ * one occurrence on this window in the application: closing this window
+ * is the same than quitting the application
+ */
+static void
+on_base_initialize_gtk_toplevel( NactMainWindow *window, GtkWindow *toplevel )
+{
+	static const gchar *thisfn = "nact_main_window_on_base_initialize_gtk_toplevel";
+
+	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
+
+	if( !window->private->dispose_has_run ){
+		g_debug( "%s: window=%p, toplevel=%p", thisfn, ( void * ) window, ( void * ) toplevel );
+
+		nact_iactions_list_set_management_mode( NACT_IACTIONS_LIST( window ), IACTIONS_LIST_MANAGEMENT_MODE_EDITION );
+		nact_iactions_list_initial_load_toplevel( NACT_IACTIONS_LIST( window ));
+
+		nact_iaction_tab_initial_load_toplevel( NACT_IACTION_TAB( window ));
+		nact_icommand_tab_initial_load_toplevel( NACT_ICOMMAND_TAB( window ));
+		nact_ibasenames_tab_initial_load_toplevel( NACT_IBASENAMES_TAB( window ));
+		nact_imimetypes_tab_initial_load_toplevel( NACT_IMIMETYPES_TAB( window ));
+		nact_ifolders_tab_initial_load_toplevel( NACT_IFOLDERS_TAB( window ));
+		nact_ischemes_tab_initial_load_toplevel( NACT_ISCHEMES_TAB( window ));
+		nact_icapabilities_tab_initial_load_toplevel( NACT_ICAPABILITIES_TAB( window ));
+		nact_ienvironment_tab_initial_load_toplevel( NACT_IENVIRONMENT_TAB( window ));
+		nact_iexecution_tab_initial_load_toplevel( NACT_IEXECUTION_TAB( window ));
+		nact_iproperties_tab_initial_load_toplevel( NACT_IPROPERTIES_TAB( window ));
+
+		nact_main_statusbar_initialize_gtk_toplevel( window );
+	}
+}
+
+static void
+on_base_initialize_base_window( NactMainWindow *window )
+{
+	static const gchar *thisfn = "nact_main_window_on_base_initialize_base_window";
+	NactApplication *application;
+	NAUpdater *updater;
+	NASettings *settings;
+	guint pos;
+	GtkWidget *pane;
+	GList *tree;
+
+	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
+
+	if( !window->private->dispose_has_run ){
+		g_debug( "%s: window=%p", thisfn, ( void * ) window );
+
+		application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
+		updater = nact_application_get_updater( application );
+		settings = na_pivot_get_settings( NA_PIVOT( updater ));
+
+		pos = na_settings_get_uint( settings, NA_IPREFS_MAIN_PANED, NULL, NULL );
+		if( pos ){
+			pane = base_window_get_widget( BASE_WINDOW( window ), "MainPaned" );
+			gtk_paned_set_position( GTK_PANED( pane ), pos );
+		}
+
+		window->private->clipboard = nact_clipboard_new( BASE_WINDOW( window ));
+
+		base_window_signal_connect( BASE_WINDOW( window ),
+				G_OBJECT( window ), IACTIONS_LIST_SIGNAL_SELECTION_CHANGED, G_CALLBACK( on_iactions_list_selection_changed ));
+
+		tree = na_pivot_get_items( NA_PIVOT( updater ));
+		g_debug( "%s: pivot_tree=%p", thisfn, ( void * ) tree );
+
+		nact_iaction_tab_runtime_init_toplevel( NACT_IACTION_TAB( window ));
+		nact_icommand_tab_runtime_init_toplevel( NACT_ICOMMAND_TAB( window ));
+		nact_ibasenames_tab_runtime_init_toplevel( NACT_IBASENAMES_TAB( window ));
+		nact_imimetypes_tab_runtime_init_toplevel( NACT_IMIMETYPES_TAB( window ));
+		nact_ifolders_tab_runtime_init_toplevel( NACT_IFOLDERS_TAB( window ));
+		nact_ischemes_tab_runtime_init_toplevel( NACT_ISCHEMES_TAB( window ));
+		nact_icapabilities_tab_runtime_init_toplevel( NACT_ICAPABILITIES_TAB( window ));
+		nact_ienvironment_tab_runtime_init_toplevel( NACT_IENVIRONMENT_TAB( window ));
+		nact_iexecution_tab_runtime_init_toplevel( NACT_IEXECUTION_TAB( window ));
+		nact_iproperties_tab_runtime_init_toplevel( NACT_IPROPERTIES_TAB( window ));
+
+		nact_main_menubar_runtime_init( window );
+
+		na_settings_register_key_callback( settings, NA_IPREFS_ITEMS_LIST_ORDER_MODE, G_CALLBACK( on_settings_order_mode_changed ), window );
+
+		/* fill the IActionsList at last so that all signals are connected
+		 */
+		nact_iactions_list_runtime_init_toplevel( NACT_IACTIONS_LIST( window ), tree );
+		nact_sort_buttons_runtime_init( window );
+
+		/* this to update the title when an item is modified
+		 */
+		base_window_signal_connect( BASE_WINDOW( window ),
+				G_OBJECT( window ), IACTIONS_LIST_SIGNAL_STATUS_CHANGED, G_CALLBACK( on_iactions_list_status_changed ));
+
+		base_window_signal_connect( BASE_WINDOW( window ),
+				G_OBJECT( window ), MAIN_WINDOW_SIGNAL_LEVEL_ZERO_ORDER_CHANGED, G_CALLBACK( on_main_window_level_zero_order_changed ));
+
+		nact_main_menubar_file_install_autosave( window );
+
+	}
+}
+
+static gchar *
+on_base_get_wsp_id( const BaseWindow *window )
+{
+	return( g_strdup( NA_IPREFS_MAIN_WINDOW_WSP ));
+}
+
+static void
+on_base_all_widgets_showed( NactMainWindow *window )
+{
+	static const gchar *thisfn = "nact_main_window_on_base_all_widgets_showed";
+
+	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
+	g_return_if_fail( NACT_IS_IACTIONS_LIST( window ));
+	g_return_if_fail( NACT_IS_IACTION_TAB( window ));
+	g_return_if_fail( NACT_IS_ICOMMAND_TAB( window ));
+	g_return_if_fail( NACT_IS_IBASENAMES_TAB( window ));
+	g_return_if_fail( NACT_IS_IMIMETYPES_TAB( window ));
+	g_return_if_fail( NACT_IS_IFOLDERS_TAB( window ));
+	g_return_if_fail( NACT_IS_ISCHEMES_TAB( window ));
+	g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( window ));
+	g_return_if_fail( NACT_IS_IEXECUTION_TAB( window ));
+	g_return_if_fail( NACT_IS_IPROPERTIES_TAB( window ));
+
+	if( !window->private->dispose_has_run ){
+		g_debug( "%s: window=%p", thisfn, ( void * ) window );
+
+		raz_main_properties( window );
+
+		nact_iaction_tab_all_widgets_showed( NACT_IACTION_TAB( window ));
+		nact_icommand_tab_all_widgets_showed( NACT_ICOMMAND_TAB( window ));
+		nact_ibasenames_tab_all_widgets_showed( NACT_IBASENAMES_TAB( window ));
+		nact_imimetypes_tab_all_widgets_showed( NACT_IMIMETYPES_TAB( window ));
+		nact_ifolders_tab_all_widgets_showed( NACT_IFOLDERS_TAB( window ));
+		nact_ischemes_tab_all_widgets_showed( NACT_ISCHEMES_TAB( window ));
+		nact_icapabilities_tab_all_widgets_showed( NACT_ICAPABILITIES_TAB( window ));
+		nact_ienvironment_tab_all_widgets_showed( NACT_IENVIRONMENT_TAB( window ));
+		nact_iexecution_tab_all_widgets_showed( NACT_IEXECUTION_TAB( window ));
+		nact_iproperties_tab_all_widgets_showed( NACT_IPROPERTIES_TAB( window ));
+
+		nact_iactions_list_all_widgets_showed( NACT_IACTIONS_LIST( window ));
+		nact_sort_buttons_all_widgets_showed( window );
+	}
+}
+
 /**
  * nact_main_window_get_clipboard:
  * @window: this #NactMainWindow instance.
@@ -1065,167 +1216,6 @@ actually_delete_item( NactMainWindow *window, NAObject *item, NAUpdater *updater
 	return( delete_ok );
 }
 
-/*
- * note that for this NactMainWindow, on_initial_load_toplevel and
- * on_runtime_init_toplevel are equivalent, as there is only one
- * occurrence on this window in the application : closing this window
- * is the same than quitting the application
- */
-static void
-on_base_initialize_gtk_toplevel( BaseWindow *window, GtkWindow *toplevel )
-{
-	static const gchar *thisfn = "nact_main_window_on_base_initialize_gtk_toplevel";
-	NactMainWindow *main_window;
-	gint pos;
-	GtkWidget *pane;
-	NactApplication *application;
-	NAUpdater *updater;
-	NASettings *settings;
-
-	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
-
-	main_window = NACT_MAIN_WINDOW( window );
-
-	if( !main_window->private->dispose_has_run ){
-		g_debug( "%s: window=%p, toplevel=%p", thisfn, ( void * ) window, ( void * ) toplevel );
-
-		application = NACT_APPLICATION( base_window_get_application( window ));
-		updater = nact_application_get_updater( application );
-		settings = na_pivot_get_settings( NA_PIVOT( updater ));
-
-		pos = na_settings_get_uint( settings, NA_IPREFS_MAIN_PANED, NULL, NULL );
-		if( pos ){
-			pane = base_window_get_widget( window, "MainPaned" );
-			gtk_paned_set_position( GTK_PANED( pane ), pos );
-		}
-
-		nact_iactions_list_set_management_mode( NACT_IACTIONS_LIST( window ), IACTIONS_LIST_MANAGEMENT_MODE_EDITION );
-		nact_iactions_list_initial_load_toplevel( NACT_IACTIONS_LIST( window ));
-		nact_sort_buttons_initial_load( main_window );
-
-		nact_iaction_tab_initial_load_toplevel( NACT_IACTION_TAB( window ));
-		nact_icommand_tab_initial_load_toplevel( NACT_ICOMMAND_TAB( window ));
-		nact_ibasenames_tab_initial_load_toplevel( NACT_IBASENAMES_TAB( window ));
-		nact_imimetypes_tab_initial_load_toplevel( NACT_IMIMETYPES_TAB( window ));
-		nact_ifolders_tab_initial_load_toplevel( NACT_IFOLDERS_TAB( window ));
-		nact_ischemes_tab_initial_load_toplevel( NACT_ISCHEMES_TAB( window ));
-		nact_icapabilities_tab_initial_load_toplevel( NACT_ICAPABILITIES_TAB( window ));
-		nact_ienvironment_tab_initial_load_toplevel( NACT_IENVIRONMENT_TAB( window ));
-		nact_iexecution_tab_initial_load_toplevel( NACT_IEXECUTION_TAB( window ));
-		nact_iproperties_tab_initial_load_toplevel( NACT_IPROPERTIES_TAB( window ));
-
-		nact_main_statusbar_initial_load_toplevel( main_window );
-
-		/* call parent class */
-		if( BASE_WINDOW_CLASS( st_parent_class )->initialize_gtk_toplevel ){
-			BASE_WINDOW_CLASS( st_parent_class )->initialize_gtk_toplevel( window, toplevel );
-		}
-	}
-}
-
-static void
-on_base_initialize_base_window( NactMainWindow *window )
-{
-	static const gchar *thisfn = "nact_main_window_on_base_initialize_base_window";
-	NactApplication *application;
-	NAUpdater *updater;
-	NASettings *settings;
-	GList *tree;
-
-	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
-
-	if( !window->private->dispose_has_run ){
-		g_debug( "%s: window=%p", thisfn, ( void * ) window );
-
-		window->private->clipboard = nact_clipboard_new( BASE_WINDOW( window ));
-
-		base_window_signal_connect( BASE_WINDOW( window ),
-				G_OBJECT( window ), IACTIONS_LIST_SIGNAL_SELECTION_CHANGED, G_CALLBACK( on_iactions_list_selection_changed ));
-
-		application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
-		updater = nact_application_get_updater( application );
-		settings = na_pivot_get_settings( NA_PIVOT( updater ));
-
-		tree = na_pivot_get_items( NA_PIVOT( updater ));
-		g_debug( "%s: pivot_tree=%p", thisfn, ( void * ) tree );
-
-		nact_iaction_tab_runtime_init_toplevel( NACT_IACTION_TAB( window ));
-		nact_icommand_tab_runtime_init_toplevel( NACT_ICOMMAND_TAB( window ));
-		nact_ibasenames_tab_runtime_init_toplevel( NACT_IBASENAMES_TAB( window ));
-		nact_imimetypes_tab_runtime_init_toplevel( NACT_IMIMETYPES_TAB( window ));
-		nact_ifolders_tab_runtime_init_toplevel( NACT_IFOLDERS_TAB( window ));
-		nact_ischemes_tab_runtime_init_toplevel( NACT_ISCHEMES_TAB( window ));
-		nact_icapabilities_tab_runtime_init_toplevel( NACT_ICAPABILITIES_TAB( window ));
-		nact_ienvironment_tab_runtime_init_toplevel( NACT_IENVIRONMENT_TAB( window ));
-		nact_iexecution_tab_runtime_init_toplevel( NACT_IEXECUTION_TAB( window ));
-		nact_iproperties_tab_runtime_init_toplevel( NACT_IPROPERTIES_TAB( window ));
-
-		nact_main_menubar_runtime_init( window );
-
-		na_settings_register_key_callback( settings, NA_IPREFS_ITEMS_LIST_ORDER_MODE, G_CALLBACK( on_settings_order_mode_changed ), window );
-
-		/* fill the IActionsList at last so that all signals are connected
-		 */
-		nact_iactions_list_runtime_init_toplevel( NACT_IACTIONS_LIST( window ), tree );
-		nact_sort_buttons_runtime_init( window );
-
-		/* this to update the title when an item is modified
-		 */
-		base_window_signal_connect( BASE_WINDOW( window ),
-				G_OBJECT( window ), IACTIONS_LIST_SIGNAL_STATUS_CHANGED, G_CALLBACK( on_iactions_list_status_changed ));
-
-		base_window_signal_connect( BASE_WINDOW( window ),
-				G_OBJECT( window ), MAIN_WINDOW_SIGNAL_LEVEL_ZERO_ORDER_CHANGED, G_CALLBACK( on_main_window_level_zero_order_changed ));
-
-		nact_main_menubar_file_install_autosave( window );
-
-	}
-}
-
-static gchar *
-on_base_get_wsp_id( const BaseWindow *window )
-{
-	return( g_strdup( NA_IPREFS_MAIN_WINDOW_WSP ));
-}
-
-static void
-on_base_all_widgets_showed( NactMainWindow *window )
-{
-	static const gchar *thisfn = "nact_main_window_on_base_all_widgets_showed";
-
-	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
-	g_return_if_fail( NACT_IS_IACTIONS_LIST( window ));
-	g_return_if_fail( NACT_IS_IACTION_TAB( window ));
-	g_return_if_fail( NACT_IS_ICOMMAND_TAB( window ));
-	g_return_if_fail( NACT_IS_IBASENAMES_TAB( window ));
-	g_return_if_fail( NACT_IS_IMIMETYPES_TAB( window ));
-	g_return_if_fail( NACT_IS_IFOLDERS_TAB( window ));
-	g_return_if_fail( NACT_IS_ISCHEMES_TAB( window ));
-	g_return_if_fail( NACT_IS_IENVIRONMENT_TAB( window ));
-	g_return_if_fail( NACT_IS_IEXECUTION_TAB( window ));
-	g_return_if_fail( NACT_IS_IPROPERTIES_TAB( window ));
-
-	if( !window->private->dispose_has_run ){
-		g_debug( "%s: window=%p", thisfn, ( void * ) window );
-
-		raz_main_properties( window );
-
-		nact_iaction_tab_all_widgets_showed( NACT_IACTION_TAB( window ));
-		nact_icommand_tab_all_widgets_showed( NACT_ICOMMAND_TAB( window ));
-		nact_ibasenames_tab_all_widgets_showed( NACT_IBASENAMES_TAB( window ));
-		nact_imimetypes_tab_all_widgets_showed( NACT_IMIMETYPES_TAB( window ));
-		nact_ifolders_tab_all_widgets_showed( NACT_IFOLDERS_TAB( window ));
-		nact_ischemes_tab_all_widgets_showed( NACT_ISCHEMES_TAB( window ));
-		nact_icapabilities_tab_all_widgets_showed( NACT_ICAPABILITIES_TAB( window ));
-		nact_ienvironment_tab_all_widgets_showed( NACT_IENVIRONMENT_TAB( window ));
-		nact_iexecution_tab_all_widgets_showed( NACT_IEXECUTION_TAB( window ));
-		nact_iproperties_tab_all_widgets_showed( NACT_IPROPERTIES_TAB( window ));
-
-		nact_iactions_list_all_widgets_showed( NACT_IACTIONS_LIST( window ));
-		nact_sort_buttons_all_widgets_showed( window );
-	}
-}
-
 static gboolean
 base_is_willing_to_quit( const BaseWindow *window )
 {
diff --git a/src/nact/nact-main-window.h b/src/nact/nact-main-window.h
index 815f925..c91edc6 100644
--- a/src/nact/nact-main-window.h
+++ b/src/nact/nact-main-window.h
@@ -32,11 +32,20 @@
 #define __NACT_MAIN_WINDOW_H__
 
 /**
- * SECTION: nact_main_window
- * @short_description: #NactMainWindow class definition.
- * @include: nact/nact-main-window.h
+ * SECTION: main-window
+ * @title: NactMainWindow
+ * @short_description: The Main Window class definition
+ * @include: nact-main-window.h
  *
- * This class is derived from BaseWindow and manages the main window.
+ * This class is derived from NactWindow and manages the main window.
+ *
+ * It embeds:
+ * - the menubar,
+ * - the toolbar,
+ * - a button bar with sort buttons,
+ * - the hierarchical list of items,
+ * - a notebook which displays the content of the current item,
+ * - a status bar.
  */
 
 #include <api/na-object-item.h>
diff --git a/src/nact/nact-sort-buttons.c b/src/nact/nact-sort-buttons.c
index 76e2fcb..9c3e61c 100644
--- a/src/nact/nact-sort-buttons.c
+++ b/src/nact/nact-sort-buttons.c
@@ -67,20 +67,6 @@ static ToggleGroup st_toggle_group [] = {
 };
 
 /**
- * nact_sort_buttons_initial_load:
- * @window: the #NactMainWindow.
- *
- * Initial loading of the UI. This is done only once.
- */
-void
-nact_sort_buttons_initial_load( NactMainWindow *window )
-{
-	static const gchar *thisfn = "nact_sort_buttons_initial_load";
-
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
-}
-
-/**
  * nact_sort_buttons_runtime_init:
  * @window: the #NactMainWindow.
  *
diff --git a/src/nact/nact-sort-buttons.h b/src/nact/nact-sort-buttons.h
index b7145c2..73d0426 100644
--- a/src/nact/nact-sort-buttons.h
+++ b/src/nact/nact-sort-buttons.h
@@ -41,7 +41,6 @@
 
 G_BEGIN_DECLS
 
-void  nact_sort_buttons_initial_load                 ( NactMainWindow *window );
 void  nact_sort_buttons_runtime_init                 ( NactMainWindow *window );
 void  nact_sort_buttons_all_widgets_showed           ( NactMainWindow *window );
 void  nact_sort_buttons_enable_buttons               ( NactMainWindow *window, gboolean enable );



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