[nautilus-actions] Fix import and export assistants



commit fb637f9fdb8003cc2db78a1211b079ef3d7dd3e0
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Mar 3 21:10:44 2010 +0100

    Fix import and export assistants

 ChangeLog                                |   34 +++++
 TODO                                     |    6 +
 src/api/na-core-utils.h                  |    1 +
 src/api/na-iexporter.h                   |   10 +-
 src/core/na-core-utils.c                 |   41 ++++++
 src/core/na-export-format.c              |   26 +----
 src/core/na-export-format.h              |    3 +-
 src/io-xml/naxml-formats.c               |   31 +++--
 src/nact/base-window.c                   |    8 +-
 src/nact/nact-assistant-export.c         |   48 ++++---
 src/nact/nact-assistant-export.ui        |  101 ++++++++------
 src/nact/nact-assistant-import.c         |   17 ++-
 src/nact/nact-clipboard.c                |    1 +
 src/nact/nact-export-ask.c               |   20 ++--
 src/nact/nact-export-format.c            |  229 ++++++++---------------------
 src/nact/nact-export-format.h            |   10 +-
 src/nact/nact-iprefs.h                   |    1 -
 src/nact/nact-preferences-editor.c       |    7 +-
 src/nact/nautilus-actions-config-tool.ui |   85 +++++++++---
 19 files changed, 361 insertions(+), 318 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c1862e8..c37b89c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,40 @@
 2009-03-03 Pierre Wieser <pwieser trychlos org>
 
 	* src/api/na-core-utils.h:
+	* src/core/na-core-utils.c
+	(na_core_utils_str_remove_char): New function.
+
+	* src/api/na-iexporter.h:
+	Onlu reference one short label in NAIExporterFormat structure.
+
+	* src/core/na-export-format.c:
+	* src/core/na-export-format.h:
+	* src/io-xml/naxml-formats.c: Updated accordingly.
+
+	* src/nact/base-window.c (setup_builder):
+	Display a dialog error when unable to load a XML definition.
+
+	* src/nact/nact-assistant-export.c:
+	* src/nact/nact-assistant-export.ui:
+	* src/nact/nact-assistant-import.c:
+	Adjust the display to be more funny.
+
+	* src/nact/nact-clipboard.c:
+	Add na-export-format.h include file.
+
+	* src/nact/nact-export-ask.c:
+	* src/nact/nact-export-format.c:
+	* src/nact/nact-export-format.h:
+	Reference the NAExportFormat object instead of each and every label.
+
+	* src/nact/nact-iprefs.h:
+	Remove IPREFS_EXPORT_FORMAT_ASK definition.
+
+	* src/nact/nact-preferences-editor.c:
+	* src/nact/nautilus-actions-config-tool.ui:
+	Use (renamed) nact_export_format_init_display() function.
+
+	* src/api/na-core-utils.h:
 	* src/core/na-core-utils.c (na_core_utils_file_exists):
 	New function.
 
diff --git a/TODO b/TODO
index 38fcb01..a55af43 100644
--- a/TODO
+++ b/TODO
@@ -163,3 +163,9 @@
   and icon may be a path -> so what to do with this ?
 
 - get_xds_atom_value: test on 64bit platform, then remove debug stuff
+
+- add a trace on g_object_weak_ref
+
+- on export assistant, select and expand first row
+
+- on export assistant, display subitems of selected menus
diff --git a/src/api/na-core-utils.h b/src/api/na-core-utils.h
index 13fd61d..f5f141c 100644
--- a/src/api/na-core-utils.h
+++ b/src/api/na-core-utils.h
@@ -49,6 +49,7 @@ gboolean na_core_utils_boolean_from_string( const gchar *string );
  */
 gchar   *na_core_utils_str_add_prefix( const gchar *prefix, const gchar *str );
 gchar   *na_core_utils_str_get_first_word( const gchar *string );
