file-roller r2389 - in trunk: . data/glade help help/C po src



Author: paobac
Date: Mon Jul 28 11:26:59 2008
New Revision: 2389
URL: http://svn.gnome.org/viewvc/file-roller?rev=2389&view=rev

Log:
2008-07-28  Paolo Bacchilega  <paobac svn gnome org>

	* NEWS: updated.
	* TODO: updated.
	* README: updated.
	
	* src/dlg-batch-add.c (help_clicked_cb): 
	* data/glade/batch-add-files.glade:
	
	Added help button.
	 
2008-07-26  Paolo Bacchilega  <paobac svn gnome org>

	* src/fr-archive.c (get_mime_type_from_magic_numbers): added magic
	number for 7-zip archives. 

 	* src/fr-window.c:
	* src/fr-process.h: 
	* src/fr-command-rar.h: 
	* src/fr-command-rar.c: 
	* src/fr-command-7z.h: 
	* src/fr-command-7z.c: 
	* src/fr-command.h: 
	* src/fr-command.c: 
	* src/fr-archive.c: 
	
	Update the archive filename after creating a multi-volume archive.
	
	* src/typedefs.h:
	* src/Makefile.am: added dlg-new.[ch]
	* src/main.h:
	* src/main.c:
	* src/fr-window.h:
	* src/fr-window.c:	
	* src/dlg-new.c: new file
	* src/dlg-new.c: new file  
	* src/dlg-batch-add.c: 
	* src/actions.c: 
	
	Unify the "new" and "save as" dialogs.  Allow to specify other options
	in these dialogs, such as whether to encrypt the header and whether
	to split the archive in volumes.
	
	* data/glade/new.glade: new file.
	* data/glade/Makefile.am: include new.glade in the glade data.

2008-07-25  Paolo Bacchilega  <paobac svn gnome org>

	* configure.ac: bumped version number to differentiate 
	current development version from the latest released version.



Added:
   trunk/data/glade/new.glade
   trunk/src/dlg-new.c   (contents, props changed)
   trunk/src/dlg-new.h   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/README
   trunk/TODO
   trunk/configure.ac
   trunk/data/glade/Makefile.am
   trunk/data/glade/batch-add-files.glade
   trunk/help/C/file-roller.xml
   trunk/help/ChangeLog
   trunk/po/ChangeLog
   trunk/po/POTFILES.in
   trunk/src/Makefile.am
   trunk/src/actions.c
   trunk/src/dlg-batch-add.c
   trunk/src/fr-archive.c
   trunk/src/fr-command-7z.c
   trunk/src/fr-command-7z.h
   trunk/src/fr-command-rar.c
   trunk/src/fr-command-rar.h
   trunk/src/fr-command.c
   trunk/src/fr-command.h
   trunk/src/fr-process.h
   trunk/src/fr-window.c
   trunk/src/fr-window.h
   trunk/src/main.c
   trunk/src/main.h
   trunk/src/typedefs.h

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Mon Jul 28 11:26:59 2008
@@ -1,3 +1,10 @@
+version 2.23.5
+--------------
+
+        New features and user visible changes:
+        
+        * Updated the user's manual. 
+
 version 2.23.4
 --------------
 
@@ -1006,3 +1013,4 @@
 version 0.1
 -----------
 	* first public version.
+

Modified: trunk/README
==============================================================================
--- trunk/README	(original)
+++ trunk/README	Mon Jul 28 11:26:59 2008
@@ -12,25 +12,36 @@
 
   File Roller is only a front-end (a graphical interface) to archiving programs
   like tar and zip. The supported file types are :
-    * Tar archives uncompressed (.tar) or compressed with
+    * 7-Zip Compressed File (.7z)
+    * WinAce Compressed File (.ace)
+    * ALZip Compressed File (.alz)
+    * AIX Small Indexed Archive  (.ar)
+    * ARJ Compressed Archive (.arj)
+    * Cabinet File (.cab)
+    * UNIX CPIO Archive (.cpio)
+    * Debian Linux Package (.deb) [Read-only mode]
+    * ISO-9660 CD Disc Image (.iso) [Read-only mode]
+    * Java Archive (.jar)
+    * Java Enterprise archive (.ear)
+    * Java Web Archive (.war)
+    * LHA Archive (.lzh, .lha)
+    * WinRAR Compressed Archive (.rar)
+    * RAR Archived Comic Book (.cbr)
+    * RPM Linux Package (.rpm) [Read-only mode]
+    * Tape Archive File:
+          * uncompressed (.tar) 
+          or compressed with
           * gzip (.tar.gz , .tgz)
           * bzip (.tar.bz , .tbz)
           * bzip2 (.tar.bz2 , .tbz2)
           * compress (.tar.Z , .taz)
           * lzop (.tar.lzo , .tzo)
-    * Zip archives (.zip)
-    * Jar archives (.jar , .ear , .war)
-    * Lha archives (.lzh)
-    * Rar archives (.rar)
-    * Zoo archives (.zoo)
-    * Arj archives (.arj)
-    * AR archives (.ar)
-    * Debian archives (.deb) [Read-only mode]
-    * RPM archives (.rpm) [Read-only mode]
-    * 7-zip archives (.7z)
-    * ISO files (.iso) [Read-only mode]
-    * Stuffit archives (.bin, .sit)
-    * Single files compressed with gzip, bzip, bzip2, compress, lzop
+          * 7zip (.tar.7z)
+    * Stuffit Archives (.bin, .sit)
+    * ZIP Archive (.zip)
+    * ZIP Archived Comic Book (.cbz)
+    * ZOO Compressed Archive File (.zoo)
+    * Single files compressed with gzip, bzip, bzip2, compress, lzop, rzip.
 
 * Home Page
 

Modified: trunk/TODO
==============================================================================
--- trunk/TODO	(original)
+++ trunk/TODO	Mon Jul 28 11:26:59 2008
@@ -19,14 +19,26 @@
 
     This is command dependent: fixed for tar, zip, 7zip, rar.
 
-[x] #504584 â Incorrect comportment when extracting multi part rar files
+[ ] #543225 â File-Roller is unable to open gzip-compressed files like pci.ids if they are missing an .gz extension
 
-[x] LP:#186921 â Asking for password with missing archive volume
+[x] When creating a multi-volume archive from the main window the new archive
+    is not loaded correctly because the name of the first volume is different
+    from the original name.
+    
+[ ] It's not possible to load, modify, extract remote multi-volume archives.
 
-[ ] #543225 â File-Roller is unable to open gzip-compressed files like pci.ids if they are missing an .gz extension
+[?] Implement pipes and redirection to file.  To fix bug #542424.
+
+[?] #501660 â File-roller nautilus extension creates tarbombs
+
+[ ] #503940 â Various Archive Manager documentation mistakes
 
 == Done ==
 
+[x] #504584 â Incorrect comportment when extracting multi part rar files
+
+[x] LP:#186921 â Asking for password with missing archive volume
+
 [x] #521324 â ALZ archive support
 
 [x] #343201 â Use p7zip for RAR archives?

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Jul 28 11:26:59 2008
@@ -2,7 +2,7 @@
 
 AC_PREREQ(2.61)
 
