[nautilus-actions: 2/4] More on default schemes



commit 79431988f207f37fe605d0bdd6373bac05c48c79
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Jan 7 19:57:46 2010 +0100

    More on default schemes

 TODO                                            |    1 -
 nautilus-actions/io-provider-gconf/nagp-read.c  |    8 +++-----
 nautilus-actions/nact/nact-iadvanced-tab.c      |    4 +++-
 nautilus-actions/nact/nact-preferences-editor.c |   11 +++++++++++
 4 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/TODO b/TODO
index 7fdf505..0e59e38 100644
--- a/TODO
+++ b/TODO
@@ -107,7 +107,6 @@
   > remove in n-a-n
   > remove in action class
 
-<<<<<<< HEAD
 - optim: what about between base_builder_instance_init and
   base_application_v_initialize_default_icon ?
 
diff --git a/nautilus-actions/io-provider-gconf/nagp-read.c b/nautilus-actions/io-provider-gconf/nagp-read.c
index 89a7958..a35be49 100644
--- a/nautilus-actions/io-provider-gconf/nagp-read.c
+++ b/nautilus-actions/io-provider-gconf/nagp-read.c
@@ -53,9 +53,9 @@ static void           read_item_menu( NagpGConfProvider *provider, const gchar *
 static void           read_item_menu_properties( NagpGConfProvider *provider, GSList *entries, NAObjectMenu *menu );
 static void           read_object_item_properties( NagpGConfProvider *provider, GSList *entries, NAObjectItem *item );
 
-static gboolean       is_key_writable( NagpGConfProvider *gconf, const gchar *key );
 static GSList        *get_subdirs( GConfClient *gconf, const gchar *path );
 static void           free_subdirs( GSList *subdirs );
+static gboolean       is_key_writable( NagpGConfProvider *gconf, const gchar *key );
 static gboolean       has_entry( GConfClient *gconf, const gchar *path, const gchar *entry );
 static GSList        *remove_from_gslist( GSList *list, const gchar *str );
 static void           free_gslist( GSList *list );
@@ -477,17 +477,15 @@ is_key_writable( NagpGConfProvider *gconf, const gchar *key )
  * @gconf: a  #GConfClient instance.
  * @path: a full path to be readen.
  *
- * Loads the subdirs of the given path.
- *
  * Returns: a GSList of full path subdirectories.
  *
- * The returned list should be free_subdirs() by the
+ * The returned list should be na_gconf_utils_free_subdirs() by the
  * caller.
  */
 static GSList *
 get_subdirs( GConfClient *gconf, const gchar *path )
 {
-	static const gchar *thisfn = "get_subdirs";
+	static const gchar *thisfn = "nagp_read_get_subdirs";
 	GError *error = NULL;
 	GSList *list_subdirs;
 
diff --git a/nautilus-actions/nact/nact-iadvanced-tab.c b/nautilus-actions/nact/nact-iadvanced-tab.c
index c197877..498102c 100644
--- a/nautilus-actions/nact/nact-iadvanced-tab.c
+++ b/nautilus-actions/nact/nact-iadvanced-tab.c
@@ -139,7 +139,7 @@ nact_iadvanced_tab_initial_load_toplevel( NactIAdvancedTab *instance )
 		g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
 		g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
 
-		nact_schemes_list_create_model( get_schemes_tree_view( instance ));
+		nact_schemes_list_create_model( get_schemes_tree_view( instance ), TRUE );
 	}
 }
 
@@ -170,6 +170,7 @@ runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview
 		g_debug( "%s: instance=%p, listview=%p", thisfn, ( void * ) instance, ( void * ) listview );
 		g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
 
+#if 0
 		column = gtk_tree_view_get_column( listview, SCHEMES_CHECKBOX_COLUMN );
 		renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
 		base_window_signal_connect(
@@ -213,6 +214,7 @@ runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview
 				G_OBJECT( gtk_tree_view_get_selection( listview )),
 				"changed",
 				G_CALLBACK( on_scheme_list_selection_changed ));
+#endif
 
 		base_window_signal_connect(
 				BASE_WINDOW( instance ),
diff --git a/nautilus-actions/nact/nact-preferences-editor.c b/nautilus-actions/nact/nact-preferences-editor.c
index 14f86c4..bc91e3a 100644
--- a/nautilus-actions/nact/nact-preferences-editor.c
+++ b/nautilus-actions/nact/nact-preferences-editor.c
@@ -38,6 +38,7 @@
 
 #include "base-iprefs.h"
 #include "nact-application.h"
+#include "nact-schemes-list.h"
 #include "nact-preferences-editor.h"
 
 /* private class data
@@ -263,9 +264,13 @@ static void
 on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data )
 {
 	static const gchar *thisfn = "nact_preferences_editor_on_initial_load_dialog";
+	GtkTreeView *listview;
 
 	g_debug( "%s: editor=%p, user_data=%p", thisfn, ( void * ) editor, ( void * ) user_data );
 	g_return_if_fail( NACT_IS_PREFERENCES_EDITOR( editor ));
+
+	listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( editor ), "SchemesTreeView" ));
+	nact_schemes_list_create_model( listview, FALSE );
 }
 
 static void
@@ -281,6 +286,7 @@ on_base_runtime_init_dialog( NactPreferencesEditor *editor, gpointer user_data )
 	gint import_mode, export_format;
 	GtkWidget *button;
 	gboolean esc_quit, esc_confirm;
+	GtkTreeView *listview;
 
 	g_debug( "%s: editor=%p, user_data=%p", thisfn, ( void * ) editor, ( void * ) user_data );
 
@@ -389,6 +395,11 @@ on_base_runtime_init_dialog( NactPreferencesEditor *editor, gpointer user_data )
 	}
 	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( button ), TRUE );
 
+	/* fifth tab: default schemes
+	 */
+	listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( editor ), "SchemesTreeView" ));
+	nact_schemes_list_init_view( listview, BASE_WINDOW( editor ));
+
 	base_window_signal_connect_by_name(
 			BASE_WINDOW( editor ),
 			"CancelButton",



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