+gchar   *na_core_utils_str_remove_char( const gchar *string, const gchar *to_remove );
 gchar   *na_core_utils_str_remove_suffix( const gchar *string, const gchar *suffix );
 
 /* some functions to get or set GSList list of strings
diff --git a/src/api/na-iexporter.h b/src/api/na-iexporter.h
index f49277b..abeece8 100644
--- a/src/api/na-iexporter.h
+++ b/src/api/na-iexporter.h
@@ -59,18 +59,18 @@ typedef struct NAIExporterInterfacePrivate NAIExporterInterfacePrivate;
 /* When listing available export formats, the instance returns a GList
  * of these structures.
  * This structure must be implemented by each #NAIExporter implementation
- * (see e.g. io-xml/naxml-provider.c)
+ * (see e.g. io-xml/naxml-formats.c)
  */
 typedef struct {
 	gchar *format;					/* format identifier (ascii) */
-	gchar *dlg_label;				/* label to be displayed in the NactExportAsk dialog (UTF-8 locale) */
-	gchar *wnd_label;				/* short label to be displayed in the UI (UTF-8 locale) */
-	gchar *description;				/* full description of the format (UTF-8 locale) */
+	gchar *label;					/* short label to be displayed in dialog (UTF-8 localized) */
+	gchar *description;				/* full description of the format (UTF-8 localized)
+									 * mainly used in the export assistant */
 }
 	NAIExporterFormat;
 
 typedef struct {
-	GTypeInterface             parent;
+	GTypeInterface               parent;
 	NAIExporterInterfacePrivate *private;
 
 	/**
diff --git a/src/core/na-core-utils.c b/src/core/na-core-utils.c
index 9250275..700e386 100644
--- a/src/core/na-core-utils.c
+++ b/src/core/na-core-utils.c
@@ -116,6 +116,47 @@ na_core_utils_str_get_first_word( const gchar *string )
 }
 
 /**
+ * na_core_utils_str_remove_char:
+ * @string: source string.
+ * @to_remove: the character to remove.
+ *
+ * Returns: a newly allocated string, which is a copy of the source @string,
+ * minus all the found occurrences of the given @to_remove char.
+ *
+ * The returned string should be g_free() by the caller.
+ */
+gchar *
+na_core_utils_str_remove_char( const gchar *string, const gchar *to_remove )
+{
+	static const gchar *thisfn = "na_core_utils_str_remove_char";
+	gchar *removed;
+	GRegex *regex;
+	GError *error;
+
+	removed = g_strdup( string );
+
+	if( g_utf8_validate( string, -1, NULL )){
+
+		error = NULL;
+		regex = g_regex_new( to_remove, 0, 0, &error );
+		if( error ){
+			g_warning( "%s [g_regex_new] %s", thisfn, error->message );
+			g_error_free( error );
+
+		} else {
+			g_free( removed );
+			removed = g_regex_replace_literal( regex, string, -1, 0, "", 0, &error );
+			if( error ){
+				g_warning( "%s [g_regex_replace_literal] %s", thisfn, error->message );
+				g_error_free( error );
+			}
+		}
+	}
+
+	return( removed );
+}
+
+/**
  * na_core_utils_str_remove_suffix:
  * @string: source string.
  * @suffix: suffix to be removed from @string.
diff --git a/src/core/na-export-format.c b/src/core/na-export-format.c
index 338be01..73d1a2e 100644
--- a/src/core/na-export-format.c
+++ b/src/core/na-export-format.c
@@ -235,30 +235,6 @@ na_export_format_get_id( const NAExportFormat *format )
 }
 
 /**
- * na_export_format_get_ask_label:
- * @format: this #NAExportFormat object.
- *
- * Returns: the UTF-8 localizable label of the format, as a newly
- * allocated string which should be g_free() by the caller.
- */
-gchar *
-na_export_format_get_ask_label( const NAExportFormat *format )
-{
-	gchar *label;
-
-	g_return_val_if_fail( NA_IS_EXPORT_FORMAT( format ), NULL );
-
-	label = NULL;
-
-	if( !format->private->dispose_has_run ){
-
-		label = g_strdup( format->private->str->dlg_label );
-	}
-
-	return( label );
-}
-
-/**
  * na_export_format_get_label:
  * @format: this #NAExportFormat object.
  *
@@ -276,7 +252,7 @@ na_export_format_get_label( const NAExportFormat *format )
 
 	if( !format->private->dispose_has_run ){
 
-		label = g_strdup( format->private->str->wnd_label );
+		label = g_strdup( format->private->str->label );
 	}
 
 	return( label );
diff --git a/src/core/na-export-format.h b/src/core/na-export-format.h
index 756e941..e6ddad3 100644
--- a/src/core/na-export-format.h
+++ b/src/core/na-export-format.h
@@ -64,13 +64,14 @@ typedef struct {
 }
 	NAExportFormatClass;
 
+#define IPREFS_EXPORT_FORMAT_ASK		g_quark_from_static_string( "Ask" )
+
 GType           na_export_format_get_type( void );
 
 NAExportFormat *na_export_format_new( const NAIExporterFormat *format, const NAIExporter *exporter );
 
 GQuark          na_export_format_get_quark      ( const NAExportFormat *format );
 gchar          *na_export_format_get_id         ( const NAExportFormat *format );
-gchar          *na_export_format_get_ask_label  ( const NAExportFormat *format );
 gchar          *na_export_format_get_label      ( const NAExportFormat *format );
 gchar          *na_export_format_get_description( const NAExportFormat *format );
 NAIExporter    *na_export_format_get_exporter   ( const NAExportFormat *format );
diff --git a/src/io-xml/naxml-formats.c b/src/io-xml/naxml-formats.c
index 493315b..519fafb 100644
--- a/src/io-xml/naxml-formats.c
+++ b/src/io-xml/naxml-formats.c
@@ -45,10 +45,9 @@ NAIExporterFormat naxml_formats[] = {
 	 * (historical format up to v1.10.x serie)
 	 */
 	{ NAXML_FORMAT_GCONF_SCHEMA_V1,
-			N_( "Export as a full GConf schema (v_1) file" ),
-			N_( "Export as a GConf schema file with full key descriptions" ),
-			N_( "This used to be the historical export format. " \
-				"The exported file may later be imported via :\n" \
+			N_( "Export as a _full GConf schema file" ),
+			N_( "This used to be the historical export format.\n" \
+				"The exported schema file may later be imported via :\n" \
 				"- Import assistant of the Nautilus Actions Configuration Tool,\n" \
 				"- or via the gconftool-2 --import-schema-file command-line tool." ) },
 
@@ -56,9 +55,12 @@ NAIExporterFormat naxml_formats[] = {
 	 * (no owner, no short nor long descriptions) - introduced in v 1.11
 	 */
 	{ NAXML_FORMAT_GCONF_SCHEMA_V2,
-			N_( "Export as a light GConf _schema (v2) file" ),
-			N_( "Export as a light GConf schema file" ),
-			N_( "The exported file may later be imported via :\n" \
+			N_( "Export as a _light GConf schema (v2) file" ),
+			N_( "This format has been introduced in v 1.11 serie.\n" \
+				"This is the lightest schema still compatible with GConf command-line tools,\n" \
+				"while keeping backward compatibility with older Nautilus Actions Configuration " \
+				"Tool versions.\n"
+				"The exported schema file may later be imported via :\n" \
 				"- Import assistant of the Nautilus Actions Configuration Tool,\n" \
 				"- or via the gconftool-2 --import-schema-file command-line tool." ) },
 
@@ -66,12 +68,15 @@ NAIExporterFormat naxml_formats[] = {
 	 * introduced in v 1.11
 	 */
 	{ NAXML_FORMAT_GCONF_ENTRY,
-			N_( "Export as a GConf _entry file" ),
-			N_( "Export as a GConf entry file" ),
-			N_( "This should be the preferred format for newly exported actions.\n" \
-				"The exported file may later be imported via :\n" \
-				"- Import assistant of the Nautilus Actions Configuration Tool,\n" \
+			N_( "Export as a GConf _dump file" ),
+			N_( "This format has been introduced in v 1.11 serie, " \
+				"and should be the preferred format for newly exported items.\n" \
+				"It is not backward compatible with previous Nautilus Actions " \
+				"Configuration Tool versions,\n" \
+				"though it may still be imported via standard GConf command-line tools.\n" \
+				"The exported dump file may later be imported via :\n" \
+				"- Import assistant of a compatible Nautilus Actions Configuration Tool,\n" \
 				"- or via the gconftool-2 --load command-line tool." ) },
 
-	{ NULL, NULL, NULL }
+	{ NULL }
 };
diff --git a/src/nact/base-window.c b/src/nact/base-window.c
index 166ff0c..1f0c673 100644
--- a/src/nact/base-window.c
+++ b/src/nact/base-window.c
@@ -1269,6 +1269,7 @@ setup_builder( BaseWindow *window )
 	BaseApplication *application;
 	gchar *fname;
 	GError *error = NULL;
+	gchar *msg;
 
 	if( window->private->has_own_builder ){
 		window->private->builder = base_builder_new();
@@ -1279,11 +1280,15 @@ setup_builder( BaseWindow *window )
 	}
 
 	fname = v_get_ui_filename( window );
+
 	if( fname && strlen( fname )){
 		if( !base_builder_add_from_file( window->private->builder, fname, &error )){
-			g_warning( "%s: unable to load %s UI XML definition: %s", thisfn, fname, error->message );
+			msg = g_strdup_printf( _( "Unable to load %s UI XML definition: %s" ), fname, error->message );
+			base_window_error_dlg( window, GTK_MESSAGE_WARNING, thisfn, msg );
+			g_free( msg );
 			g_error_free( error );
 		}
+
 		g_free( fname );
 	}
 }
@@ -1294,6 +1299,7 @@ base_window_error_dlg( const BaseWindow *window, GtkMessageType type, const gcha
 	g_return_if_fail( BASE_IS_WINDOW( window ));
 
 	if( !window->private->dispose_has_run ){
+
 		base_application_error_dlg( window->private->application, type, primary, secondary );
 	}
 }
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index 24247b7..5bb56ab 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -127,7 +127,7 @@ static void            on_folder_selection_changed( GtkFileChooser *chooser, gpo
 
 static void            assist_initial_load_format( NactAssistantExport *window, GtkAssistant *assistant );
 static void            assist_runtime_init_format( NactAssistantExport *window, GtkAssistant *assistant );
-static GQuark          get_export_format( NactAssistantExport *window );
+static NAExportFormat *get_export_format( NactAssistantExport *window );
 
 static void            assist_initial_load_confirm( NactAssistantExport *window, GtkAssistant *assistant );
 static void            assist_runtime_init_confirm( NactAssistantExport *window, GtkAssistant *assistant );
@@ -564,7 +564,7 @@ assist_initial_load_format( NactAssistantExport *window, GtkAssistant *assistant
 	application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( window )));
 	updater = nact_application_get_updater( application );
 	container = base_window_get_widget( BASE_WINDOW( window ), "AssistantExportFormatVBox" );
-	nact_export_format_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_ASSISTANT );
+	nact_export_format_init_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_ASSISTANT );
 }
 
 static void
@@ -582,11 +582,11 @@ assist_runtime_init_format( NactAssistantExport *window, GtkAssistant *assistant
 	gtk_assistant_set_page_complete( assistant, content, TRUE );
 }
 
-static GQuark
+static NAExportFormat *
 get_export_format( NactAssistantExport *window )
 {
 	GtkWidget *container;
-	GQuark format;
+	NAExportFormat *format;
 
 	container = base_window_get_widget( BASE_WINDOW( window ), "AssistantExportFormatVBox" );
 	format = nact_export_format_get_selected( container );
@@ -640,17 +640,18 @@ static void
 assist_prepare_confirm( NactAssistantExport *window, GtkAssistant *assistant, GtkWidget *page )
 {
 	static const gchar *thisfn = "nact_assistant_export_prepare_confirm";
-	GtkWidget *container;
 	gchar *text, *tmp, *text2;
-	gchar *label1, *label2, *label3;
+	gchar *label11, *label12;
+	gchar *label21, *label22;
 	GList *actions, *ia;
-	gint format;
+	NAExportFormat *format;
+	GtkLabel *confirm_label;
 
 	g_debug( "%s: window=%p, assistant=%p, page=%p",
 			thisfn, ( void * ) window, ( void * ) assistant, ( void * ) page );
 
 	/* i18n: this is the title of the confirm page of the export assistant */
-	text = g_strdup( _( "About to export selected actions:" ));
+	text = g_strdup( _( "About to export selected items:" ));
 	tmp = g_strdup_printf( "<b>%s</b>\n\n", text );
 	g_free( text );
 	text = tmp;
@@ -674,23 +675,24 @@ assist_prepare_confirm( NactAssistantExport *window, GtkAssistant *assistant, Gt
 	g_free( text );
 	text = tmp;
 
-	label1 = NULL;
-	label2 = NULL;
+	label11 = NULL;
+	label21 = NULL;
 	format = get_export_format( window );
-	container = base_window_get_widget( BASE_WINDOW( window ), "AssistantExportFormatVBox" );
-	label1 = nact_export_format_get_label( container, format );
-	label2 = nact_export_format_get_description( container, format );
-	nact_iprefs_set_export_format( BASE_WINDOW( window ), IPREFS_EXPORT_FORMAT, format );
-
-	label3 = na_core_utils_str_add_prefix( "\t", label2 );
-	tmp = g_strdup_printf( "%s\n\n<b>%s</b>\n\n%s", text, label1, label3 );
-	g_free( label3 );
-	g_free( label2 );
-	g_free( label1 );
+	label11 = na_export_format_get_label( format );
+	label21 = na_export_format_get_description( format );
+	nact_iprefs_set_export_format( BASE_WINDOW( window ), IPREFS_EXPORT_FORMAT, na_export_format_get_quark( format ));
+	label12 = na_core_utils_str_remove_char( label11, "_" );
+	label22 = na_core_utils_str_add_prefix( "\t", label21 );
+	tmp = g_strdup_printf( "%s\n\n<b>%s</b>\n\n%s", text, label12, label22 );
+	g_free( label22 );
+	g_free( label21 );
+	g_free( label12 );
+	g_free( label11 );
 	g_free( text );
 	text = tmp;
 
-	gtk_label_set_markup( GTK_LABEL( page ), text );
+	confirm_label = GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "AssistantExportConfirmLabel" ));
+	gtk_label_set_markup( confirm_label, text );
 	g_free( text );
 
 	gtk_assistant_set_page_complete( assistant, page, TRUE );
@@ -753,6 +755,7 @@ assist_prepare_exportdone( NactAssistantExport *window, GtkAssistant *assistant,
 	gchar *label;
 	GSList *is;
 	gint errors;
+	GtkLabel *summary_label;
 
 	g_debug( "%s: window=%p, assistant=%p, page=%p",
 			thisfn, ( void * ) window, ( void * ) assistant, ( void * ) page );
@@ -804,7 +807,8 @@ assist_prepare_exportdone( NactAssistantExport *window, GtkAssistant *assistant,
 		text = tmp;
 	}
 
-	gtk_label_set_markup( GTK_LABEL( page ), text );
+	summary_label = GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "AssistantExportSummaryLabel" ));
+	gtk_label_set_markup( summary_label, text );
 	g_free( text );
 
 	gtk_assistant_set_page_complete( assistant, page, TRUE );
diff --git a/src/nact/nact-assistant-export.ui b/src/nact/nact-assistant-export.ui
index 1b4b358..c7ff43c 100644
--- a/src/nact/nact-assistant-export.ui
+++ b/src/nact/nact-assistant-export.ui
@@ -10,12 +10,6 @@
     <property name="modal">True</property>
     <property name="type_hint">dialog</property>
     <child>
-      <placeholder/>
-    </child>
-    <child>
-      <placeholder/>
-    </child>
-    <child>
       <object class="GtkLabel" id="label20">
         <property name="visible">True</property>
         <property name="label" translatable="yes">This assistant will guide you through the process of exporting actions.</property>
@@ -94,10 +88,10 @@ to extend a selection.</property>
         <child>
           <object class="GtkFileChooserWidget" id="ExportFolderChooser">
             <property name="visible">True</property>
-            <property name="use_preview_label">False</property>
             <property name="local_only">False</property>
             <property name="preview_widget_active">False</property>
             <property name="action">select-folder</property>
+            <property name="use_preview_label">False</property>
           </object>
           <packing>
             <property name="position">0</property>
@@ -115,80 +109,105 @@ to extend a selection.</property>
         <property name="orientation">vertical</property>
         <property name="spacing">10</property>
         <child>
-          <placeholder/>
-        </child>
-        <child>
-          <object class="GtkVBox" id="AssistantExportFormatVBox">
+          <object class="GtkVBox" id="vbox2">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
+            <property name="spacing">10</property>
             <child>
-              <object class="GtkRadioButton" id="ExportAskButton">
-                <property name="label" translatable="yes">Ask me</property>
+              <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">You will be asked each time an action is about to be exported.</property>
                 <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">ExportSchemaV1Button</property>
+                <property name="ypad">10</property>
+                <property name="label" translatable="yes">&lt;b&gt;Which format should I use when exporting these items ?&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkVBox" id="AssistantExportFormatVBox">
                 <property name="visible">True</property>
-                <child>
-                  <object class="GtkLabel" id="ExportAskLabel">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="xpad">16</property>
-                    <property name="label" translatable="yes">You will be asked each time an action is about to be exported.</property>
-                  </object>
-                  <packing>
-                    <property name="padding">4</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
+                <property name="orientation">vertical</property>
+                <property name="spacing">10</property>
               </object>
               <packing>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="position">1</property>
+            <property name="position">0</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="title">Selecting the export format</property>
       </packing>
     </child>
     <child>
-      <object class="GtkLabel" id="label3">
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox3">
         <property name="visible">True</property>
-        <property name="use_markup">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="AssistantExportConfirmLabel">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="xpad">20</property>
+            <property name="use_markup">True</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
       </object>
       <packing>
         <property name="page_type">confirm</property>
-        <property name="title">Summary</property>
+        <property name="title" translatable="yes">Summary</property>
       </packing>
     </child>
     <child>
-      <object class="GtkLabel" id="label4">
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox4">
         <property name="visible">True</property>
-        <property name="use_markup">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="AssistantExportSummaryLabel">
+            <property name="visible">True</property>
+            <property name="use_markup">True</property>
+            <property name="xalign">0</property>
+            <property name="xpad">20</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="page_type">summary</property>
-        <property name="title">Export is done</property>
+        <property name="title" translatable="yes">Export is done</property>
       </packing>
     </child>
   </object>
-  <object class="GtkDialog" id="AssistantExportAsk">
+  <object class="GtkDialog" id="ExportAskDialog">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Exporting an action</property>
     <property name="type_hint">dialog</property>
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index ef27c8d..8aa8ba1 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -554,6 +554,7 @@ prepare_confirm( NactAssistantImport *window, GtkAssistant *assistant, GtkWidget
 	gchar *text, *tmp;
 	GtkWidget *chooser;
 	GSList *uris, *is;
+	GtkLabel *confirm_label;
 
 	g_debug( "%s: window=%p, assistant=%p, page=%p",
 			thisfn, ( void * ) window, ( void * ) assistant, ( void * ) page );
@@ -577,7 +578,8 @@ prepare_confirm( NactAssistantImport *window, GtkAssistant *assistant, GtkWidget
 	g_free( text );
 	text = tmp;
 
-	gtk_label_set_markup( GTK_LABEL( page ), text );
+	confirm_label = GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "AssistantImportConfirmLabel" ));
+	gtk_label_set_markup( confirm_label, text );
 	g_free( text );
 
 	gtk_assistant_set_page_complete( assistant, page, TRUE );
@@ -625,22 +627,22 @@ add_import_mode( NactAssistantImport *window, const gchar *text )
 
 	switch( mode ){
 		case IMPORTER_MODE_NO_IMPORT:
-			label1 = g_strdup( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "NoImportButton" ))));
+			label1 = na_core_utils_str_remove_char( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "NoImportButton" ))), "_" );
 			label2 = g_strdup( gtk_label_get_text( GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "NoImportLabel"))));
 			break;
 
 		case IMPORTER_MODE_RENUMBER:
-			label1 = g_strdup( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "RenumberButton" ))));
+			label1 = na_core_utils_str_remove_char( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "RenumberButton" ))), "_" );
 			label2 = g_strdup( gtk_label_get_text( GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "RenumberLabel"))));
 			break;
 
 		case IMPORTER_MODE_OVERRIDE:
-			label1 = g_strdup( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "OverrideButton" ))));
+			label1 = na_core_utils_str_remove_char( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "OverrideButton" ))), "_" );
 			label2 = g_strdup( gtk_label_get_text( GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "OverrideLabel"))));
 			break;
 
 		case IMPORTER_MODE_ASK:
-			label1 = g_strdup( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "AskButton" ))));
+			label1 = na_core_utils_str_remove_char( gtk_button_get_label( GTK_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "AskButton" ))), "_" );
 			label2 = g_strdup( gtk_label_get_text( GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "AskLabel"))));
 			break;
 
@@ -777,6 +779,7 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
 	ImportUriStruct *str;
 	GFile *file;
 	guint mode;
+	GtkLabel *summary_label;
 
 	g_debug( "%s: window=%p, assistant=%p, page=%p",
 			thisfn, ( void * ) window, ( void * ) assistant, ( void * ) page );
@@ -835,8 +838,8 @@ prepare_importdone( NactAssistantImport *window, GtkAssistant *assistant, GtkWid
 		text = tmp;
 	}
 