-AC_INIT(file-roller, 2.23.4, [http://bugzilla.gnome.org/enter_bug.cgi?product=file-roller])
+AC_INIT(file-roller, 2.23.5, [http://bugzilla.gnome.org/enter_bug.cgi?product=file-roller])
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
 AC_CONFIG_SRCDIR([config.h.in])

Modified: trunk/data/glade/Makefile.am
==============================================================================
--- trunk/data/glade/Makefile.am	(original)
+++ trunk/data/glade/Makefile.am	Mon Jul 28 11:26:59 2008
@@ -4,6 +4,7 @@
 	batch-add-files.glade	\
 	batch-password.glade	\
 	delete.glade		\
+	new.glade		\
 	open-with.glade		\
 	password.glade		\
 	properties.glade	\

Modified: trunk/data/glade/batch-add-files.glade
==============================================================================
--- trunk/data/glade/batch-add-files.glade	(original)
+++ trunk/data/glade/batch-add-files.glade	Mon Jul 28 11:26:59 2008
@@ -120,6 +120,19 @@
 	      </child>
 	    </widget>
 	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="a_help_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	    </widget>
+	  </child>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>

Added: trunk/data/glade/new.glade
==============================================================================
--- (empty file)
+++ trunk/data/glade/new.glade	Mon Jul 28 11:26:59 2008
@@ -0,0 +1,244 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <requires-version lib="gtk+" version="2.12"/>
+  <widget class="GtkFileChooserDialog" id="filechooserdialog">
+    <property name="border_width">5</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+    <property name="has_separator">False</property>
+    <property name="do_overwrite_confirmation">True</property>
+    <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">12</property>
+            <child>
+              <widget class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <widget class="GtkLabel" id="n_archive_type_label">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Archive _type:</property>
+                    <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="n_archive_type_box">
+                    <property name="visible">True</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkExpander" id="n_other_options_expander">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="top_padding">6</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox2">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkTable" id="table1">
+                                <property name="visible">True</property>
+                                <property name="n_rows">3</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">6</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="n_password_label">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">_Password:</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="n_password_entry">
+                                    <property name="width_request">300</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="n_encrypt_header_checkbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="label" translatable="yes">_Encrypt the file list too</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="draw_indicator">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="n_volume_box">
+                            <property name="visible">True</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <widget class="GtkCheckButton" id="n_volume_checkbutton">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">Split in _volumes of</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="n_volume_spinbutton">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">10 1 1000 1 10 10</property>
+                                <property name="digits">1</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes" comments="MB means megabytes">MB</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">_Other Options</property>
+                    <property name="use_underline">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="n_cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="n_new_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-new</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-5</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="n_help_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-11</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Modified: trunk/help/C/file-roller.xml
==============================================================================
--- trunk/help/C/file-roller.xml	(original)
+++ trunk/help/C/file-roller.xml	Mon Jul 28 11:26:59 2008
@@ -2,8 +2,8 @@
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
   <!ENTITY legal SYSTEM "legal.xml">
-  <!ENTITY appversion "2.14.0">
-  <!ENTITY manrevision "2.6">
+  <!ENTITY appversion "2.24.0">
+  <!ENTITY manrevision "2.24.0">
   <!ENTITY date "April 2006">
   <!ENTITY appname "Archive Manager">
   <!ENTITY app "<application>Archive Manager</application>">
@@ -32,6 +32,7 @@
      </abstract>
     <copyright> 
       <year>2006</year> 
+      <year>2008</year>
       <holder>Paolo Bacchilega</holder> 
     </copyright> 
      <copyright>
@@ -94,8 +95,16 @@
 
          <revhistory>
                 <revision>
+                  <revnumber>Archive Manager Manual V2.24.0</revnumber>
+                  <date>July 2008</date>
+                  <revdescription>
+                         <para role="author">Paolo Bacchilega</para>
+                         <para role="publisher">GNOME Documentation Project</para>
+                  </revdescription>
+                </revision>
+                <revision>
                   <revnumber>Archive Manager Manual V2.6</revnumber>
-                  <date>April 2006;</date>
+                  <date>April 2006</date>
                   <revdescription>
                          <para role="author">Paolo Bacchilega</para>
                          <para role="publisher">GNOME Documentation Project</para>
@@ -200,7 +209,7 @@
 <!-- ============= Introduction ============================== -->
 <!-- Use the Introduction section to give a brief overview of what
      the application is and what it does. -->
-<sect1 id="file-roller-intro"> 
+  <sect1 id="file-roller-intro"> 
     <title>Introduction</title> 
     <para>You can use the &app; application to create, view, modify, or unpack an archive. An archive is a file that acts as a container for other files. An archive can contain many files, folders, and subfolders, usually in compressed form. 
     </para>
@@ -208,7 +217,7 @@
       &app; provides only a graphical interface, and relies on command-line utilities such as <command>tar</command>, <command>gzip</command>, and <command>bzip2</command> for archive operations. 
     </para>
     <para>
-      If you have the appropriate command-line tools installed on your system, &app; supports RPM and Stuff files, as well as the archive formats listed in the following table.</para> 
+      If you have the appropriate command-line tools installed on your system, &app; supports the archive formats listed in the following table.</para> 
       <informaltable frame="all">
         <tgroup cols="2" colsep="1" rowsep="1">
           <colspec colname="COLSPEC0" colwidth="50*"/>
@@ -223,26 +232,70 @@
           </thead>
           <tbody>
             <row valign="top">
+              <entry><para>7-Zip archive</para></entry>
+              <entry align="left"><para><filename>.7z</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>WinAce archive</para></entry>
+              <entry align="left"><para><filename>.ace</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>ALZip archive</para></entry>
+              <entry align="left"><para><filename>.alz</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>AIX small indexed archive</para></entry>
+              <entry align="left"><para><filename>.ar</filename></para></entry>
+            </row>
+            <row valign="top">
               <entry><para>ARJ archive</para></entry>
               <entry align="left"><para><filename>.arj</filename></para></entry>
             </row>
             <row valign="top">
-              <entry><para>Enterprise archive</para></entry>
-              <entry align="left"><para><filename>.ear</filename></para></entry>
+              <entry><para>Cabinet file</para></entry>
+              <entry align="left"><para><filename>.cab</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>UNIX CPIO archive</para></entry>
+              <entry align="left"><para><filename>.cpio</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>Debian Linux package</para></entry>
+              <entry align="left"><para><filename>.deb</filename></para></entry>
+            </row>            
+            <row valign="top">
+              <entry><para>ISO-9660 CD disc image</para></entry>
+              <entry align="left"><para><filename>.iso</filename></para></entry>
             </row>
             <row valign="top">
               <entry><para>Java archive</para></entry>
               <entry align="left"><para><filename>.jar</filename></para></entry>
             </row>
             <row valign="top">
+              <entry><para>Java enterprise archive</para></entry>
+              <entry align="left"><para><filename>.ear</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>Java web archive</para></entry>
+              <entry align="left"><para><filename>.war</filename></para></entry>
+            </row>
+            <row valign="top">
               <entry><para>LHA archive</para></entry>
-              <entry align="left"><para><filename>.lzh</filename></para></entry>
+              <entry align="left"><para><filename>.lha</filename>, <filename>.lzh</filename></para></entry>
             </row>
             <row valign="top">
-              <entry><para>Resource Adapter archive</para></entry>
+              <entry><para>WinRAR compressed archive</para></entry>
               <entry align="left"><para><filename>.rar</filename></para></entry>
             </row>
             <row valign="top">
+              <entry><para>RAR archived comic book</para></entry>
+              <entry align="left"><para><filename>.cbr</filename></para></entry>
+            </row>
+            <row valign="top">
+              <entry><para>RPM Linux package</para></entry>
+              <entry align="left"><para><filename>.rpm</filename></para></entry>
+            </row>
+            <row valign="top">
               <entry><para>Uncompressed tar archive</para></entry>
               <entry align="left"><para><filename>.tar</filename></para></entry>
             </row>
@@ -266,17 +319,21 @@
               <entry><para>Tar archive compressed with <command>compress</command></para></entry>
               <entry align="left"><para><filename>.tar.Z</filename> or <filename>.taz</filename></para></entry>
             </row>
+             <row valign="top">
+              <entry><para>Tar archive compressed with <command>7zip</command></para></entry>
+              <entry align="left"><para><filename>.tar.7z</filename></para></entry>
+            </row>
             <row valign="top">
-              <entry><para>Web archive</para></entry>
-              <entry align="left"><para><filename>.war</filename></para></entry>
+              <entry><para>Stuffit archives</para></entry>
+              <entry align="left"><para><filename>.bin</filename> or <filename>.sit</filename></para></entry>
             </row>
             <row valign="top">
               <entry><para>PKZIP or WinZip archive</para></entry>
               <entry align="left"><para><filename>.zip</filename></para></entry>
             </row>
-	    <row valign="top">
-              <entry><para>7-Zip archive</para></entry>
-              <entry align="left"><para><filename>.7z</filename></para></entry>
+            <row valign="top">
+              <entry><para>ZIP Archived Comic Book</para></entry>
+              <entry align="left"><para><filename>.cbz</filename></para></entry>
             </row>
             <row valign="top">
               <entry><para>Zoo archive</para></entry>
@@ -285,20 +342,20 @@
           </tbody>
         </tgroup>
       </informaltable>
-    <para>The most common archive format on UNIX and Linux systems is the tar archive compressed with <command>gzip</command>.  </para>  
+    <para>The most common archive format on UNIX and Linux systems is the tar archive compressed with <command>gzip</command> or <command>bzip2</command>.  </para>  
     <para>The most common archive format on Microsoft Windows systems is the archive created with <application>PKZIP</application> or <application>WinZip</application>.  </para>
-<sect2 id="file-roller-intro-nonarchive">
-    <title>Compressed Non-Archive Files</title> 
-    <para>A compressed non-archive file is a file that is created when you use <command>bzip</command>, <command>bzip2</command>, <command>gzip</command>, <command>lzop</command>, or <command>compress</command> to compress a non-archive file. For example, <filename>file.txt.gz</filename> is created when you use <command>gzip</command> to compress <filename>file.txt</filename>.</para>
-    <para>You can use &app; to create, open and extract a compressed non-archive file.</para> 
-</sect2>
-</sect1>
+    <sect2 id="file-roller-intro-nonarchive">
+      <title>Compressed Non-Archive Files</title> 
+      <para>A compressed non-archive file is a file that is created when you use <command>bzip2</command>, <command>gzip</command>, <command>lzop</command>, <command>compress</command> or <command>rzip</command> to compress a non-archive file. For example, <filename>file.txt.gz</filename> is created when you use <command>gzip</command> to compress <filename>file.txt</filename>.</para>
+      <para>You can use &app; to create, open and extract a compressed non-archive file.</para> 
+    </sect2>
+  </sect1>
 
 <!-- ============= Getting Started =========================== -->
-<sect1 id="file-roller-get-start">
-         <title>Getting Started</title>
-           <para>This section provides information on how to start &app;, and describes the &app; user interface.
-           </para>
+  <sect1 id="file-roller-get-start">
+    <title>Getting Started</title>
+    <para>This section provides information on how to start &app;, and describes the &app; user interface.
+    </para>
 
 <!-- ============= To Start File Roller ============================ -->
          <sect2 id="file-roller-to-start">
@@ -367,62 +424,15 @@
                 </variablelist>
                 <para>When you right-click in the &app; window, the application displays a popup menu. The popup menu contains the most common contextual archive commands. </para>
 
-         <sect3 id="file-roller-bookmarks">
-                <title>Bookmarks</title>
-      <para>Several &app; dialogs contain the following components, which enable you to bookmark frequently accessed folders:
-      </para>
-        <variablelist>
-          <varlistentry>
-            <term>Bookmarks</term>
-            <listitem>
-              <para>Use this list box to open a bookmarked folder.</para>
-              <para>&app; provides the following default bookmarks:</para>
-              <informaltable frame="all">
-                <tgroup cols="2" colsep="1" rowsep="1">
-                  <colspec colname="COLSPEC0" colwidth="50*"/>
-                  <colspec colname="COLSPEC1" colwidth="50*"/>
-                  <thead>
-                    <row valign="top">
-                      <entry colname="COLSPEC0">
-                        <para>Bookmark</para></entry>
-                      <entry colname="COLSPEC1" align="left"> 
-                        <para>Location</para></entry>
-                    </row>
-                  </thead>
-                  <tbody>
-                    <row valign="top">               
-                      <entry><para><guilabel>Home</guilabel></para></entry>
-                      <entry><para><filename>$HOME</filename></para></entry>
-                    </row>
-                    <row valign="top">               
-                      <entry><para><guilabel>Desktop</guilabel></para></entry>
-                      <entry><para><filename>$HOME/Desktop</filename></para></entry>
-                    </row>
-                    <row valign="top">               
-                      <entry><para><guilabel>Filesystem</guilabel></para></entry>
-                      <entry><para><filename>/</filename></para></entry>
-                    </row>
-                  </tbody>
-                </tgroup>
-              </informaltable>
-              <note>
-                <para>$HOME is the home directory specified in the <filename>/etc/passwd</filename> file. &app; always uses this value, even if the user resets the value of $HOME after login.</para>
-              </note>
-            </listitem>
-          </varlistentry>
-          <varlistentry>
-            <term>Files and folders</term>
-            <listitem><para>Use this list box to open a subfolder within the bookmarked folder, or to select a file or folder.</para></listitem>
-          </varlistentry>
-          <varlistentry>
-            <term><guibutton>Add</guibutton></term>
-            <listitem><para>Click on this button to add a new bookmark to the bookmarks list box.</para></listitem>
-          </varlistentry>
-          <varlistentry>
-            <term><guibutton>Remove</guibutton></term>
-            <listitem><para>Click on this button to remove the selected bookmark from the bookmarks list box.</para></listitem>
-          </varlistentry>
-        </variablelist>
+     <sect3 id="file-roller-bookmarks">
+        <title>Browsing the Filesystem</title>
+        <para>Several &app; dialogs (<guilabel>New</guilabel>, <guilabel>Open</guilabel>, <guilabel>Extract</guilabel>,...) enable you
+        to browse files and folders on your computer. Refer to the <ulink type="help" 
+        url="ghelp:user-guide?filechooser-open">Desktop User Guide</ulink> to learn more about using the 
+        file browsing dialogs.</para>
+        <para>You can also refer to the <ulink type="help" url="ghelp:user-guide?nautilus-bookmarks">Bookmarks 
+        section</ulink> of the Desktop User Guide to learn how you can use the <guilabel>Places</guilabel> pane 
+        to access your favorite locations.</para>
      </sect3>
    </sect2>
 </sect1>
@@ -513,6 +523,10 @@
               <entry><para><filename>*.jpg; *.jpeg</filename></para></entry>
               <entry align="left"><para>All files with extension <filename>jpg</filename> and all files with extension <filename>jpeg</filename></para></entry>
             </row>
+            <row valign="top">               
+              <entry><para><filename>file?.gz</filename></para></entry>
+              <entry align="left"><para>All files with extension <filename>gz</filename> that have the name "file" followed by any single character, e.g. <filename>file2.gz</filename>, <filename>filex.gz</filename>.</para></entry>
+            </row>
           </tbody>
         </tgroup>
       </informaltable>
@@ -526,7 +540,7 @@
 	To open an archive, perform the following steps:
         <orderedlist>
           <listitem>
-           <para>Choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Open</guimenuitem></menuchoice> to display the <guilabel>Open</guilabel> dialog.</para> 
+           <para>Choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Open</guimenuitem></menuchoice> to display the <guilabel>Open</guilabel> dialog. Alternatively press <keycombo><keycap>Ctrl</keycap><keycap>O</keycap></keycombo>, or click <guibutton>Open</guibutton> in the toolbar.</para> 
           </listitem>
           <listitem>
            <para>Select the archive that you want to open.</para> 
@@ -545,12 +559,12 @@
             <para>The archive contents in the display area</para>
           </listitem>
           <listitem>
-            <para>The total number of files in the archive, and the size of the archive when uncompressed, in the statusbar</para>
+            <para>The number files and folders (objects) in the current location, and their size when uncompressed, in the statusbar</para>
           </listitem>
         </itemizedlist>
       </para>
       <para>
-        To open another archive, choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Open</guimenuitem></menuchoice> again. &app; opens each archive in a new window. To open another archive in the same window, you must first choose <menuchoice> <guimenu>Archive</guimenu> <guimenuitem>Close</guimenuitem> </menuchoice> to close the current archive, then choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Open</guimenuitem></menuchoice>.
+        To open another archive, choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Open</guimenuitem></menuchoice> again. &app; opens each archive in a new window. You can't open another archive in the same window.
       </para>
       <para>
 	If you try to open an archive that was created in a format that &app; does not recognize, the application displays an error message. See <xref linkend="file-roller-intro"/> for a list of supported formats.
@@ -561,26 +575,26 @@
     <sect2 id="file-roller-select-files">
       <title>To Select Files in an Archive</title>
     <para>
-      To select all files in an archive, choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Select All</guimenuitem></menuchoice>. </para>
-      <para>To deselect all files in an archive, choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Deselect All</guimenuitem></menuchoice>.
+      To select all files in an archive, choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Select All</guimenuitem></menuchoice> or press <keycombo><keycap>Ctrl</keycap><keycap>A</keycap></keycombo>. </para>
+      <para>To deselect all files in an archive, choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Deselect All</guimenuitem></menuchoice> or press <keycombo><keycap>Shift</keycap><keycap>Ctrl</keycap><keycap>A</keycap></keycombo>.
     </para>
     </sect2>
 
   <!-- =========== Extracting Files From an Archive ==================== -->
 
-<sect2 id="file-roller-extract"> 
+  <sect2 id="file-roller-extract"> 
     <title>To Extract Files From an Archive</title> 
     <para>
 	To extract files from an open archive, perform the following steps:
         <orderedlist>
         <listitem><para>
-        Select the files that you want to extract.</para>
+        Select the files that you want to extract.  To select more files, press-and-hold <keycap>Ctrl</keycap> and click on the files you want to select.</para>
         </listitem>
         <listitem><para>
-        Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Extract</guimenuitem></menuchoice> to display the <guilabel>Extract</guilabel> dialog.</para>
+        Choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Extract</guimenuitem></menuchoice> to display the <guilabel>Extract</guilabel> dialog.  Alternatively click <guibutton>Extract</guibutton> in the toolbar.</para>
         </listitem>
         <listitem><para>
-         Select the folder where &app; extracts the files from the <guilabel>Extract in folder</guilabel> drop-down list. If the folder is not present in the list, choose <guilabel>Other...</guilabel> to select the folder from the <guilabel>Destination folder</guilabel> dialog, then click on <guibutton>Open</guibutton>.</para>
+        Select the folder where &app; extracts the files.</para>
         </listitem>
         <listitem><para>
         Select the required extract options. For more information about the extract options, see <xref linkend="file-roller-extract-options"/>.</para>
@@ -589,10 +603,10 @@
         Click <guibutton>Extract</guibutton>.</para>
         <note>
           <para>
-            If all of the files in the archive are protected by a password, and you have not specified the password, &app; displays an error dialog.
+            If all of the files in the archive are protected by a password, and you have not specified it, &app; asks you to enter the password.
           </para>
           <para>
-            If some but not all of the files in the archive are protected by a password, and you have not specified the password, &app; does not display an error dialog. However, &app; extracts only the unprotected files to the new archive.
+            If some but not all of the files in the archive are protected by a password, and you have not specified the password, &app; does not ask for a password. However, &app; extracts only the unprotected files.
           </para>
           <para>
             For more information about passwords, see <xref linkend="file-roller-encrypt-files"/>.
@@ -608,31 +622,33 @@
     <para>
       The Extract operation does not change the contents of the archive. For information on how to delete files from an archive, see <xref linkend="file-roller-delete-files"/>. 
     </para>
-</sect2>
+  </sect2>
     
 <!-- ======= Closing the Archive ============= --> 
-<sect2 id="file-roller-archive-close">
-  <title>To Close an Archive</title>
-  <para>To close the current archive but not the &app; window, choose <menuchoice> <guimenu>Archive</guimenu> <guimenuitem>Close</guimenuitem> </menuchoice>.
-  </para>
-  <para>To close the current archive and the current &app; window, choose <menuchoice> <guimenu>Archive</guimenu> <guimenuitem>Quit</guimenuitem> </menuchoice>.
-  </para>
-</sect2>
+  <sect2 id="file-roller-archive-close">
+    <title>To Close an Archive</title>
+    <para>To close the current archive and the current &app; window, choose <menuchoice> <guimenu>Archive</guimenu> <guimenuitem>Close</guimenuitem> </menuchoice>, or press <keycombo><keycap>Ctrl</keycap><keycap>W</keycap></keycombo>.
+    </para>
+    <note>
+      <para>There is no way to close the current archive but not the &app; window.
+      </para>
+    </note>
+  </sect2>
 </sect1>
 
 
-  <!-- =============  Creating Archives ============================= -->
+<!-- =============  Creating Archives ============================= -->
 <sect1 id="file-roller-creating"> 
     <title>Creating Archives</title> 
     <para>
       In addition to opening existing archives, you can also create new archives with &app;.</para>
-<sect2 id="file-roller-create"> 
+    <sect2 id="file-roller-create"> 
     <title>To Create an Archive</title> 
     <para>
       To create an archive, perform the following steps:
       <orderedlist>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>New</guimenuitem></menuchoice> to display the <guilabel>New</guilabel> dialog. 
+          <para>Choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>New</guimenuitem></menuchoice> to display the <guilabel>New</guilabel> dialog.  Alternatively press <keycombo><keycap>Ctrl</keycap><keycap>N</keycap></keycombo>, or click <guibutton>New</guibutton> in the toolbar.
           </para>
         </listitem>
         <listitem>
@@ -640,9 +656,12 @@
           </para>
         </listitem>
         <listitem>
-          <para>Enter the name of the new archive, including the file extension, in the <guilabel>Name</guilabel> text box. 
+          <para>Enter the name of the new archive, including the file extension, in the <guilabel>Name</guilabel> text box.  Alternatively you can specify the archive name without extension, and then select the archive type from the <guilabel>Archive type</guilabel> drop-down menu, this way the extension will be added automatically.  
           </para>
         </listitem>
+        <listitem><para>
+        Select the required create options clicking on <guilabel>Other Options</guilabel>. For more information about the create options, see <xref linkend="file-roller-create-options"/>.</para>
+        </listitem>
         <listitem>
           <para>Click <guibutton>New</guibutton>. &app; creates an empty archive, but does not yet write the archive to disk. 
           </para>
@@ -666,13 +685,13 @@
       To add files to an archive, perform the following steps:
       <orderedlist>
          <listitem>
-           <para>Decide where you want to add the files, then open that folder in the archive.</para> 
+           <para>Decide where in the archive you want to add the files, then open that location in the archive.</para> 
          </listitem>
          <listitem>
-           <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Add Files</guimenuitem></menuchoice> to display the <guilabel>Add Files</guilabel> dialog.</para> 
+           <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Add Files</guimenuitem></menuchoice> to display the <guilabel>Add Files</guilabel> dialog, or click <guibutton>Add Files</guibutton> in the toolbar.</para> 
          </listitem>
          <listitem>
-           <para>Select the files that you want to add.</para> 
+           <para>Select the files that you want to add.  To select more files press-and-hold <keycap>Ctrl</keycap> and click the files.</para> 
          </listitem>
          <listitem>
            <para>Click <guibutton>Add</guibutton>. &app; adds the files to the current folder in the archive.
@@ -694,7 +713,7 @@
       To add a folder to an archive, perform the following steps:
       <orderedlist>
          <listitem>
-           <para>Decide where you want to add the files, then open that folder in the archive.</para> 
+           <para>Decide where in the archive you want to add the files, then open that location in the archive.</para>
          </listitem>
          <listitem>
            <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Add a Folder</guimenuitem></menuchoice> to display the <guilabel>Add a Folder</guilabel> dialog.</para> 
@@ -734,14 +753,18 @@
         </para>
       </listitem>
       <listitem>
+        <para>Select the required create options clicking on <guilabel>Other Options</guilabel>. For more information about the create options, see <xref linkend="file-roller-create-options"/>.
+        </para>
+      </listitem>      
+      <listitem>
         <para>Click <guibutton>Save</guibutton>. 
         </para>
         <note>
           <para>
-            If all of the files in the archive are protected by a password, and you have not specified the password, &app; displays an error dialog.
+            If all of the files in the archive are protected by a password, and you have not specified the it, &app; asks you to enter the password.
           </para>
           <para>
-            If some but not all of the files in the archive are protected by a password, and you have not specified the password, &app; does not display an error dialog. However, &app; copies only the unprotected files to the new archive.
+            If some but not all of the files in the archive are protected by a password, and you have not specified the password, &app; does not ask for a password. However, &app; copies only the unprotected files to the new archive.
           </para>
           <para>
             For more information about passwords, see <xref linkend="file-roller-encrypt-files"/>.
@@ -763,7 +786,10 @@
     <sect2 id="file-roller-encrypt-files">
       <title>To Encrypt Files in an Archive</title>
     <para>For security, you might want to encrypt the files that you add to an archive. </para>
-      <para>If the archive format supports encryption, you can specify a password to encrypt the files that you add to the archive. Currently, only <filename>.zip</filename> and <filename>.arj</filename> archives support encryption.</para>
+      <para>If the archive format supports encryption, you can specify a password to encrypt the files that you add to the archive.</para>
+      <note>
+        <para>Currently, only 7-ZIP, ZIP, RAR and ARJ archives support encryption.</para>
+      </note>
      <para>To specify a password for file encryption, perform the following steps:</para>
        <orderedlist>
           <listitem><para>Choose <menuchoice><guimenu>Edit</guimenu> <guimenuitem>Password</guimenuitem></menuchoice> to display the <guilabel>Password</guilabel> dialog.</para></listitem> 
@@ -789,7 +815,7 @@
           <para>Select the file that you want to rename.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Rename</guimenuitem></menuchoice> to display the <guilabel>Rename</guilabel> dialog.</para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Rename</guimenuitem></menuchoice>, or press <keycombo><keycap>F2</keycap></keycombo>, to display the <guilabel>Rename</guilabel> dialog.</para>
         </listitem>
         <listitem>
           <para>Enter the new filename in the <guilabel>New file name</guilabel> text box.</para>
@@ -810,13 +836,13 @@
           <para>Select the files that you want to copy.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Copy</guimenuitem></menuchoice>.  </para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Copy</guimenuitem></menuchoice>, or press <keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo>.  </para>
         </listitem>
         <listitem>
           <para>Open the location where you want to put the copied files.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice>.  </para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice>, or press <keycombo><keycap>Ctrl</keycap><keycap>V</keycap></keycombo>.  </para>
         </listitem>
       </orderedlist>
   </sect2>
@@ -830,13 +856,13 @@
           <para>Select the files that you want to move.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Cut</guimenuitem></menuchoice>.  </para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Cut</guimenuitem></menuchoice>, or press <keycombo><keycap>Ctrl</keycap><keycap>X</keycap></keycombo>.  </para>
         </listitem>
         <listitem>
           <para>Open the location where you want to put the moved files.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice>.  </para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice>, or press <keycombo><keycap>Ctrl</keycap><keycap>V</keycap></keycombo>.  </para>
         </listitem>
       </orderedlist>
   </sect2>
@@ -850,7 +876,7 @@
           <para>Select the files that you want to delete.</para>
         </listitem>
         <listitem>
-          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Delete</guimenuitem></menuchoice> to display the <guilabel>Delete</guilabel> dialog.</para>
+          <para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Delete</guimenuitem></menuchoice> or press <keycap>Delete</keycap> to display the <guilabel>Delete</guilabel> dialog.</para>
         </listitem>
         <listitem>
           <para>Select one of the following delete options:</para>
@@ -888,6 +914,33 @@
       </orderedlist>
   </sect2>
 
+<!-- =============  Modify a File in an Archive ==================== -->
+  <sect2 id="file-roller-modify-archive-file"> 
+    <title>To Modify a File in an Archive</title> 
+    <para>
+      To modify a file in an archive perform the following steps:
+      <orderedlist>
+      <listitem><para>Double-click the file that you want to open. Alternatively right-click the file and choose <menuchoice><guimenuitem>Open</guimenuitem></menuchoice>.</para></listitem>
+      <listitem><para>Edit the file opened in step 1, and then save your changes.</para></listitem>
+      <listitem><para>&app; shows a confirmation dialog, asking confirmation to update the file in the archive with the changes you made.</para></listitem>
+      <listitem><para>Click on <guilabel>Update</guilabel>.</para></listitem>
+      </orderedlist>
+    </para>
+    <para>&app; uses information from the <guilabel>File Types and Programs</guilabel> section of Advanced Desktop Preferences to automatically determine the appropriate application for the file type, and then launches that application. If &app; cannot determine the appropriate application, &app; displays the <guilabel>Open Files</guilabel> dialog to let you choose an application, as described in below.
+    </para>
+    <sect3 id="file-roller-modifiy-archive-file-custom-app">
+    <title>To Modify a File in an Archive with a Custom Application</title>
+    <para>
+      You can use an application specified by you, rather than the default application, to modify a file. To use an external application to open a file:
+      <orderedlist>
+      <listitem><para>Right click the file.</para></listitem>
+      <listitem><para>Choose <menuchoice><guimenuitem>Open With...</guimenuitem></menuchoice>.</para></listitem>
+      </orderedlist>
+    </para>    
+    <para>&app; displays the <guilabel>Open Files</guilabel> dialog, which lists all of the applications that can open files of the specified type. To select one of the applications, double-click the application name or click on the application name and then click <guibutton>Open</guibutton>. Alternatively, enter the application name in the <guilabel>Application</guilabel> text box and then click <guibutton>Open</guibutton> to launch the application of your choice.</para>
+    <para>Once the application starts follow the procedure from step 2 as described in <xref linkend="file-roller-modify-archive-file"/>.</para>
+    </sect3>
+  </sect2>
 </sect1>
 
 
@@ -908,7 +961,7 @@
                 </para></listitem>
 	      </varlistentry>
 	      <varlistentry>
-	        <term><guilabel>Path</guilabel></term>
+	        <term><guilabel>Location</guilabel></term>
 	        <listitem><para>The position of the archive in the file system. 
                 </para></listitem>
 	      </varlistentry>
@@ -972,7 +1025,7 @@
 	  </varlistentry>
 	  <varlistentry>
 	    <term><guilabel>Location</guilabel></term>
-	    <listitem><para>The path to the file within the archive. For a folder, the <guilabel>Location</guilabel> field is blank.
+	    <listitem><para>The path to the file within the archive. This column is visible only when the window is in file view, when in folder view the location of the files is displayed in the <guilabel>Location</guilabel> text box of the folderbar. For more information about view types see <xref linkend="file-roller-view-type-folder"/>.
             </para></listitem>
 	  </varlistentry>
         </variablelist>
@@ -983,38 +1036,45 @@
       </para>
       <para>For more advanced tasks, use an application installed on your system. For more information, see <xref linkend="file-roller-view-archive-file"/>. 
       </para>
-
     </sect2>
 
   <!-- =============  Viewing a File in an Archive ==================== -->
   <sect2 id="file-roller-view-archive-file"> 
     <title>To View a File in an Archive</title> 
     <para>
-      To view a file in an archive, perform the following steps:
-      <orderedlist>
-      <listitem><para>Select the file.</para></listitem>
-      <listitem><para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>View File</guimenuitem></menuchoice>.</para></listitem>
-      </orderedlist>
+      To view a file in an archive follow the steps described in <xref linkend="file-roller-modify-archive-file"/>.  If you save the opened file, click <guilabel>Cancel</guilabel> when &app; asks confirmation to update the file in the archive.
     </para>
-    <para>&app; uses information from the <guilabel>File Types and Programs</guilabel> section of Advanced Desktop Preferences to automatically determine the appropriate application for the file type, and then launches that application. If &app; cannot determine the appropriate application, &app; displays the <guilabel>Open Files</guilabel> dialog to let you choose an application, as described below.
+  </sect2>
+
+<!-- =============  Testing the Integrity of an Archive ==================== -->
+  <sect2 id="file-roller-test-archive"> 
+    <title>To Test the Integrity of an Archive</title> 
+    <para>Sometimes an archive can be damaged for some reason, to check whether an archive is damaged, choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Test Integrity</guimenuitem></menuchoice>:
+            <itemizedlist>
+              <listitem>
+                <para>If the archive contains no errors, &app; opens the <guilabel>Test Result</guilabel> dialog to list each file in the archive, and indicates that each file has status <literal>OK</literal>.
+                </para>
+              </listitem>
+              <listitem>
+                <para>If the archive contains some error, &app; opens the <guilabel>Test Result</guilabel> dialog displaying the part of the archive contains the error.
+                </para>
+              </listitem>
+            </itemizedlist>
     </para>
-    <para>
-      You can use an application specified by you, rather than the default application, to view a file. To use an external application to open a file, choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Open Files</guimenuitem></menuchoice>. &app; displays the <guilabel>Open Files</guilabel> dialog, which lists all of the applications that can open files of the specified type. To select one of the applications, click on the application name and then click <guibutton>Open</guibutton>. Alternatively, enter the application name in the <guilabel>Application</guilabel> text box and then click <guibutton>Open</guibutton> to launch the application of your choice. 
+    <para>A damaged archive can be impossible to extract, this can bring to a loss of data.  For this reason you should test the archive integrity before deleting the original files.
     </para>
-     <note>
-      <para>
-	You cannot use &app; to change a file. If you use an application to open a file within a &app; archive and make any changes to the opened file, &app; <emphasis>does not</emphasis> save the changes in the archive, even if you click <guibutton>Save</guibutton> in the application. &app; creates a temporary copy of the file, and then passes the temporary copy to the file-editing application. When you close the file-editing application, &app; deletes the temporary copy of the file and all changes are lost.
-      </para>
-      <para>
-	To edit a file in a &app; archive and save your changes in the archive: 
-       <orderedlist>
-       <listitem><para><link linkend="file-roller-extract">Extract</link> the file to a temporary location. </para></listitem>
-       <listitem><para>Edit the temporary file created in step 1, and then save your changes.</para></listitem>
-       <listitem><para><link linkend="file-roller-add-files">Add</link> the edited file back into the archive, that is, overwrite the original version of the file.   </para></listitem>
-       </orderedlist>
+    <para>If the archive contains encrypted files, &app; asks the password of the archive before performing the test.
+    </para>
+    <note>
+      <para>Not all the archive types support the integrity testing, the following is the list of archive types that can be tested for integrity: 7-Zip, RAR, ZIP, ACE, ARJ and Zoo.
       </para>
     </note>
-  </sect2>
+    <tip>
+      <title>Tip</title>
+      <para>To test the integrity of an archive that doesn't support the integrity testing, extract all the files from the archive and check that the operation is completed successfully.      
+      </para>      
+    </tip>
+  </sect2>  
 </sect1>
     
 <!-- ======= Customizing the Archive Display ============= --> 
@@ -1173,8 +1233,8 @@
   <sect2 id="file-roller-view-sort">
     <title>To Sort the File List</title>
     <para>You can sort the file list by name, size, type, modification date, or location. </para>
-    <para>To specify a sort order, choose <menuchoice><guimenu>View</guimenu><guisubmenu>Arrange Files</guisubmenu></menuchoice> and select the required sort order. Alternatively, click on the heading of the corresponding column. </para>
-    <para>To reverse the sort order, click on the column heading again, or choose <menuchoice><guimenu>View</guimenu><guisubmenu>Arrange Files</guisubmenu><guisubmenu>Reversed Order</guisubmenu></menuchoice>.
+    <para>To specify a sort order, click on the heading of the corresponding column. </para>
+    <para>To reverse the sort order, click on the column heading again.
     </para>
     <para>For example, to sort the file list by modification date, click on the <guilabel>Date modified</guilabel> heading. &app; rearranges the file list to display the files by modification date, starting with the earliest. To display the latest files first, click on the <guilabel>Date modified</guilabel> heading again.
 	  </para>
@@ -1184,23 +1244,6 @@
 
   <sect2 id="file-roller-extra-info">
     <title>To Display Additional Details</title>
-      <para>To check whether an archive contains encrypted files, choose <menuchoice><guimenu>Archive</guimenu><guimenuitem>Test Integrity</guimenuitem></menuchoice>: 
-            <itemizedlist>
-              <listitem>
-                <para>If the archive contains no encrypted files, or if the archive contains encrypted files and you have entered the correct password in the <guilabel>Password</guilabel> text box, &app; opens the <guilabel>Test Result</guilabel> dialog to list each file in the archive, and indicates that each file has status <literal>OK</literal>.
-                </para>
-              </listitem>
-              <listitem>
-                <para>If the archive contains some encrypted and unencrypted files, and you have not entered the correct password in the <guilabel>Password</guilabel> text box, &app; opens the <guilabel>Test Result</guilabel> dialog to list each file in the archive, and indicates that each unencrypted file has status <literal>OK</literal>, and each encrypted file has status <literal>incorrect password</literal>.
-                </para>
-              </listitem>
-              <listitem>
-                <para>If the archive contains only encrypted files and you have not entered the correct password in the <guilabel>Password</guilabel> text box, &app; displays an <guilabel>Error</guilabel> dialog. 
-                </para>
-              </listitem>
-            </itemizedlist>
-                     For more information about file encryption, see <xref linkend="file-roller-encrypt-files"/>.
-      </para>
       <para>To open the <guilabel>Last Output</guilabel> dialog, choose <menuchoice><guimenu>View</guimenu><guimenuitem>Last Output</guimenuitem></menuchoice>: 
             <itemizedlist>
               <listitem>
@@ -1240,7 +1283,14 @@
         </listitem>
         <listitem><para>Choose <guimenuitem>Create Archive</guimenuitem> from the file manager popup menu to display the &app; <guilabel>Create Archive</guilabel> dialog.  </para>
         </listitem>
-        <listitem><para>Enter the archive name in the <guilabel>Archive</guilabel> text box. </para>
+        <listitem><para>Enter the archive name, without the file extension, in the <guilabel>Archive</guilabel> text box. </para>
+        </listitem>
+        <listitem><para>Choose the archive type from the drop-down list. </para>
+        </listitem>
+        <listitem><para>Choose the location where to save the archive file, from the <guilabel>Location</guilabel> drop-down list.  If the location is not present in the list choose <guilabel>Other...</guilabel> to select it with the <guilabel>Location</guilabel> dialog.</para>
+        </listitem>
+        <listitem><para>
+        Select the required create options clicking on <guilabel>Other Options</guilabel>. For more information about the create options, see <xref linkend="file-roller-create-options"/>.</para>
         </listitem>
         <listitem><para>Click <guilabel>Create</guilabel> to add the selected files to the root folder of the specified archive.
       </para>
@@ -1267,11 +1317,45 @@
         <listitem><para>Choose <guimenuitem>Extract Here</guimenuitem> to extract all of the archive contents into the directory where the archive is located.</para>
         </listitem>
       </orderedlist>
-      <note><para>To extract encrypted files, you must invoke &app; as described in <xref linkend="file-roller-to-start"/>.</para></note>
+      <note><para>If the archive is encrypted, &app; will ask to enter the password before extracing the files.</para></note>
     </sect2>
 
 </sect1>
 
+<!-- ======= Create Archive Advanced Options  ============= --> 
+    <sect1 id="file-roller-create-options">
+      <title>Create Options</title>
+      <para>When creating a new archive, or when converting an existing archive to another format, click on <guilabel>Other Options</guilabel> the specify the following advanced options: 
+      </para>
+      <variablelist>
+       <!-- ============= -->	
+	<varlistentry>
+	  <term><guilabel>Password</guilabel></term>
+	  <listitem>
+	  <para>Type the password that will be used to encrypt the archive.  If no password is specified the archive will not be encrypted.</para>
+	  <note>
+	    <para>Not all the archive type support encryption.  For more information about file encryption, see <xref linkend="file-roller-encrypt-files"/>.</para>
+	  </note>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>	  
+	  <term><guilabel>Encrypt the file list too</guilabel></term>
+	  <listitem>
+	  <para>If this option is selected, the password will be requested even to view the list of files contained in the archive, otherwise it will be requested only to extract the files from the archive.  This options is available only if a password is specified.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>	  
+	  <term><guilabel>Split in volumes</guilabel></term>
+	  <listitem>
+	  <para>Select this option to split the archive in more files of the specified dimension.</para>
+	  <note>
+	    <para>Only 7-Zip and RAR archives support this feature.</para>
+	  </note>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </sect1>
+
 <!-- ======= Add Advanced Options  ============= --> 
     <sect1 id="file-roller-add-options">
       <title>Add Options</title>
@@ -1315,7 +1399,8 @@
                         </para>
                       </listitem>
                     </orderedlist>
-                    &app; automatically adds to the archive all files that you created during the last week, and updates all files that you modified during the last week. However, &app; does not remove from the archive the files that you deleted during the last week. The archive update operation is much faster than doing a full backup of your home folder. 
+                </para>
+                <para>&app; automatically adds to the archive all files that you created during the last week, and updates all files that you modified during the last week. However, &app; does not remove from the archive the files that you deleted during the last week. The archive update operation is much faster than doing a full backup of your home folder. 
 	    </para>
 	  </tip>
 	</listitem>
@@ -1342,6 +1427,14 @@
             </para>
           </listitem>
 	</varlistentry>
+        <!-- ============= -->	
+	<varlistentry>
+	  <term><guilabel>Exclude folders</guilabel></term>
+	  <listitem>
+            <para>Type a filename pattern in this text box to exclude folders with names that match the specified pattern. See <xref linkend="file-roller-pattern"/> for more information about filename patterns.
+            </para>
+          </listitem>
+	</varlistentry>      
        <!-- ============= -->	
       <varlistentry>
 	<term><guilabel>Include subfolders</guilabel></term>
@@ -1367,7 +1460,7 @@
 	    </para>
           </listitem>
 	</varlistentry>
-       <!-- ============= -->	
+       <!-- ============= -->
      <varlistentry>
 	<term><guibutton>Save Options</guibutton></term>
 	  <listitem>
@@ -1394,6 +1487,14 @@
             </itemizedlist>
           </listitem>
 	</varlistentry>
+       <!-- ============= -->	
+     <varlistentry>
+	<term><guibutton>Reset Options</guibutton></term>
+	  <listitem>
+            <para>Click on this button to reset the current selection of advanced add options to the default values.  
+            </para>
+          </listitem>
+	</varlistentry>
       </variablelist>
     </sect2>
   </sect1>
@@ -1482,7 +1583,7 @@
        <!-- ============= -->	
 	<varlistentry>
 	  <term><guilabel>Password</guilabel></term>
-	  <listitem><para>This option is only enabled if the archive type supports encryption. Currently, only <filename>.zip</filename> and <filename>.arj</filename> archives support encryption. </para>
+	  <listitem><para>This option is only enabled if the archive type supports encryption. Currently, only 7-ZIP, ZIP, RAR and ARJ archives support encryption. </para>
           <para>
 	     If the archive contains encrypted files, enter the required password in the <guilabel>Password</guilabel> text box to decrypt the specified files during the extraction process. The required password is the encryption password that was specified when the archive was created. For more information, see <xref linkend="file-roller-encrypt-files"/>.
           </para>

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Mon Jul 28 11:26:59 2008
@@ -25,6 +25,8 @@
 src/dlg-delete.h
 src/dlg-extract.c
 src/dlg-extract.h
+src/dlg-new.c
+src/dlg-new.h
 src/dlg-open-with.c
 src/dlg-open-with.h
 src/dlg-password.c

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Mon Jul 28 11:26:59 2008
@@ -51,6 +51,8 @@
 	dlg-delete.h			\
 	dlg-extract.c			\
 	dlg-extract.h			\
+	dlg-new.c			\
+	dlg-new.h			\
 	dlg-open-with.c			\
 	dlg-open-with.h			\
 	dlg-password.c			\

Modified: trunk/src/actions.c
==============================================================================
--- trunk/src/actions.c	(original)
+++ trunk/src/actions.c	Mon Jul 28 11:26:59 2008
@@ -22,6 +22,7 @@
 
 #include <config.h>
 #include <string.h>
+#include <math.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -30,6 +31,7 @@
 #include "dlg-add-folder.h"
 #include "dlg-extract.h"
 #include "dlg-delete.h"
+#include "dlg-new.h"
 #include "dlg-open-with.h"
 #include "dlg-password.h"
 #include "dlg-prop.h"
@@ -43,44 +45,35 @@
 #include "typedefs.h"
 
 
-typedef struct {
-	FrWindow  *window;
-	int       *supported_types;
-
-	GtkWidget *file_sel;
-	GtkWidget *combo_box;
-	GtkWidget *password;
-	GtkWidget *password_label;
-} SaveAsData;
-
-
 /* -- new archive -- */
 
 
 static void
-new_archive_dialog_destroy_cb (GtkWidget  *w,
-		               SaveAsData *data)
-{
-	g_free (data);
-}
-
-
-static void
-new_archive (GtkWidget *file_sel,
-	     FrWindow  *window,
-	     char      *uri)
+new_archive (DlgNewData *data,
+	     char       *uri)
 {
-	GtkWidget *archive_window;
-	gboolean   new_window;
+	GtkWidget  *archive_window;
+	gboolean    new_window;
+	const char *password;
+	gboolean    encrypt_header;
+	int         volume_size;
 
-	new_window = fr_window_archive_is_present (window) && ! fr_window_is_batch_mode (window);
+	new_window = fr_window_archive_is_present (data->window) && ! fr_window_is_batch_mode (data->window);
 	if (new_window)
 		archive_window = fr_window_new ();
 	else
-		archive_window = (GtkWidget *) window;
+		archive_window = (GtkWidget *) data->window;
+
+	password = dlg_new_data_get_password (data);
+	encrypt_header = dlg_new_data_get_encrypt_header (data);
+	volume_size = dlg_new_data_get_volume_size (data);
+
+	fr_window_set_password (FR_WINDOW (archive_window), password);
+	fr_window_set_encrypt_header (FR_WINDOW (archive_window), encrypt_header);
+	fr_window_set_volume_size (FR_WINDOW (archive_window), volume_size);
 
 	if (fr_window_archive_new (FR_WINDOW (archive_window), uri)) {
-		gtk_widget_destroy (file_sel);
+		gtk_widget_destroy (data->dialog);
 		if (! fr_window_is_batch_mode (FR_WINDOW (archive_window)))
 			gtk_window_present (GTK_WINDOW (archive_window));
 	}
@@ -108,14 +101,14 @@
 
 
 static char *
-get_full_path (SaveAsData *data)
+get_full_path (DlgNewData *data)
 {
 	char        *full_path = NULL;
 	char        *path;
 	const char  *filename;
 	int          idx;
 
-	path = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->file_sel));
+	path = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->dialog));
 
 	if ((path == NULL) || (*path == 0))
 		return NULL;
@@ -126,7 +119,7 @@
 		return NULL;
 	}
 
-	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->combo_box));
+	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->n_archive_type_combo_box));
 	if (idx > 0) {
 		const char *path_ext;
 		char       *default_ext;
@@ -146,7 +139,7 @@
 
 
 static char *
-get_archive_filename_from_selector (SaveAsData *data)
+get_archive_filename_from_selector (DlgNewData *data)
 {
 	char      *path = NULL;
 	GFile     *file, *dir;
@@ -159,7 +152,7 @@
 
 		g_free (path);
 
-		dialog = _gtk_error_dialog_new (GTK_WINDOW (data->file_sel),
+		dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog),
 						GTK_DIALOG_DESTROY_WITH_PARENT,
 						NULL,
 						_("Could not create the archive"),
@@ -197,7 +190,7 @@
 		g_object_unref (file);
 		g_free (path);
 
-		dialog = _gtk_error_dialog_new (GTK_WINDOW (data->file_sel),
+		dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog),
 						GTK_DIALOG_DESTROY_WITH_PARENT,
 						NULL,
 						_("Could not create the archive"),
@@ -216,7 +209,7 @@
 		char *new_path;
 		char *ext = NULL;
 
-		idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->combo_box));
+		idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->n_archive_type_combo_box));
 		if (idx > 0)
 			ext = mime_type_desc[data->supported_types[idx-1]].default_ext;
 		else
