[nautilus-actions] Make the Export assistant transient for the main window



commit b586270e48c40956217ffdafa63ecd62703d14d4
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Oct 15 19:54:51 2009 +0200

    Make the Export assistant transient for the main window

 src/nact/nact-assistant-export.c  |   15 ++++-----------
 src/nact/nact-assistant-export.ui |    5 +++--
 2 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index 6a6bfb1..ea5875b 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -81,7 +81,6 @@ struct NactAssistantExportClassPrivate {
  */
 struct NactAssistantExportPrivate {
 	gboolean        dispose_has_run;
-	NactMainWindow *main_window;
 	gchar          *uri;
 	GSList         *fnames;
 	gint            errors;
@@ -100,7 +99,7 @@ static void            instance_init( GTypeInstance *instance, gpointer klass );
 static void            instance_dispose( GObject *application );
 static void            instance_finalize( GObject *application );
 
-static NactAssistantExport *assist_new( BaseApplication *application );
+static NactAssistantExport *assist_new( BaseWindow *parent );
 
 static gchar          *window_get_iprefs_window_id( BaseWindow *window );
 static gchar          *window_get_toplevel_name( BaseWindow *dialog );
@@ -301,9 +300,9 @@ instance_finalize( GObject *window )
 }
 
 static NactAssistantExport *
-assist_new( BaseApplication *application )
+assist_new( BaseWindow *parent )
 {
-	return( g_object_new( NACT_ASSISTANT_EXPORT_TYPE, BASE_WINDOW_PROP_APPLICATION, application, NULL ));
+	return( g_object_new( NACT_ASSISTANT_EXPORT_TYPE, BASE_WINDOW_PROP_PARENT, parent, NULL ));
 }
 
 /**
@@ -314,17 +313,11 @@ assist_new( BaseApplication *application )
 void
 nact_assistant_export_run( BaseWindow *main_window )
 {
-	BaseApplication *appli;
 	NactAssistantExport *assist;
 
-	appli = BASE_APPLICATION( base_window_get_application( main_window ));
-
-	assist = assist_new( appli );
-	g_object_set( G_OBJECT( assist ), BASE_WINDOW_PROP_PARENT, main_window, NULL );
+	assist = assist_new( main_window );
 	g_object_set( G_OBJECT( assist ), BASE_WINDOW_PROP_HAS_OWN_BUILDER, TRUE, NULL );
 
-	assist->private->main_window = NACT_MAIN_WINDOW( main_window );
-
 	base_window_run( BASE_WINDOW( assist ));
 }
 
diff --git a/src/nact/nact-assistant-export.ui b/src/nact/nact-assistant-export.ui
index cc47eaa..d69d92d 100644
--- a/src/nact/nact-assistant-export.ui
+++ b/src/nact/nact-assistant-export.ui
@@ -7,6 +7,7 @@
     <property name="border_width">12</property>
     <property name="title" translatable="yes">Exporting actions</property>
     <property name="modal">True</property>
+    <property name="type_hint">dialog</property>
     <child>
       <object class="GtkLabel" id="label20">
         <property name="visible">True</property>
@@ -85,10 +86,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="use_preview_label">False</property>
             <property name="action">select-folder</property>
+            <property name="local_only">False</property>
           </object>
           <packing>
             <property name="position">0</property>



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