-	/*g_debug( "%s: text='%s'", thisfn, text );*/
-	gtk_label_set_markup( GTK_LABEL( page ), text );
+	summary_label = GTK_LABEL( base_window_get_widget( BASE_WINDOW( window ), "AssistantImportSummaryLabel" ));
+	gtk_label_set_markup( summary_label, text );
 	g_free( text );
 
 	mode = get_import_mode( window );
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index f43c5aa..1a61adc 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -38,6 +38,7 @@
 #include <api/na-object-api.h>
 
 #include <core/na-exporter.h>
+#include <core/na-export-format.h>
 
 #include "nact-application.h"
 #include "nact-iprefs.h"
diff --git a/src/nact/nact-export-ask.c b/src/nact/nact-export-ask.c
index 284e4ff..5bc058d 100644
--- a/src/nact/nact-export-ask.c
+++ b/src/nact/nact-export-ask.c
@@ -76,7 +76,7 @@ static void     on_base_runtime_init_dialog( NactExportAsk *editor, gpointer use
 static void     on_base_all_widgets_showed( NactExportAsk *editor, gpointer user_data );
 static void     on_cancel_clicked( GtkButton *button, NactExportAsk *editor );
 static void     on_ok_clicked( GtkButton *button, NactExportAsk *editor );
-static GQuark   get_format( NactExportAsk *editor );
+static GQuark   get_export_format( NactExportAsk *editor );
 static gboolean base_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window );
 
 GType