@@ -231,8 +224,8 @@
 	if (uri_exists (path)) {
 		GtkWidget *dialog;
 
-		if (! is_supported_extension (data->file_sel, path, data->supported_types)) {
-			dialog = _gtk_error_dialog_new (GTK_WINDOW (data->file_sel),
+		if (! is_supported_extension (data->dialog, path, data->supported_types)) {
+			dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog),
 							GTK_DIALOG_MODAL,
 							NULL,
 							_("Could not create the archive"),
@@ -247,7 +240,7 @@
 		g_file_delete (file, NULL, &err);
 		if (err != NULL) {
 			GtkWidget *dialog;
-			dialog = _gtk_error_dialog_new (GTK_WINDOW (data->file_sel),
+			dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog),
 							GTK_DIALOG_DESTROY_WITH_PARENT,
 							NULL,
 							_("Could not delete the old archive."),
@@ -270,7 +263,7 @@
 static void
 new_file_response_cb (GtkWidget  *w,
 		      int         response,
-		      SaveAsData *data)
+		      DlgNewData *data)
 {
 	char *path;
 
@@ -279,177 +272,39 @@
 					     FR_ACTION_CREATING_NEW_ARCHIVE,
 					     FR_PROC_ERROR_STOPPED,
 					     NULL);
-		gtk_widget_destroy (data->file_sel);
+		gtk_widget_destroy (data->dialog);
 		return;
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->file_sel), "file-roller-create");
+		show_help_dialog (GTK_WINDOW (data->dialog), "file-roller-create");
 		return;
 	}
 
 	path = get_archive_filename_from_selector (data);
 	if (path != NULL) {
-		new_archive (data->file_sel, data->window, path);
+		new_archive (data, path);
 		g_free (path);
 	}
 }
 
 
-static void
-update_password_availability_for_ext (SaveAsData *data,
-				      const char *ext)
-{
-	int i;
-
-	if (data->password == NULL)
-		return;
-
-	if (ext == NULL) {
-		gtk_widget_set_sensitive (data->password, FALSE);
-		gtk_widget_set_sensitive (data->password_label, FALSE);
-		return;
-	}
-
-	for (i = 0; mime_type_desc[i].mime_type != NULL; i++) {
-		if (strcmp (mime_type_desc[i].default_ext, ext) == 0) {
-			gtk_widget_set_sensitive (data->password, mime_type_desc[i].capabilities & FR_COMMAND_CAN_ENCRYPT);
-			gtk_widget_set_sensitive (data->password_label, mime_type_desc[i].capabilities & FR_COMMAND_CAN_ENCRYPT);
-			break;
-		}
-	}
-}
-
-
-static void
-filetype_combobox_changed_cb (GtkComboBox *combo_box,
-			      SaveAsData  *data)
-{
-	int         idx;
-	const char *uri, *basename;
-	const char *ext, *new_ext;
-	char       *basename_noext;
-	char       *new_basename;
-	char       *new_basename_uft8;
-
-	uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->file_sel));
-	if (uri == NULL)
-		return;
-
-	ext = get_archive_filename_extension (uri);
-	if (ext == NULL)
-		ext = "";
-
-	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->combo_box)) - 1;
-	if (idx < 0) {
-		if (data->password != NULL) {
-			gtk_widget_set_sensitive (data->password, TRUE);
-			gtk_widget_set_sensitive (data->password_label, TRUE);
-		}
-		return;
-	}
-
-	basename = file_name_from_path (uri);
-	basename_noext = g_strndup (basename, strlen (basename) - strlen (ext));
-
-	new_ext = mime_type_desc[data->supported_types[idx]].default_ext;
-	new_basename = g_strconcat (basename_noext, new_ext, NULL);
-	new_basename_uft8 = g_uri_unescape_string (new_basename, NULL);
-	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->file_sel), new_basename_uft8);
-	update_password_availability_for_ext (data, new_ext);
-
-	g_free (new_basename_uft8);
-	g_free (new_basename);
-	g_free (basename_noext);
-}
-
-
 void
 show_new_archive_dialog (FrWindow   *window,
 			 const char *archive_name)
 {
-	SaveAsData    *data;
-	GtkWidget     *file_sel;
-	GtkWidget     *hbox;
-	GtkFileFilter *filter;
-	int            i;
-
-	data = g_new0 (SaveAsData, 1);
-	data->window = window;
-	data->supported_types = create_type;
+	DlgNewData *data;
 
-	file_sel = gtk_file_chooser_dialog_new (_("New"),
-						GTK_WINDOW (window),
-						GTK_FILE_CHOOSER_ACTION_SAVE,
-						GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-						GTK_STOCK_NEW, GTK_RESPONSE_OK,
-						GTK_STOCK_HELP, GTK_RESPONSE_HELP,
-						NULL);
-	data->file_sel = file_sel;
-
-	gtk_dialog_set_default_response (GTK_DIALOG (file_sel), GTK_RESPONSE_OK);
-	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (file_sel), FALSE);
-	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (file_sel), fr_window_get_open_default_dir (window));
-
-	if (archive_name != NULL) {
-		char *ext, *name_ext;
-
-		ext = eel_gconf_get_string (PREF_BATCH_ADD_DEFAULT_EXTENSION, ".tgz");
-		name_ext = g_strconcat (archive_name, ext, NULL);
-		gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_sel), name_ext);
-		g_free (name_ext);
-		g_free (ext);
-	}
-
-	filter = gtk_file_filter_new ();
-	gtk_file_filter_set_name (filter, _("All archives"));
-	for (i = 0; data->supported_types[i] != -1; i++)
-		gtk_file_filter_add_mime_type (filter, mime_type_desc[data->supported_types[i]].mime_type);
-	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_sel), filter);
-	gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (file_sel), filter);
-
-	filter = gtk_file_filter_new ();
-	gtk_file_filter_set_name (filter, _("All files"));
-	gtk_file_filter_add_pattern (filter, "*");
-	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_sel), filter);
-
-	/**/
-
-	hbox = gtk_hbox_new (FALSE, 12);
-	gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (file_sel), hbox);
-
-	gtk_box_pack_start (GTK_BOX (hbox),
-			    gtk_label_new (_("Archive type:")),
-			    FALSE, FALSE, 0);
-
-	data->combo_box = gtk_combo_box_new_text ();
-	gtk_combo_box_append_text (GTK_COMBO_BOX (data->combo_box), _("Automatic"));
-	for (i = 0; data->supported_types[i] != -1; i++) {
-		int idx = data->supported_types[i];
-		gtk_combo_box_append_text (GTK_COMBO_BOX (data->combo_box),
-					   _(mime_type_desc[idx].name));
-	}
-	gtk_combo_box_set_active (GTK_COMBO_BOX (data->combo_box), 0);
-	gtk_box_pack_start (GTK_BOX (hbox), data->combo_box, TRUE, TRUE, 0);
-	gtk_widget_show_all (hbox);
-
-	/**/
+	if (archive_name != NULL)
+		data = dlg_save_as (window, archive_name);
+	else
+		data = dlg_new (window);
 