@@ -281,7 +281,7 @@ base_get_iprefs_window_id( const BaseWindow *window )
 static gchar *
 base_get_dialog_name( const BaseWindow *window )
 {
-	return( g_strdup( "ExportAsk" ));
+	return( g_strdup( "ExportAskDialog" ));
 }
 
 static gchar *
@@ -304,7 +304,7 @@ on_base_initial_load_dialog( NactExportAsk *editor, gpointer user_data )
 	application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( editor )));
 	updater = nact_application_get_updater( application );
 	container = base_window_get_widget( BASE_WINDOW( editor ), "ExportFormatAskVBox" );
-	nact_export_format_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_ASK );
+	nact_export_format_init_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_ASK );
 }
 
 static void
@@ -372,23 +372,25 @@ on_ok_clicked( GtkButton *button, NactExportAsk *editor )
 }
 
 static GQuark
-get_format( NactExportAsk *editor )
+get_export_format( NactExportAsk *editor )
 {
 	GtkWidget *container;
-	GQuark export_format;
+	NAExportFormat *format;
+	GQuark format_quark;
 	GtkWidget *button;
 	gboolean keep;
 
 	container = base_window_get_widget( BASE_WINDOW( editor ), "ExportFormatAskVBox" );
-	export_format = nact_export_format_get_selected( container );
+	format = nact_export_format_get_selected( container );
+	format_quark = na_export_format_get_quark( format );
 
 	button = base_window_get_widget( BASE_WINDOW( editor ), "AskKeepChoiceButton" );
 	keep = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( button ));
 	if( keep ){
-		nact_iprefs_set_export_format( BASE_WINDOW( editor ), IPREFS_EXPORT_FORMAT, export_format );
+		nact_iprefs_set_export_format( BASE_WINDOW( editor ), IPREFS_EXPORT_FORMAT, format_quark );
 	}
 
-	return( export_format );
+	return( format_quark );
 }
 
 static gboolean
@@ -412,7 +414,7 @@ base_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window )
 			break;
 
 		case GTK_RESPONSE_OK:
-			editor->private->format = get_format( editor );
+			editor->private->format = get_export_format( editor );
 			return( TRUE );
 			break;
 	}
diff --git a/src/nact/nact-export-format.c b/src/nact/nact-export-format.c
index 58b9513..9e05be4 100755
--- a/src/nact/nact-export-format.c
+++ b/src/nact/nact-export-format.c
@@ -40,43 +40,31 @@
 #include "nact-iprefs.h"
 #include "nact-export-format.h"
 
-#define EXPORT_FORMAT_PROP_QUARK_ID		"nact-export-format-prop-quark-id"
+#define EXPORT_FORMAT_PROP_OBJECT		"nact-export-format-prop-object"
 #define EXPORT_FORMAT_PROP_BUTTON		"nact-export-format-prop-button"
-#define EXPORT_FORMAT_PROP_LABEL		"nact-export-format-prop-label"
-#define EXPORT_FORMAT_PROP_DESCRIPTION	"nact-export-format-prop-description"
 
-#define ASKME_LABEL						N_( "Ask me" )
-#define ASKME_DESCRIPTION				N_( "You will be asked each time an item is about to be exported." )
+#define ASKME_LABEL						N_( "_Ask me" )
+#define ASKME_DESCRIPTION				N_( "You will be asked for the format to choose each time an item is about to be exported." )
 
-/* structure used when iterating on container's children
- */
-typedef struct {
-	GQuark   format;
-	gboolean found;
-	gchar   *label;
-	gchar   *prop;
-}
-	NactExportFormatStr;
-
-static const NAIExporterFormat ask_str = { NULL, ASKME_LABEL, ASKME_LABEL, ASKME_DESCRIPTION };
+static const NAIExporterFormat st_ask_str = { "Ask", ASKME_LABEL, ASKME_DESCRIPTION };
 
 static void draw_in_vbox( const NAExportFormat *format, GtkWidget *vbox, guint mode, gint id );
-static void select_default_iter( GtkWidget *widget, NactExportFormatStr *str );
-static void get_selected_iter( GtkWidget *widget, NactExportFormatStr *str );
-static void get_label_iter( GtkWidget *widget, NactExportFormatStr *str );
+static void select_default_iter( GtkWidget *widget, void *quark_ptr );
+static void get_selected_iter( GtkWidget *widget, NAExportFormat **format );
 
 /**
- * nact_export_format_display:
+ * nact_export_format_init_display:
  * @pivot: the #NAPivot instance.
  * @vbox: the #GtkVBox in which the display must be drawn.
  * @mode: the type of the display.
  *
- * Displays the available export formats in the VBox
+ * Displays the available export formats in the VBox.
+ * Should only be called once per dialog box instance.
  */
 void
-nact_export_format_display( const NAPivot *pivot, GtkWidget *vbox, guint mode )
+nact_export_format_init_display( const NAPivot *pivot, GtkWidget *vbox, guint mode )
 {
-	static const gchar *thisfn = "nact_export_format_display";
+	static const gchar *thisfn = "nact_export_format_init_display";
 	GList *formats, *ifmt;
 	NAExportFormat *format;
 
@@ -92,11 +80,15 @@ nact_export_format_display( const NAPivot *pivot, GtkWidget *vbox, guint mode )
 
 		case EXPORT_FORMAT_DISPLAY_PREFERENCES:
 		case EXPORT_FORMAT_DISPLAY_ASSISTANT:
-			format = na_export_format_new( &ask_str, NULL );
+			format = na_export_format_new( &st_ask_str, NULL );
 			draw_in_vbox( format, vbox, mode, IPREFS_EXPORT_FORMAT_ASK );
 			g_object_unref( format );
 			break;
 
+		/* this is the mode to be used when we are about to export an item
+		 * and the user preference is 'Ask me'; obviously, we don't propose
+		 * here to ask him another time :)
+		 */
 		case EXPORT_FORMAT_DISPLAY_ASK:
 			break;
 
@@ -108,9 +100,7 @@ nact_export_format_display( const NAPivot *pivot, GtkWidget *vbox, guint mode )
 /*
  * container
  *  +- vbox
- *  |   +- hbox
- *  |   |   +- radio button
- *  |   |   +- label
+ *  |   +- radio button
  *  |   +- hbox
  *  |   |   +- description
  */
@@ -120,21 +110,17 @@ draw_in_vbox( const NAExportFormat *format, GtkWidget *container, guint mode, gi
 	static GtkRadioButton *first_button = NULL;
 	GtkVBox *vbox;
 	gchar *description;
-	GtkHBox *hbox1, *hbox2;
+	GtkHBox *hbox;
 	GtkRadioButton *button;
 	guint size, spacing;
-	GtkLabel *radio_label;
 	gchar *markup, *label;
 	GtkLabel *desc_label;
-	GQuark quark_id;
 
 	vbox = GTK_VBOX( gtk_vbox_new( FALSE, 0 ));
 	gtk_box_pack_start( GTK_BOX( container ), GTK_WIDGET( vbox ), FALSE, TRUE, 0 );
 	description = na_export_format_get_description( format );
 	g_object_set( G_OBJECT( vbox ), "tooltip-text", description, NULL );
-
-	hbox1 = GTK_HBOX( gtk_hbox_new( FALSE, 0 ));
-	gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox1 ), FALSE, TRUE, 0 );
+	g_object_set( G_OBJECT( vbox ), "spacing", 6, NULL );
 
 	button = GTK_RADIO_BUTTON( gtk_radio_button_new( NULL ));
 	if( first_button ){
@@ -142,51 +128,54 @@ draw_in_vbox( const NAExportFormat *format, GtkWidget *container, guint mode, gi
 	} else {
 		first_button = button;
 	}
-	gtk_box_pack_start( GTK_BOX( hbox1 ), GTK_WIDGET( button ), FALSE, TRUE, 0 );
+	gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, TRUE, 0 );
 
-	radio_label = GTK_LABEL( gtk_label_new( NULL ));
 	label = NULL;
 	markup = NULL;
 	switch( mode ){
 
 		case EXPORT_FORMAT_DISPLAY_ASK:
 		case EXPORT_FORMAT_DISPLAY_PREFERENCES:
-			label = na_export_format_get_ask_label( format );
+		case EXPORT_FORMAT_DISPLAY_ASSISTANT:
+			label = na_export_format_get_label( format );
 			markup = g_markup_printf_escaped( "%s", label );
+			gtk_button_set_label( GTK_BUTTON( button ), label );
+			g_object_set( G_OBJECT( button ), "use_underline", TRUE, NULL );
 			break;
 
-		case EXPORT_FORMAT_DISPLAY_ASSISTANT:
+		/* this work fine, but it appears that this is not consistant with import assistant */
+		/*case EXPORT_FORMAT_DISPLAY_ASSISTANT:
+			radio_label = GTK_LABEL( gtk_label_new( NULL ));
 			label = na_export_format_get_label( format );
 			markup = g_markup_printf_escaped( "<b>%s</b>", label );
-			break;
-	}
-	if( markup ){
-		gtk_label_set_markup( radio_label, markup );
-		g_free( markup );
+			gtk_label_set_markup( radio_label, markup );
+			gtk_container_add( GTK_CONTAINER( button ), GTK_WIDGET( radio_label ));
+			break;*/
 	}
-	gtk_box_pack_start( GTK_BOX( hbox1 ), GTK_WIDGET( radio_label ), FALSE, TRUE, 0 );
 
 	desc_label = NULL;
 	switch( mode ){
 
 		case EXPORT_FORMAT_DISPLAY_ASSISTANT:
+			hbox = GTK_HBOX( gtk_hbox_new( TRUE, 0 ));
+			gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
+
 			gtk_widget_style_get( GTK_WIDGET( button ), "indicator-size", &size, NULL );
 			gtk_widget_style_get( GTK_WIDGET( button ), "indicator-spacing", &spacing, NULL );
 			size += 2*spacing;
-			hbox2 = GTK_HBOX( gtk_hbox_new( TRUE, 0 ));
-			gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox2 ), FALSE, TRUE, 0 );
+
 			desc_label = GTK_LABEL( gtk_label_new( description ));
 			g_object_set( G_OBJECT( desc_label ), "xpad", size, NULL );
-			gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( desc_label ), TRUE, TRUE, 4 );
+			g_object_set( G_OBJECT( desc_label ), "xalign", 0, NULL );
+			gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( desc_label ), TRUE, TRUE, 4 );
 			break;
 	}
 
-	quark_id = ( id == -1 ) ? na_export_format_get_quark( format ) : id;
-	g_object_set_data( G_OBJECT( vbox ), EXPORT_FORMAT_PROP_QUARK_ID, GUINT_TO_POINTER( quark_id ));
 	g_object_set_data( G_OBJECT( vbox ), EXPORT_FORMAT_PROP_BUTTON, button );
-	g_object_set_data( G_OBJECT( vbox ), EXPORT_FORMAT_PROP_LABEL, radio_label );
-	g_object_set_data( G_OBJECT( vbox ), EXPORT_FORMAT_PROP_DESCRIPTION, desc_label );
+	g_object_set_data( G_OBJECT( vbox ), EXPORT_FORMAT_PROP_OBJECT, g_object_ref(( gpointer ) format ));
+	g_object_weak_ref( G_OBJECT( vbox ), ( GWeakNotify ) g_object_unref, ( gpointer ) format );
 
+	g_free( markup );
 	g_free( label );
 	g_free( description );
 }
@@ -201,30 +190,25 @@ draw_in_vbox( const NAExportFormat *format, GtkWidget *container, guint mode, gi
 void
 nact_export_format_select( const GtkWidget *container, GQuark format )
 {
-	NactExportFormatStr *str;
+	void *quark_ptr;
 
-	str = g_new0( NactExportFormatStr, 1 );
-	str->format = format;
-	str->found = FALSE;
-
-	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) select_default_iter, str );
-
-	g_free( str );
+	quark_ptr = GUINT_TO_POINTER( format );
+	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) select_default_iter, quark_ptr );
 }
 
 static void