-	g_signal_connect (G_OBJECT (file_sel),
+	g_signal_connect (G_OBJECT (data->dialog),
 			  "response",
 			  G_CALLBACK (new_file_response_cb),
 			  data);
-	g_signal_connect (G_OBJECT (data->combo_box),
-			  "changed",
-			  G_CALLBACK (filetype_combobox_changed_cb),
-			  data);
-	g_signal_connect (G_OBJECT (file_sel),
-			  "destroy",
-			  G_CALLBACK (new_archive_dialog_destroy_cb),
-			  data);
-
-	gtk_window_set_modal (GTK_WINDOW (file_sel),TRUE);
-	gtk_widget_show_all (file_sel);
+	gtk_window_present (GTK_WINDOW (data->dialog));
 }
 
 
@@ -559,27 +414,22 @@
 
 
 static void
-save_file_destroy_cb (GtkWidget  *w,
-		      SaveAsData *data)
-{
-	g_free (data);
-}
-
-
-static void
 save_file_response_cb (GtkWidget  *w,
 		       gint        response,
-		       SaveAsData *data)
+		       DlgNewData *data)
 {
-	char *path;
+	char       *path;
+	const char *password;
+	gboolean    encrypt_header;
+	int         volume_size;
 
 	if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-		gtk_widget_destroy (data->file_sel);
+		gtk_widget_destroy (data->dialog);
 		return;
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->file_sel), "file-roller-convert-archive");
+		show_help_dialog (GTK_WINDOW (data->dialog), "file-roller-convert-archive");
 		return;
 	}
 
@@ -587,9 +437,15 @@
 	if (path == NULL)
 		return;
 
-	fr_window_archive_save_as (data->window, path, gtk_entry_get_text (GTK_ENTRY (data->password)));
+	password = dlg_new_data_get_password (data);
+	encrypt_header = dlg_new_data_get_encrypt_header (data);
+	volume_size = dlg_new_data_get_volume_size (data);
+
+	eel_gconf_set_integer (PREF_BATCH_VOLUME_SIZE, volume_size);
+
+	fr_window_archive_save_as (data->window, path, password, encrypt_header, volume_size);
+	gtk_widget_destroy (data->dialog);
 
-	gtk_widget_destroy (data->file_sel);
 	g_free (path);
 }
 
@@ -598,33 +454,9 @@
 activate_action_save_as (GtkAction *action,
 			 gpointer   callback_data)
 {
-	FrWindow      *window = callback_data;
-	GtkWidget     *file_sel;
-	GtkWidget     *table;
-	GtkWidget     *hbox;
-	GtkWidget     *label;
-	SaveAsData    *data;
-	GtkFileFilter *filter;
-	int            i;
-	const char    *password;
-
-	data = g_new0 (SaveAsData, 1);
-	data->window = window;
-	data->supported_types = save_type;
-
-	file_sel = gtk_file_chooser_dialog_new (_("Save"),
-						GTK_WINDOW (window),
-						GTK_FILE_CHOOSER_ACTION_SAVE,
-						GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-						GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-						GTK_STOCK_HELP, GTK_RESPONSE_HELP,
-						NULL);
-	data->file_sel = file_sel;
-
-	gtk_dialog_set_default_response (GTK_DIALOG (file_sel), GTK_RESPONSE_OK);
-	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (file_sel), FALSE);
-	gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (file_sel), TRUE);
-	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (file_sel), fr_window_get_open_default_dir (window));
+	FrWindow   *window = callback_data;
+	DlgNewData *data;
+	char       *archive_name = NULL;
 
 	if (fr_window_get_archive_uri (window)) {
 		const char *uri;
@@ -635,104 +467,28 @@
 		uri = fr_window_get_archive_uri (window);
 		file = g_file_new_for_uri (uri);
 		info = g_file_query_info (file,
-				G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
-				0, NULL, &err);
+					  G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
+					  0, NULL, &err);
 
 		if (err != NULL) {
 			g_warning ("Failed to get display name for uri %s: %s", uri, err->message);
 			g_clear_error (&err);
 		}
-		else {
-			gtk_file_chooser_set_current_name (
-					GTK_FILE_CHOOSER (file_sel),
-					g_file_info_get_display_name (info));
-		}
+		else
+			archive_name = g_strdup (g_file_info_get_display_name (info));
+
 		g_object_unref (info);
 		g_object_unref (file);
 	}
 