-select_default_iter( GtkWidget *widget, NactExportFormatStr *str )
+select_default_iter( GtkWidget *widget, void *quark_ptr )
 {
-	GQuark format;
+	NAExportFormat *format;
+	GQuark format_quark;
 	GtkRadioButton *button;
 
-	if( !str->found ){
-		format = ( GQuark ) GPOINTER_TO_UINT( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_QUARK_ID ));
-		if( format == str->format ){
-			str->found = TRUE;
-			button = GTK_RADIO_BUTTON( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_BUTTON ));
-			gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( button ), TRUE );
-		}
+	format_quark = ( GQuark ) GPOINTER_TO_UINT( quark_ptr );
+	format = NA_EXPORT_FORMAT( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_OBJECT ));
+
+	if( na_export_format_get_quark( format ) == format_quark ){
+		button = GTK_RADIO_BUTTON( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_BUTTON ));
+		gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( button ), TRUE );
 	}
 }
 
@@ -232,119 +216,32 @@ select_default_iter( GtkWidget *widget, NactExportFormatStr *str )
  * nact_export_format_get_selected:
  * @container: the #GtkVBox in which the display has been drawn.
  *
- * Returns: the currently selected value, as a #GQuark.
+ * Returns: the currently selected value, as a #NAExportFormat object.
+ *
+ * The returned #NAExportFormat is owned by #NactExportFormat, and
+ * should not be released by the caller.
  */
-GQuark
+NAExportFormat *
 nact_export_format_get_selected( const GtkWidget *container )
 {
-	GQuark format;
-	NactExportFormatStr *str;
-
-	format = 0;
-
-	str = g_new0( NactExportFormatStr, 1 );
-	str->format = 0;
-	str->found = FALSE;
-
-	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) get_selected_iter, str );
-
-	if( str->found ){
-		format = str->format;
-	}
+	NAExportFormat *format;
 
-	g_free( str );
+	format = NULL;
+	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) get_selected_iter, &format );
+	g_debug( "nact_export_format_get_selected: format=%p", ( void * ) format );
 
 	return( format );
 }
 
 static void
-get_selected_iter( GtkWidget *widget, NactExportFormatStr *str )
+get_selected_iter( GtkWidget *widget, NAExportFormat **format )
 {
 	GtkRadioButton *button;
 
-	if( !str->found ){
+	if( !( *format  )){
 		button = GTK_RADIO_BUTTON( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_BUTTON ));
 		if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( button ))){
-			str->found = TRUE;
-			str->format = ( GQuark ) GPOINTER_TO_UINT( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_QUARK_ID ));
-		}
-	}
-}
-
-/**
- * nact_export_format_get_label:
- * @format: the #GQuark selected format.
- *
- * Returns: the label of the @format, as a newly allocated string which
- * should be g_free() by the caller.
- */
-gchar *
-nact_export_format_get_label( const GtkWidget *container, GQuark format )
-{
-	gchar *label;
-	NactExportFormatStr *str;
-
-	label = NULL;
-
-	str = g_new0( NactExportFormatStr, 1 );
-	str->format = format;
-	str->found = FALSE;
-	str->prop = EXPORT_FORMAT_PROP_LABEL;
-
-	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) get_label_iter, str );
-
-	if( str->found ){
-		label = str->label;
-	}
-
-	g_free( str );
-
-	return( label );
-}
-
-/**
- * nact_export_format_get_description:
- * @format: the #GQuark selected format.
- *
- * Returns: the description of the @format, as a newly allocated string which
- * should be g_free() by the caller.
- */
-gchar *
-nact_export_format_get_description( const GtkWidget *container, GQuark format )
-{
-	gchar *label;
-	NactExportFormatStr *str;
-
-	label = NULL;
-
-	str = g_new0( NactExportFormatStr, 1 );
-	str->format = format;
-	str->found = FALSE;
-	str->prop = EXPORT_FORMAT_PROP_DESCRIPTION;
-
-	gtk_container_foreach( GTK_CONTAINER( container ), ( GtkCallback ) get_label_iter, str );
-
-	if( str->found ){
-		label = str->label;
-	}
-
-	g_free( str );
-
-	return( label );
-}
-
-static void
-get_label_iter( GtkWidget *widget, NactExportFormatStr *str )
-{
-	GQuark format;
-	GtkLabel *gtk_label;
-
-	if( !str->found ){
-		format = ( GQuark ) GPOINTER_TO_UINT( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_QUARK_ID ));
-		if( format == str->format ){
-			str->found = TRUE;
-			gtk_label = GTK_LABEL( g_object_get_data( G_OBJECT( widget ), str->prop ));
-			str->label = g_strdup( gtk_label_get_text( gtk_label ));
+			*format = NA_EXPORT_FORMAT( g_object_get_data( G_OBJECT( widget ), EXPORT_FORMAT_PROP_OBJECT ));
 		}
 	}
 }
diff --git a/src/nact/nact-export-format.h b/src/nact/nact-export-format.h
index 5774543..e9f3d13 100644
--- a/src/nact/nact-export-format.h
+++ b/src/nact/nact-export-format.h
@@ -39,6 +39,7 @@
 
 #include <gtk/gtk.h>
 
+#include <core/na-export-format.h>
 #include <core/na-pivot.h>
 
 G_BEGIN_DECLS
@@ -66,12 +67,9 @@ enum {
 	EXPORT_FORMAT_DISPLAY_PREFERENCES,
 };
 
-void   nact_export_format_display( const NAPivot *pivot, GtkWidget *container, guint mode );
-void   nact_export_format_select( const GtkWidget *container, GQuark format );
-GQuark nact_export_format_get_selected( const GtkWidget *container );
-
-gchar *nact_export_format_get_label      ( const GtkWidget *container, GQuark format );
-gchar *nact_export_format_get_description( const GtkWidget *container, GQuark format );
+void            nact_export_format_init_display( const NAPivot *pivot, GtkWidget *container, guint mode );
+void            nact_export_format_select( const GtkWidget *container, GQuark format );
+NAExportFormat *nact_export_format_get_selected( const GtkWidget *container );
 
 G_END_DECLS
 
diff --git a/src/nact/nact-iprefs.h b/src/nact/nact-iprefs.h
index c9686dc..7e332d0 100644
--- a/src/nact/nact-iprefs.h
+++ b/src/nact/nact-iprefs.h
@@ -73,7 +73,6 @@ typedef struct {
  */
 enum {
 	IPREFS_EXPORT_NO_EXPORT = 1,
-	IPREFS_EXPORT_FORMAT_ASK,
 	IPREFS_EXPORT_FORMAT_GCONF_SCHEMA
 };
 
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index 97187c0..52d7b5f 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -285,7 +285,7 @@ on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data )
 	application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( editor )));
 	updater = nact_application_get_updater( application );
 	container = base_window_get_widget( BASE_WINDOW( editor ), "PreferencesExportFormatVBox" );
-	nact_export_format_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_PREFERENCES );
+	nact_export_format_init_display( NA_PIVOT( updater ), container, EXPORT_FORMAT_DISPLAY_PREFERENCES );
 
 	listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( editor ), "SchemesTreeView" ));
 	nact_schemes_list_create_model( listview, FALSE );
@@ -475,7 +475,7 @@ save_preferences( NactPreferencesEditor *editor )
 	gboolean relabel;
 	guint import_mode;
 	GtkWidget *container;
-	GQuark export_format;
+	NAExportFormat *export_format;
 	gboolean esc_quit, esc_confirm;
 
 	application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( editor )));
@@ -553,7 +553,8 @@ save_preferences( NactPreferencesEditor *editor )
 	 */
 	container = base_window_get_widget( BASE_WINDOW( editor ), "PreferencesExportFormatVBox" );
 	export_format = nact_export_format_get_selected( container );
-	nact_iprefs_set_export_format( BASE_WINDOW( editor ), IPREFS_EXPORT_FORMAT, export_format );
+	nact_iprefs_set_export_format(
+			BASE_WINDOW( editor ), IPREFS_EXPORT_FORMAT, na_export_format_get_quark( export_format ));
 
 	/* fifth tab: list of default schemes
 	 */
diff --git a/src/nact/nautilus-actions-config-tool.ui b/src/nact/nautilus-actions-config-tool.ui
index 409c7a7..de28808 100644
--- a/src/nact/nautilus-actions-config-tool.ui
+++ b/src/nact/nautilus-actions-config-tool.ui
@@ -1347,6 +1347,9 @@ Defining several profiles lets you have several commands, each applying with a d
       <placeholder/>
     </child>
     <child>
+      <placeholder/>
+    </child>
+    <child>
       <object class="GtkLabel" id="label3">
         <property name="visible">True</property>
         <property name="label" translatable="yes">This assistant will guide you through the process of importing items, actions or menus.</property>
@@ -1362,10 +1365,10 @@ Defining several profiles lets you have several commands, each applying with a d
         <child>
           <object class="GtkFileChooserWidget" id="ImportFileChooser">
             <property name="visible">True</property>
-            <property name="use_preview_label">False</property>
-            <property name="select_multiple">True</property>
-            <property name="preview_widget_active">False</property>
             <property name="local_only">False</property>
+            <property name="preview_widget_active">False</property>
+            <property name="select_multiple">True</property>
+            <property name="use_preview_label">False</property>
           </object>
           <packing>
             <property name="position">0</property>
@@ -1390,6 +1393,8 @@ Defining several profiles lets you have several commands, each applying with a d
             <child>
               <object class="GtkLabel" id="label38">
                 <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="ypad">10</property>
                 <property name="label" translatable="yes">&lt;b&gt;What should I do when importing an item whose ID already exists ?&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
               </object>
@@ -1409,10 +1414,11 @@ Defining several profiles lets you have several commands, each applying with a d
                     <property name="orientation">vertical</property>
                     <child>
                       <object class="GtkRadioButton" id="NoImportButton">
-                        <property name="label" translatable="yes">Do not import the item whose ID already exists</property>
+                        <property name="label" translatable="yes">Do _not import the item whose ID already exists</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
@@ -1452,10 +1458,11 @@ The existing item will not be modified.</property>
                     <property name="orientation">vertical</property>
                     <child>
                       <object class="GtkRadioButton" id="RenumberButton">
-                        <property name="label" translatable="yes">Allocate a new identifiant for the imported item</property>
+                        <property name="label" translatable="yes">A_llocate a new identifiant for the imported item</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">NoImportButton</property>
                       </object>
@@ -1496,10 +1503,11 @@ The existing item will not be modified.</property>
                     <property name="orientation">vertical</property>
                     <child>
                       <object class="GtkRadioButton" id="OverrideButton">
-                        <property name="label" translatable="yes">Override the existing item</property>
+                        <property name="label" translatable="yes">_Override the existing item</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">NoImportButton</property>
                       </object>
@@ -1540,10 +1548,11 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
                     <property name="orientation">vertical</property>
                     <child>
                       <object class="GtkRadioButton" id="AskButton">
-                        <property name="label" translatable="yes">Ask me</property>
+                        <property name="label" translatable="yes">_Ask me</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">NoImportButton</property>
                       </object>
@@ -1593,21 +1602,61 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
       </packing>
     </child>
     <child>
-      <object class="GtkLabel" id="label17">
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox12">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="AssistantImportConfirmLabel">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="xpad">20</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="page_type">confirm</property>
-        <property name="title">Summary</property>
+        <property name="title" translatable="yes">Summary</property>
       </packing>
     </child>
     <child>
-      <object class="GtkLabel" id="label18">
+      <placeholder/>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox13">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkLabel" id="AssistantImportSummaryLabel">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="xpad">20</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="page_type">summary</property>
-        <property name="title">Import is done</property>
+        <property name="title" translatable="yes">Import is done</property>
       </packing>
     </child>
   </object>
@@ -2098,24 +2147,24 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
   </object>
   <object class="GtkSizeGroup" id="CommandLabelSizeGroup">
     <widgets>
-      <widget name="CommandParametersLabel"/>
-      <widget name="CommandPathLabel"/>
       <widget name="ProfileLabelLabel"/>
+      <widget name="CommandPathLabel"/>
+      <widget name="CommandParametersLabel"/>
     </widgets>
   </object>
   <object class="GtkSizeGroup" id="CommandButtonSizeGroup">
     <widgets>
-      <widget name="CommandLegendButton"/>
       <widget name="CommandPathButton"/>
+      <widget name="CommandLegendButton"/>
     </widgets>
   </object>
   <object class="GtkSizeGroup" id="ActionLabelSizeGroup">
     <widgets>
-      <widget name="ActionIconLabel"/>
-      <widget name="ActionTooltipLabel"/>
-      <widget name="ActionIdLabel"/>
-      <widget name="ActionMenuLabelLabel"/>
       <widget name="ActionToolbarLabelLabel"/>
+      <widget name="ActionMenuLabelLabel"/>
+      <widget name="ActionIdLabel"/>
+      <widget name="ActionTooltipLabel"/>
+      <widget name="ActionIconLabel"/>
     </widgets>
   </object>
 </interface>



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