-	filter = gtk_file_filter_new ();
-	gtk_file_filter_set_name (filter, _("All archives"));
-	for (i = 0; data->supported_types[i] != -1; i++)
-		gtk_file_filter_add_mime_type (filter, mime_type_desc[data->supported_types[i]].mime_type);
-	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_sel), filter);
-	gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (file_sel), filter);
-
-	filter = gtk_file_filter_new ();
-	gtk_file_filter_set_name (filter, _("All files"));
-	gtk_file_filter_add_pattern (filter, "*");
-	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_sel), filter);
-
-	data->password = gtk_entry_new ();
-	gtk_entry_set_visibility (GTK_ENTRY (data->password), FALSE);
-
-	/**/
-
-	table = gtk_table_new (2, 2, FALSE);
-	gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-	gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-
-	/* archive type */
-
-	label = gtk_label_new_with_mnemonic (_("Archive _type:"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
-	gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
-			  (GtkAttachOptions) (GTK_FILL),
-			  (GtkAttachOptions) (0), 0, 0);
-
-	data->combo_box = gtk_combo_box_new_text ();
-	gtk_combo_box_append_text (GTK_COMBO_BOX (data->combo_box), _("Automatic"));
-	for (i = 0; data->supported_types[i] != -1; i++)
-		gtk_combo_box_append_text (GTK_COMBO_BOX (data->combo_box),
-					   _(mime_type_desc[data->supported_types[i]].name));
-	gtk_combo_box_set_active (GTK_COMBO_BOX (data->combo_box), 0);
-	gtk_table_attach (GTK_TABLE (table), data->combo_box, 1, 2, 0, 1,
-			  (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-			  (GtkAttachOptions) (0), 0, 0);
-
-	/* password */
-
-	hbox = gtk_hbox_new (FALSE, 0);
-
-	data->password_label = label = gtk_label_new_with_mnemonic (_("_Encrypt with password:"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
-
-	gtk_box_pack_start (GTK_BOX (hbox), data->password, FALSE, TRUE, 0);
-
-	gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
-			  (GtkAttachOptions) (GTK_FILL),
-			  (GtkAttachOptions) (0), 0, 0);
-	gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 1, 2,
-			  (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-			  (GtkAttachOptions) (0), 0, 0);
-
-	gtk_widget_show_all (table);
-	gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (file_sel), table);
-
-	/* set the default data */
-
-	password = fr_window_get_password (window);
-	if (password == NULL)
-		password = "";
-	gtk_entry_set_text (GTK_ENTRY (data->password), password);
-
-	/**/
-
-	g_signal_connect (G_OBJECT (file_sel),
+	data = dlg_save_as (window, archive_name);
+	g_signal_connect (G_OBJECT (data->dialog),
 			  "response",
 			  G_CALLBACK (save_file_response_cb),
 			  data);
-	g_signal_connect (G_OBJECT (file_sel),
-			  "destroy",
-			  G_CALLBACK (save_file_destroy_cb),
-			  data);
-	g_signal_connect (G_OBJECT (data->combo_box),
-			  "changed",
-			  G_CALLBACK (filetype_combobox_changed_cb),
-			  data);
+	gtk_window_present (GTK_WINDOW (data->dialog));
 
-	gtk_window_set_modal (GTK_WINDOW (file_sel), TRUE);
-	gtk_widget_show_all (file_sel);
+	g_free (archive_name);
 }
 
 

Modified: trunk/src/dlg-batch-add.c
==============================================================================
--- trunk/src/dlg-batch-add.c	(original)
+++ trunk/src/dlg-batch-add.c	Mon Jul 28 11:26:59 2008
@@ -44,7 +44,6 @@
 #define ARCHIVE_ICON_SIZE (48)
 #define DEFAULT_EXTENSION ".tar.gz"
 #define BAD_CHARS "/\\*"
-#define MEGABYTE (1024 * 1024)
 
 
 typedef struct {
@@ -112,7 +111,7 @@
 	if (data->single_file)
 		save_type_list = single_file_save_type;
 	else
-		save_type_list =  save_type;
+		save_type_list = save_type;
 
 	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->a_archive_type_combo_box));
 	if (mime_type_desc[save_type_list[idx]].capabilities & FR_COMMAND_CAN_ENCRYPT) {
@@ -143,7 +142,14 @@
 }
 
 
-/* called when the "add" button is pressed. */
+static void
+help_clicked_cb (GtkWidget  *widget,
+		 DialogData *data)
+{
+	show_help_dialog (GTK_WINDOW (data->dialog), "file-roller-fmgr-add");
+}
+
+
 static void
 add_clicked_cb (GtkWidget  *widget,
 		DialogData *data)
@@ -488,6 +494,7 @@
 {
 	DialogData   *data;
 	GtkWidget    *cancel_button;
+	GtkWidget    *help_button;
 	GtkWidget    *add_button;
 	GtkWidget    *a_archive_type_box;
 	GtkSizeGroup *size_group;
@@ -530,6 +537,7 @@
 
 	add_button = glade_xml_get_widget (data->gui, "a_add_button");
 	cancel_button = glade_xml_get_widget (data->gui, "a_cancel_button");
+	help_button = glade_xml_get_widget (data->gui, "a_help_button");
 	a_archive_type_box = glade_xml_get_widget (data->gui, "a_archive_type_box");
 
 	data->add_image = glade_xml_get_widget (data->gui, "a_add_image");
@@ -598,6 +606,10 @@
 			  "clicked",
 			  G_CALLBACK (add_clicked_cb),
 			  data);
+	g_signal_connect (G_OBJECT (help_button),
+			  "clicked",
+			  G_CALLBACK (help_clicked_cb),
+			  data);
 	g_signal_connect (G_OBJECT (data->a_archive_type_combo_box),
 			  "changed",
 			  G_CALLBACK (archive_type_combo_box_changed_cb),

Added: trunk/src/dlg-new.c
==============================================================================
--- (empty file)
+++ trunk/src/dlg-new.c	Mon Jul 28 11:26:59 2008
@@ -0,0 +1,417 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  File-Roller
+ *
+ *  Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <string.h>
+#include <math.h>
+#include <unistd.h>
+
+#include <gio/gio.h>
+#include "dlg-new.h"
+#include "file-utils.h"
+#include "fr-stock.h"
+#include "gconf-utils.h"
+#include "main.h"
+#include "preferences.h"
+
+
+#define GLADE_FILE "new.glade"
+#define DEFAULT_EXTENSION ".tar.gz"
+#define BAD_CHARS "/\\*"
+#define MEGABYTE (1024 * 1024)
+
+
+/* called when the main dialog is closed. */
+static void
+destroy_cb (GtkWidget  *widget,
+	    DlgNewData *data)
+{
+	g_object_unref (data->gui);
+	g_free (data);
+}
+
+
+static void
+update_sensitivity_for_ext (DlgNewData *data,
+			    const char *ext)
+{
+	const char *mime_type;
+	int         i;
+
+	mime_type = get_mime_type_from_extension (ext);
+
+	if (mime_type == NULL) {
+		gtk_widget_set_sensitive (data->n_password_entry, FALSE);
+		gtk_widget_set_sensitive (data->n_password_label, FALSE);
+		gtk_widget_set_sensitive (data->n_encrypt_header_checkbutton, FALSE);
+		gtk_widget_set_sensitive (data->n_volume_box, FALSE);
+		return;
+	}
+
+	for (i = 0; mime_type_desc[i].mime_type != NULL; i++) {
+		if (strcmp (mime_type_desc[i].mime_type, mime_type) == 0) {
+			gboolean sensitive;
+
+			sensitive = mime_type_desc[i].capabilities & FR_COMMAND_CAN_ENCRYPT;
+			gtk_widget_set_sensitive (data->n_password_entry, sensitive);
+			gtk_widget_set_sensitive (data->n_password_label, sensitive);
+
+			sensitive = mime_type_desc[i].capabilities & FR_COMMAND_CAN_ENCRYPT_HEADER;
+			gtk_widget_set_sensitive (data->n_encrypt_header_checkbutton, sensitive);
+
+			sensitive = mime_type_desc[i].capabilities & FR_COMMAND_CAN_CREATE_VOLUMES;
+			gtk_widget_set_sensitive (data->n_volume_box, sensitive);
+
+			break;
+		}
+	}
+}
+
+
+static int
+get_archive_type (DlgNewData *data)
+{
+	const char *uri;
+	const char *ext;
+
+	uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->dialog));
+	if (uri == NULL)
+		return -1;
+
+	ext = get_archive_filename_extension (uri);
+	if (ext == NULL) {
+		int idx;
+
+		idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->n_archive_type_combo_box)) - 1;
+		if (idx >= 0)
+			return data->supported_types[idx];
+
+		ext = DEFAULT_EXTENSION;
+	}
+
+	return get_mime_type_index (get_mime_type_from_extension (ext));
+}
+
+
+static void
+archive_type_combo_box_changed_cb (GtkComboBox *combo_box,
+				   DlgNewData  *data)
+{
+	int         idx;
+	const char *uri, *basename;
+	const char *ext, *new_ext;
+	char       *basename_noext;
+	char       *new_basename;
+	char       *new_basename_uft8;
+
+	uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->dialog));
+	if (uri == NULL)
+		return;
+
+	ext = get_archive_filename_extension (uri);
+	if (ext == NULL)
+		ext = "";
+
+	idx = gtk_combo_box_get_active (GTK_COMBO_BOX (data->n_archive_type_combo_box)) - 1;
+	if (idx < 0) {
+		update_sensitivity_for_ext (data, ext);
+		return;
+	}
+
+	new_ext = mime_type_desc[data->supported_types[idx]].default_ext;
+	basename = file_name_from_path (uri);
+	basename_noext = g_strndup (basename, strlen (basename) - strlen (ext));
+	new_basename = g_strconcat (basename_noext, new_ext, NULL);
+	new_basename_uft8 = g_uri_unescape_string (new_basename, NULL);
+
+	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->dialog), new_basename_uft8);
+	update_sensitivity_for_ext (data, new_ext);
+
+	g_free (new_basename_uft8);
+	g_free (new_basename);
+	g_free (basename_noext);
+}
+
+
+static void
+update_sensitivity (DlgNewData *data)
+{
+	const char *password;
+	gboolean    void_password;
+
+	password = gtk_entry_get_text (GTK_ENTRY (data->n_password_entry));
+	void_password = (password == NULL) || (strcmp (password, "") == 0);
+	gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (data->n_encrypt_header_checkbutton), void_password);
+	/*gtk_widget_set_sensitive (GTK_WIDGET (data->n_encrypt_header_checkbutton), ! void_password);*/
+	gtk_widget_set_sensitive (data->n_volume_spinbutton, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->n_volume_checkbutton)));
+}
+
+
+static void
+password_entry_changed_cb (GtkEditable *editable,
+			   gpointer     user_data)
+{
+	update_sensitivity ((DlgNewData *) user_data);
+}
+
+
+static void
+volume_toggled_cb (GtkToggleButton *toggle_button,
+		   gpointer         user_data)
+{
+	update_sensitivity ((DlgNewData *) user_data);
+}
+
+
+static DlgNewData *
+dlg_new_archive (FrWindow  *window,
+		int        *supported_types,
+		const char *default_name)
+{
+	DlgNewData    *data;
+	GtkWidget     *n_archive_type_box;
+	GtkWidget     *n_new_button;
+	GtkSizeGroup  *size_group;
+	GtkFileFilter *filter;
+	/*char          *default_ext;*/
+	int            i;
+
+	data = g_new0 (DlgNewData, 1);
+
+	data->gui = glade_xml_new (GLADEDIR "/" GLADE_FILE , NULL, NULL);
+	if (data->gui == NULL) {
+		g_warning ("Could not find " GLADE_FILE "\n");
+		return NULL;
+	}
+
+	data->window = window;
+	data->supported_types = supported_types;
+
+	/* Get the widgets. */
+
+	data->dialog = glade_xml_get_widget (data->gui, "filechooserdialog");
+
+	data->n_password_entry = glade_xml_get_widget (data->gui, "n_password_entry");
+	data->n_password_label = glade_xml_get_widget (data->gui, "n_password_label");
+	data->n_other_options_expander = glade_xml_get_widget (data->gui, "n_other_options_expander");
+	data->n_encrypt_header_checkbutton = glade_xml_get_widget (data->gui, "n_encrypt_header_checkbutton");
+
+	data->n_volume_checkbutton = glade_xml_get_widget (data->gui, "n_volume_checkbutton");
+	data->n_volume_spinbutton = glade_xml_get_widget (data->gui, "n_volume_spinbutton");
+	data->n_volume_box = glade_xml_get_widget (data->gui, "n_volume_box");
+
+	n_archive_type_box = glade_xml_get_widget (data->gui, "n_archive_type_box");
+	n_new_button = glade_xml_get_widget (data->gui, "n_new_button");
+
+	/* Set widgets data. */
+
+	gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK);
+	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (data->dialog), fr_window_get_open_default_dir (window));
+
+	if (default_name != NULL) {
+		gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->dialog), default_name);
+		/*char *ext, *name_ext;
+
+		ext = eel_gconf_get_string (PREF_BATCH_ADD_DEFAULT_EXTENSION, ".tgz");
+		name_ext = g_strconcat (default_name, ext, NULL);
+		gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->dialog), name_ext);
+		g_free (name_ext);
+		g_free (ext);*/
+	}
+
+	filter = gtk_file_filter_new ();
+	gtk_file_filter_set_name (filter, _("All archives"));
+	for (i = 0; data->supported_types[i] != -1; i++)
+		gtk_file_filter_add_mime_type (filter, mime_type_desc[data->supported_types[i]].mime_type);
+	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (data->dialog), filter);
+	gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (data->dialog), filter);
+
+	filter = gtk_file_filter_new ();
+	gtk_file_filter_set_name (filter, _("All files"));
+	gtk_file_filter_add_pattern (filter, "*");
+	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (data->dialog), filter);
+
+	/**/
+
+	size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+	gtk_size_group_add_widget (size_group, glade_xml_get_widget (data->gui, "n_archive_type_label"));
+	gtk_size_group_add_widget (size_group, glade_xml_get_widget (data->gui, "n_password_label"));
+
+	gtk_button_set_use_stock (GTK_BUTTON (n_new_button), TRUE);
+	gtk_button_set_label (GTK_BUTTON (n_new_button), FR_STOCK_CREATE_ARCHIVE);
+	gtk_expander_set_expanded (GTK_EXPANDER (data->n_other_options_expander), eel_gconf_get_boolean (PREF_BATCH_OTHER_OPTIONS, FALSE));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->n_encrypt_header_checkbutton), eel_gconf_get_boolean (PREF_ENCRYPT_HEADER, FALSE));
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->n_volume_spinbutton), (double) eel_gconf_get_integer (PREF_BATCH_VOLUME_SIZE, 0) / MEGABYTE);
+
+	/* archive type combobox */
+
+	data->n_archive_type_combo_box = gtk_combo_box_new_text ();
+	gtk_combo_box_append_text (GTK_COMBO_BOX (data->n_archive_type_combo_box), _("Automatic"));
+	for (i = 0; data->supported_types[i] != -1; i++) {
+		int idx = data->supported_types[i];
+		gtk_combo_box_append_text (GTK_COMBO_BOX (data->n_archive_type_combo_box),
+					   _(mime_type_desc[idx].name));
+	}
+	gtk_combo_box_set_active (GTK_COMBO_BOX (data->n_archive_type_combo_box), 0);
+	gtk_box_pack_start (GTK_BOX (n_archive_type_box), data->n_archive_type_combo_box, TRUE, TRUE, 0);
+	gtk_widget_show_all (n_archive_type_box);
+
+	/* Set the signals handlers. */
+
+	/*g_signal_connect (G_OBJECT (data->dialog),
+			  "response",
+			  G_CALLBACK (new_file_response_cb),
+			  data);*/
+
+	g_signal_connect (G_OBJECT (data->dialog),
+			  "destroy",
+			  G_CALLBACK (destroy_cb),
+			  data);
+
+	/*
+	g_signal_connect_swapped (G_OBJECT (cancel_button),
+				  "clicked",
+				  G_CALLBACK (gtk_widget_destroy),
+				  G_OBJECT (data->dialog));
+	g_signal_connect (G_OBJECT (add_button),
+			  "clicked",
+			  G_CALLBACK (add_clicked_cb),
+			  data);*/
+
+	g_signal_connect (G_OBJECT (data->n_archive_type_combo_box),
+			  "changed",
+			  G_CALLBACK (archive_type_combo_box_changed_cb),
+			  data);
+	g_signal_connect (G_OBJECT (data->n_password_entry),
+			  "changed",
+			  G_CALLBACK (password_entry_changed_cb),
+			  data);
+	g_signal_connect (G_OBJECT (data->n_volume_checkbutton),
+			  "toggled",
+			  G_CALLBACK (volume_toggled_cb),
+			  data);
+
+	/* Run dialog. */
+
+/*	default_ext = eel_gconf_get_string (PREF_BATCH_ADD_DEFAULT_EXTENSION, DEFAULT_EXTENSION);
+	update_archive_type_combo_box_from_ext (data, default_ext);
+	g_free (default_ext);*/
+
+	update_sensitivity (data);
+
+	gtk_window_set_modal (GTK_WINDOW (data->dialog), TRUE);
+	gtk_window_set_transient_for (GTK_WINDOW (data->dialog), GTK_WINDOW (data->window));
+	/*gtk_window_present (GTK_WINDOW (data->dialog));*/
+
+	return data;
+}
+
+
+DlgNewData *
+dlg_new (FrWindow *window)
+{
+	DlgNewData *data;
+
+	data = dlg_new_archive (window, create_type, NULL);
+	gtk_window_set_title (GTK_WINDOW (data->dialog), _("New"));
+
+	return data;
+}
+
+
+DlgNewData *
+dlg_save_as (FrWindow   *window,
+	     const char *default_name)
+{
+	DlgNewData *data;
+
+	data = dlg_new_archive (window, save_type, default_name);
+	gtk_window_set_title (GTK_WINDOW (data->dialog), _("Save"));
+
+	return data;
+}
+
+
+const char *
+dlg_new_data_get_password (DlgNewData *data)
+{
+	const char *password = NULL;
+	int         idx;
+
+	idx = get_archive_type (data);
+	if (idx < 0)
+		return NULL;
+
+	if (mime_type_desc[idx].capabilities & FR_COMMAND_CAN_ENCRYPT)
+		password = (char*) gtk_entry_get_text (GTK_ENTRY (data->n_password_entry));
+
+	return password;
+}
+
+
+gboolean
+dlg_new_data_get_encrypt_header (DlgNewData *data)
+{
+	gboolean encrypt_header = FALSE;
+	int      idx;
+
+	idx = get_archive_type (data);
+	if (idx < 0)
+		return FALSE;
+
+	if (mime_type_desc[idx].capabilities & FR_COMMAND_CAN_ENCRYPT) {
+		char *password = (char*) gtk_entry_get_text (GTK_ENTRY (data->n_password_entry));
+		if (password != NULL) {
+			password = g_strstrip (password);
+			if (strcmp (password, "") != 0) {
+				if (mime_type_desc[idx].capabilities & FR_COMMAND_CAN_ENCRYPT_HEADER)
+					encrypt_header = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->n_encrypt_header_checkbutton));
+			}
+		}
+	}
+
+	return encrypt_header;
+}
+
+
+int
+dlg_new_data_get_volume_size (DlgNewData *data)
+{
+	guint volume_size = 0;
+	int   idx;
+
+	idx = get_archive_type (data);
+	if (idx < 0)
+		return 0;
+
+	if ((mime_type_desc[idx].capabilities & FR_COMMAND_CAN_CREATE_VOLUMES)
+	    && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->n_volume_checkbutton)))
+	{
+		double value;
+
+		value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (data->n_volume_spinbutton));
+		volume_size = floor (value * MEGABYTE);
+
+	}
+
+	return volume_size;
+}

Added: trunk/src/dlg-new.h
==============================================================================
--- (empty file)
+++ trunk/src/dlg-new.h	Mon Jul 28 11:26:59 2008
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  File-Roller
+ *
+ *  Copyright (C) 2008 The Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef DLG_NEW_H
+#define DLG_NEW_H
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include "fr-window.h"
+
+
+typedef struct {
+	FrWindow   *window;
+	int        *supported_types;
+	GladeXML   *gui;
+
+	GtkWidget  *dialog;
+	GtkWidget  *n_archive_type_combo_box;
+	GtkWidget  *n_other_options_expander;
+	GtkWidget  *n_password_entry;
+	GtkWidget  *n_password_label;
+	GtkWidget  *n_encrypt_header_checkbutton;
+	GtkWidget  *n_volume_checkbutton;
+	GtkWidget  *n_volume_spinbutton;
+	GtkWidget  *n_volume_box;
+} DlgNewData;
+
+
+DlgNewData *    dlg_new                          (FrWindow   *window);
+DlgNewData *    dlg_save_as                      (FrWindow   *window,
+	 		                          const char *default_name);
+const char *    dlg_new_data_get_password        (DlgNewData *data);
+gboolean        dlg_new_data_get_encrypt_header  (DlgNewData *data);
+int             dlg_new_data_get_volume_size     (DlgNewData *data);
+
+#endif /* DLG_NEW_H */

Modified: trunk/src/fr-archive.c
==============================================================================
--- trunk/src/fr-archive.c	(original)
+++ trunk/src/fr-archive.c	Mon Jul 28 11:26:59 2008
@@ -533,6 +533,7 @@
 	} sniffer_data [] = {
 		/* Magic numbers taken from magic/Magdir/archive from the
 		 * file-4.21 tarball. */
+		{ "application/x-7z-compressed", "7z\274\257\047\034", 0, 5 },
 		{ "application/x-ace", "**ACE**", 7, 7 },
 		{ "application/x-arj", "\x60\xea", 0, 2 },
 		{ "application/x-rar", "Rar!", 0, 4 },
@@ -857,6 +858,28 @@
 
 
 static void
+fr_archive_change_name (FrArchive  *archive,
+		        const char *filename)
+{
+	const char *name;
+	GFile      *parent;
+
+
+	name = file_name_from_path (filename);
+
+	parent = g_file_get_parent (archive->file);
+	g_object_unref (archive->file);
+	archive->file = g_file_get_child (parent, name);
+	g_object_unref (parent);
+
+	parent = g_file_get_parent (archive->local_copy);
+	g_object_unref (archive->local_copy);
+	archive->local_copy = g_file_get_child (parent, name);
+	g_object_unref (parent);
+}
+
+
+static void
 action_performed (FrCommand   *command,
 		  FrAction     action,
 		  FrProcError *error,
@@ -887,6 +910,10 @@
 				dropped_items_data_free (archive->priv->dropped_items_data);
 				archive->priv->dropped_items_data = NULL;
 			}
+			/* the name of the volumes are different from the
+			 * original name */
+			if (archive->command->multi_volume)
+				fr_archive_change_name (archive, archive->command->filename);
 			if (! g_file_has_uri_scheme (archive->file, "file")) {
 				copy_to_remote_location (archive, action);
 				return;
@@ -1261,9 +1288,9 @@
 		fr_archive_load (archive, filename, NULL);
 	}
 	else {
-		g_object_unref (archive->file);
+		if (archive->file != NULL)
+			g_object_unref (archive->file);
 		archive->file = g_file_new_for_path (filename);
-
 		fr_command_set_filename (archive->command, filename);
 	}
 }
@@ -1454,6 +1481,41 @@
 }
 
 
+static GList *
+split_in_chunks (GList *file_list)
+{
+	GList *chunks = NULL;
+	GList *new_file_list;
+	GList *scan;
+
+	new_file_list = g_list_copy (file_list);
+	for (scan = new_file_list; scan != NULL; /* void */) {
+		GList *prev = scan->prev;
+		GList *chunk;
+		int    l;
+
+		chunk = scan;
+		l = 0;
+		while ((scan != NULL) && (l < MAX_CHUNK_LEN)) {
+			if (l == 0)
+				l = strlen (scan->data);
+			prev = scan;
+			scan = scan->next;
+			if (scan != NULL)
+				l += strlen (scan->data);
+		}
+		if (prev != NULL) {
+			if (prev->next != NULL)
+				prev->next->prev = NULL;
+			prev->next = NULL;
+		}
+		chunks = g_list_append (chunks, chunk);
+	}
+
+	return chunks;
+}
+
+
 void
 fr_archive_add (FrArchive     *archive,
 		GList         *file_list,
@@ -1606,34 +1668,26 @@
 		g_free (list_dir);
 	}
 	else {
+		GList *chunks = NULL;
+
 		/* specify the file list on the command line, splitting
 		 * in more commands to avoid to overflow the command line
 		 * length limit. */
-		for (scan = new_file_list; scan != NULL; ) {
-			GList *prev = scan->prev;
-			GList *chunk_list;
-			int    l;
 
-			chunk_list = scan;
-			l = 0;
-			while ((scan != NULL) && (l < MAX_CHUNK_LEN)) {
-				if (l == 0)
-					l = strlen (scan->data);
-				prev = scan;
-				scan = scan->next;
-				if (scan != NULL)
-					l += strlen (scan->data);
-			}
+		chunks = split_in_chunks (new_file_list);
+		for (scan = chunks; scan != NULL; scan = scan->next) {
+			GList *chunk = scan->data;
 
-			prev->next = NULL;
 			fr_command_add (archive->command,
 					NULL,
-					chunk_list,
+					chunk,
 					tmp_base_dir,
 					update,
 					recursive);
-			prev->next = scan;
+			g_list_free (chunk);
 		}
+
+		g_list_free (chunks);
 	}
 
 	path_list_free (new_file_list);

Modified: trunk/src/fr-command-7z.c
==============================================================================
--- trunk/src/fr-command-7z.c	(original)
+++ trunk/src/fr-command-7z.c	Mon Jul 28 11:26:59 2008
@@ -99,7 +99,7 @@
 			p7z_comm->list_started = TRUE;
 		else if (strncmp (line, "Multivolume = ", 14) == 0) {
 			fields = g_strsplit (line, " = ", 2);
-			p7z_comm->multi_volume = (strcmp (fields[1], "+") == 0);
+			comm->multi_volume = (strcmp (fields[1], "+") == 0);
 			g_strfreev (fields);
 		}
 		return;
@@ -218,7 +218,6 @@
 		file_data_free (p7z_comm->fdata);
 		p7z_comm->fdata = NULL;
 	}
-	p7z_comm->multi_volume = FALSE;
 	p7z_comm->list_started = FALSE;
 	fr_process_start (comm->process);
 }
@@ -256,6 +255,14 @@
 {
 	FrCommand *comm = FR_COMMAND (data);
 
+	if ((comm->volume_size > 0) && (strncmp (line, "Creating archive ", 17) == 0)) {
+		char *volume_filename;
+
+		volume_filename = g_strconcat (comm->filename, ".001", NULL);
+		fr_command_set_multi_volume (comm, volume_filename);
+		g_free (volume_filename);
+	}
+
 	if (comm->n_files != 0)
 		parse_progress_line (comm, "Compressing  ", _("Adding file: "), line);
 }
@@ -494,7 +501,7 @@
 	}
 
 	/* multi-volumes are read-only */
-	if ((comm->files->len > 0) && FR_COMMAND_7Z (comm)->multi_volume && (capabilities & FR_COMMAND_CAN_WRITE))
+	if ((comm->files->len > 0) && comm->multi_volume && (capabilities & FR_COMMAND_CAN_WRITE))
 		capabilities ^= FR_COMMAND_CAN_WRITE;
 
 	return capabilities;

Modified: trunk/src/fr-command-7z.h
==============================================================================
--- trunk/src/fr-command-7z.h	(original)
+++ trunk/src/fr-command-7z.h	Mon Jul 28 11:26:59 2008
@@ -42,7 +42,6 @@
 	FrCommand __parent;
 	gboolean   list_started;
 	FileData  *fdata;
-	gboolean   multi_volume;
 };
 
 struct _FrCommand7zClass

Modified: trunk/src/fr-command-rar.c
==============================================================================
--- trunk/src/fr-command-rar.c	(original)
+++ trunk/src/fr-command-rar.c	Mon Jul 28 11:26:59 2008
@@ -107,7 +107,7 @@
 			rar_comm->odd_line = TRUE;
 		}
 		else if (strncmp (line, "Volume ", 7) == 0)
-			rar_comm->multi_volume = TRUE;
+			comm->multi_volume = TRUE;
 		return;
 	}
 
@@ -208,7 +208,6 @@
 fr_command_rar_list (FrCommand  *comm)
 {
 	FR_COMMAND_RAR (comm)->list_started = FALSE;
-	FR_COMMAND_RAR (comm)->multi_volume = FALSE;
 
 	fr_process_set_out_line_func (FR_COMMAND (comm)->process,
 				      process_line,
@@ -247,17 +246,27 @@
 
 	prefix_len = strlen (prefix);
 	if (strncmp (line, prefix, prefix_len) == 0) {
-		double fraction;
-		int    len;
+		double  fraction;
+		int     len;
+		char   *b_idx;
 
 		strcpy (Progress_Filename, line + prefix_len);
+
+		/* when a new volume is created a sequence of backspaces is
+		 * issued, remove the backspaces from the filename */
+		b_idx = strchr (Progress_Filename, '\x08');
+		if (b_idx != NULL)
+			*b_idx = 0;
+
+		/* remove the OK at the end of the filename */
 		len = strlen (Progress_Filename);
 		if ((len > 5) && (strncmp (Progress_Filename + len - 5, "  OK ", 5) == 0))
 			Progress_Filename[len - 5] = 0;
+
 		sprintf (Progress_Message, "%s%s", message_prefix, file_name_from_path (Progress_Filename));
 		fr_command_message (comm, Progress_Message);
 
-		fraction= (double) ++comm->n_file / (comm->n_files + 1);
+		fraction = (double) ++comm->n_file / (comm->n_files + 1);
 		fr_command_progress (comm, fraction);
 	}
 }
@@ -270,12 +279,23 @@
 	FrCommand *comm = FR_COMMAND (data);
 
 	if (strncmp (line, "Creating archive ", 17) == 0) {
+		const char *archive_filename = line + 17;
 		char *uri;
 
-		uri = g_filename_to_uri (line + 17, NULL, NULL);
+		uri = g_filename_to_uri (archive_filename, NULL, NULL);
+		if ((comm->volume_size > 0)
+		    && g_regex_match_simple ("^.*\\.part(0)*2\\.rar$", uri, G_REGEX_CASELESS, 0))
+		{
+			char *volume_filename;
+
+			volume_filename = g_strdup (archive_filename);
+			volume_filename[strlen (volume_filename) - 5] = '1';
+			fr_command_set_multi_volume (comm, volume_filename);
+			g_free (volume_filename);
+		}
 		fr_command_working_archive (comm, uri);
-		g_free (uri);
 
+		g_free (uri);
 		return;
 	}
 
@@ -551,8 +571,7 @@
 fr_command_rar_get_capabilities (FrCommand  *comm,
 			         const char *mime_type)
 {
-	FrCommandRar *comm_rar = FR_COMMAND_RAR (comm);
-	FrCommandCap  capabilities;
+	FrCommandCap capabilities;
 
 	capabilities = FR_COMMAND_CAN_ARCHIVE_MANY_FILES | FR_COMMAND_CAN_ENCRYPT | FR_COMMAND_CAN_ENCRYPT_HEADER;
 	if (is_program_in_path ("rar"))
@@ -561,7 +580,7 @@
 		capabilities |= FR_COMMAND_CAN_READ;
 
 	/* multi-volumes are read-only */
-	if ((comm->files->len > 0) && comm_rar->multi_volume && (capabilities & FR_COMMAND_CAN_WRITE))
+	if ((comm->files->len > 0) && comm->multi_volume && (capabilities & FR_COMMAND_CAN_WRITE))
 		capabilities ^= FR_COMMAND_CAN_WRITE;
 
 	return capabilities;

Modified: trunk/src/fr-command-rar.h
==============================================================================
--- trunk/src/fr-command-rar.h	(original)
+++ trunk/src/fr-command-rar.h	Mon Jul 28 11:26:59 2008
@@ -45,7 +45,6 @@
 	gboolean  list_started;
 	gboolean  odd_line;
 	FileData *fdata;
-	gboolean  multi_volume;
 };
 
 struct _FrCommandRarClass

Modified: trunk/src/fr-command.c
==============================================================================
--- trunk/src/fr-command.c	(original)
+++ trunk/src/fr-command.c	Mon Jul 28 11:26:59 2008
@@ -567,6 +567,15 @@
 
 
 void
+fr_command_set_multi_volume (FrCommand  *comm,
+			     const char *filename)
+{
+	comm->multi_volume = TRUE;
+	fr_command_set_filename (comm, filename);
+}
+
+
+void
 fr_command_list (FrCommand  *comm)
 {
 	g_return_if_fail (FR_IS_COMMAND (comm));
@@ -582,6 +591,7 @@
 	fr_process_set_out_line_func (FR_COMMAND (comm)->process, NULL, NULL);
 	fr_process_set_err_line_func (FR_COMMAND (comm)->process, NULL, NULL);
 	fr_process_use_standard_locale (FR_COMMAND (comm)->process, TRUE);
+	comm->multi_volume = FALSE;
 
 	if (!comm->fake_load)
 		FR_COMMAND_GET_CLASS (G_OBJECT (comm))->list (comm);

Modified: trunk/src/fr-command.h
==============================================================================
--- trunk/src/fr-command.h	(original)
+++ trunk/src/fr-command.h	Mon Jul 28 11:26:59 2008
@@ -74,13 +74,14 @@
 	char          *filename;        /* archive file path. */
 	char          *e_filename;      /* escaped archive filename. */
 	const char    *mime_type;
+	gboolean       multi_volume;
 
 	/*<protected>*/
 
 	/* options */
 
 	char          *password;
-	gboolean       encrypt_header;
+	gboolean       encrypt_header : 1;
 	FrCompression  compression;
 	guint          volume_size;
 
@@ -164,6 +165,8 @@
 GType          fr_command_get_type            (void);
 void           fr_command_set_filename        (FrCommand     *comm,
 					       const char    *filename);
+void           fr_command_set_multi_volume    (FrCommand     *comm,
+					       const char    *filename);
 void           fr_command_list                (FrCommand     *comm);
 void           fr_command_add                 (FrCommand     *comm,
 					       const char    *from_file,

Modified: trunk/src/fr-process.h
==============================================================================
--- trunk/src/fr-process.h	(original)
+++ trunk/src/fr-process.h	Mon Jul 28 11:26:59 2008
@@ -122,10 +122,10 @@
 void        fr_process_use_standard_locale  (FrProcess    *fr_proc,
 					     gboolean      use_stand_locale);
 void        fr_process_set_out_line_func    (FrProcess    *fr_proc,
-					     LineFunc  func,
+					     LineFunc      func,
 					     gpointer      func_data);
 void        fr_process_set_err_line_func    (FrProcess    *fr_proc,
-					     LineFunc  func,
+					     LineFunc      func,
 					     gpointer      func_data);
 void        fr_process_start                (FrProcess    *fr_proc);
 void        fr_process_stop                 (FrProcess    *fr_proc);

Modified: trunk/src/fr-window.c
==============================================================================
--- trunk/src/fr-window.c	(original)
+++ trunk/src/fr-window.c	Mon Jul 28 11:26:59 2008
@@ -125,6 +125,7 @@
 	FrArchive *new_archive;
 	char      *password;
 	gboolean   encrypt_header;
+	guint      volume_size;
 	char      *new_file;
 } FRConvertData;
 
@@ -2831,10 +2832,15 @@
 		FrProcess *process = archive->process;
 		GList     *output = NULL;
 
-		if (window->priv->batch_mode)
+		if (window->priv->batch_mode) {
 			dialog_parent = NULL;
-		else
+			window->priv->load_error_parent_window = NULL;
+		}
+		else {
 			dialog_parent = (GtkWindow *) window;
+			if (window->priv->load_error_parent_window == NULL)
+				window->priv->load_error_parent_window = (GtkWindow *) window;
+		}
 
 		if ((action == FR_ACTION_LISTING_CONTENT) || (action == FR_ACTION_LOADING_ARCHIVE))
 			fr_window_archive_close (window);
@@ -3057,6 +3063,12 @@
 
 	case FR_ACTION_ADDING_FILES:
 		close_progress_dialog (window, FALSE);
+
+		/* update the uri because multi-volume archives can have
+		 * a different name after creation. */
+		g_free (window->priv->archive_uri);
+		window->priv->archive_uri = g_file_get_uri (window->archive->file);
+
 		if (error->type == FR_PROC_ERROR_NONE) {
 			if (window->priv->archive_new)
 				window->priv->archive_new = FALSE;
@@ -3098,7 +3110,7 @@
 				  window->priv->convert_data.password,
 				  window->priv->convert_data.encrypt_header,
 				  window->priv->compression,
-				  window->priv->volume_size);
+				  window->priv->convert_data.volume_size);
 			g_free (source_dir);
 		}
 		else {
@@ -5391,6 +5403,7 @@
 	window->priv->convert_data.new_archive = NULL;
 	window->priv->convert_data.password = NULL;
 	window->priv->convert_data.encrypt_header = FALSE;
+	window->priv->convert_data.volume_size = 0;
 
 	window->priv->stoppable = TRUE;
 
@@ -5868,6 +5881,16 @@
 }
 
 
+static void
+fr_window_set_archive_uri (FrWindow   *window,
+		           const char *uri)
+{
+	if (window->priv->archive_uri != NULL)
+			g_free (window->priv->archive_uri);
+		window->priv->archive_uri = g_strdup (uri);
+}
+
+
 gboolean
 fr_window_archive_new (FrWindow   *window,
 		       const char *uri)
@@ -5886,9 +5909,7 @@
 		return FALSE;
 	}
 
-	if (window->priv->archive_uri != NULL)
-		g_free (window->priv->archive_uri);
-	window->priv->archive_uri = g_strdup (uri);
+	fr_window_set_archive_uri (window, uri);
 	window->priv->archive_present = TRUE;
 	window->priv->archive_new = TRUE;
 
@@ -5918,9 +5939,7 @@
 
 	fr_window_archive_close (window);
 
-	g_free (window->priv->archive_uri);
-	window->priv->archive_uri = g_strdup (uri);
-
+	fr_window_set_archive_uri (window, uri);
 	window->priv->archive_present = FALSE;
 	window->priv->give_focus_to_the_list = TRUE;
 	window->priv->load_error_parent_window = parent;
@@ -5995,14 +6014,18 @@
 
 
 typedef struct {
-	char *uri;
-	char *password;
+	char     *uri;
+	char     *password;
+	gboolean  encrypt_header;
+	guint     volume_size;
 } SaveAsData;
 
 
 static SaveAsData *
 save_as_data_new (const char *uri,
-		  const char *password)
+		  const char *password,
+		  gboolean    encrypt_header,
+	  	  guint       volume_size)
 {
 	SaveAsData *sdata;
 
@@ -6011,6 +6034,8 @@
 		sdata->uri = g_strdup (uri);
 	if (password != NULL)
 		sdata->password = g_strdup (password);
+	sdata->encrypt_header = encrypt_header;
+	sdata->volume_size = volume_size;
 
 	return sdata;
 }
@@ -6030,7 +6055,9 @@
 void
 fr_window_archive_save_as (FrWindow   *window,
 			   const char *uri,
-			   const char *password)
+			   const char *password,
+			   gboolean    encrypt_header,
+			   guint       volume_size)
 {
 	g_return_if_fail (window != NULL);
 	g_return_if_fail (uri != NULL);
@@ -6071,10 +6098,12 @@
 
 	if (password != NULL)
 		window->priv->convert_data.password = g_strdup (password);
+	window->priv->convert_data.encrypt_header = encrypt_header;
+	window->priv->convert_data.volume_size = volume_size;
 
 	fr_window_set_current_batch_action (window,
 					    FR_BATCH_ACTION_SAVE_AS,
-					    save_as_data_new (uri, password),
+					    save_as_data_new (uri, password, encrypt_header, volume_size),
 					    (GFreeFunc) save_as_data_free);
 
 	g_signal_connect (G_OBJECT (window->priv->convert_data.new_archive),
@@ -6140,10 +6169,7 @@
 	}
 
 	fr_archive_rename (window->archive, uri);
-
-	if (window->priv->archive_uri != NULL)
-		g_free (window->priv->archive_uri);
-	window->priv->archive_uri = g_strdup (uri);
+	fr_window_set_archive_uri (window, uri);
 
 	fr_window_update_title (window);
 	fr_window_add_to_recent_list (window, window->priv->archive_uri);
@@ -8314,7 +8340,11 @@
 		debug (DEBUG_INFO, "[BATCH] SAVE_AS\n");
 
 		sdata = action->data;
-		fr_window_archive_save_as (window, sdata->uri, sdata->password);
+		fr_window_archive_save_as (window,
+					   sdata->uri,
+					   sdata->password,
+					   sdata->encrypt_header,
+					   sdata->volume_size);
 		break;
 
 	case FR_BATCH_ACTION_TEST:

Modified: trunk/src/fr-window.h
==============================================================================
--- trunk/src/fr-window.h	(original)
+++ trunk/src/fr-window.h	Mon Jul 28 11:26:59 2008
@@ -115,7 +115,9 @@
 gboolean    fr_window_archive_is_present        (FrWindow      *window);
 void        fr_window_archive_save_as           (FrWindow      *window,
 						 const char    *filename,
-						 const char    *password);
+						 const char    *password,
+						 gboolean       encrypt_header,
+						 guint          volume_size);
 void        fr_window_archive_reload            (FrWindow      *window);
 void        fr_window_archive_rename            (FrWindow      *window,
 						 const char    *filename);

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Mon Jul 28 11:26:59 2008
@@ -603,7 +603,7 @@
 }
 
 
-static int
+int
 get_mime_type_index (const char *mime_type)
 {
 	int i;

Modified: trunk/src/main.h
==============================================================================
--- trunk/src/main.h	(original)
+++ trunk/src/main.h	Mon Jul 28 11:26:59 2008
@@ -63,16 +63,17 @@
 extern FrMimeTypeDescription mime_type_desc[];
 extern FrExtensionType file_ext_type[];
 extern int single_file_save_type[]; /* File types that can be saved when
-				     * a single file is selected.  
+				     * a single file is selected.
 				     * Includes single file compressors
 				     * such as gzip, compress, etc. */
 extern int save_type[];             /* File types that can be saved. */
 extern int open_type[];             /* File types that can be opened. */
 extern int create_type[];           /* File types that can be created. */
- 
+
 GType        get_command_type_from_mime_type (const char    *mime_type,
 				 	      FrCommandCaps  requested_capabilities);
 const char * get_mime_type_from_extension    (const char    *ext);
 const char * get_archive_filename_extension  (const char    *uri);
+int          get_mime_type_index             (const char    *mime_type);
 
 #endif /* MAIN_H */

Modified: trunk/src/typedefs.h
==============================================================================
--- trunk/src/typedefs.h	(original)
+++ trunk/src/typedefs.h	Mon Jul 28 11:26:59 2008
@@ -23,6 +23,8 @@
 #ifndef TYPEDEFS_H
 #define TYPEDEFS_H
 
+#define MEGABYTE (1024 * 1024)
+
 #define RC_DIR              ".gnome2/file-roller"
 #define RC_BOOKMARKS_FILE   ".gnome2/file-roller/bookmarks"
 #define RC_RECENT_FILE      ".gnome2/file-roller/recents"



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