[gthumb: 16/57] [webalbums] load and save the dialog preferences.



commit f450dbc6b452542b16dfd8fd164da306eb200e73
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 9 21:46:42 2010 +0200

    [webalbums] load and save the dialog preferences.

 extensions/webalbums/data/Makefile.am              |   15 +
 .../webalbums/data/gthumb_webalbums.schemas.in     |  304 ++++++++++++
 extensions/webalbums/data/ui/web-album-exporter.ui |  495 +++++++++++---------
 extensions/webalbums/dlg-web-exporter.c            |  280 +++++++++++-
 extensions/webalbums/dlg-web-exporter.h            |    3 +-
 extensions/webalbums/preferences.h                 |   56 +++
 6 files changed, 906 insertions(+), 247 deletions(-)
---
diff --git a/extensions/webalbums/data/Makefile.am b/extensions/webalbums/data/Makefile.am
index 9eda696..2e1d3cf 100644
--- a/extensions/webalbums/data/Makefile.am
+++ b/extensions/webalbums/data/Makefile.am
@@ -1,3 +1,18 @@
 SUBDIRS = albumthemes ui
 
+schemadir = @GCONF_SCHEMA_FILE_DIR@
+schema_in_files = gthumb_webalbums.schemas.in
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+ INTLTOOL_SCHEMAS_RULE@
+
+if GCONF_SCHEMAS_INSTALL
+install-data-local:
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/extensions/webalbums/data/$(schema_DATA)
+endif
+
+EXTRA_DIST = $(schema_in_files)
+
+CLEANFILES = $(schema_DATA)
+
 -include $(top_srcdir)/git.mk
diff --git a/extensions/webalbums/data/gthumb_webalbums.schemas.in b/extensions/webalbums/data/gthumb_webalbums.schemas.in
new file mode 100644
index 0000000..6c43d61
--- /dev/null
+++ b/extensions/webalbums/data/gthumb_webalbums.schemas.in
@@ -0,0 +1,304 @@
+<gconfschemafile>
+    <schemalist>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/index_file</key>
+	<applyto>/apps/gthumb/ext/webalbums/index_file</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>index.html</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/previews</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/previews</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>previews</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/thumbnails</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/thumbnails</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>thumbnails</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/images</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/images</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>images</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/html_images</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/html_images</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>html</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/html_indexes</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/html_indexes</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>html</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/directories/theme_files</key>
+	<applyto>/apps/gthumb/ext/webalbums/directories/theme_files</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>theme</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/destination</key>
+	<applyto>/apps/gthumb/ext/webalbums/destination</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/use_subfolders</key>
+	<applyto>/apps/gthumb/ext/webalbums/use_subfolders</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>true</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/copy_images</key>
+	<applyto>/apps/gthumb/ext/webalbums/copy_images</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>false</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/resize_images</key>
+	<applyto>/apps/gthumb/ext/webalbums/resize_images</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>false</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/resize_width</key>
+	<applyto>/apps/gthumb/ext/webalbums/resize_width</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>640</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/resize_height</key>
+	<applyto>/apps/gthumb/ext/webalbums/resize_height</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>480</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/columns</key>
+	<applyto>/apps/gthumb/ext/webalbums/columns</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>4</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/rows</key>
+	<applyto>/apps/gthumb/ext/webalbums/rows</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>4</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+        <key>/schemas/apps/gthumb/ext/webalbums/single_index</key>
+        <applyto>/apps/gthumb/ext/webalbums/single_index</applyto>
+        <owner>gthumb</owner>
+        <type>bool</type>
+        <default>false</default>
+        <locale name="C">
+          <short></short>
+          <long>
+          </long>
+        </locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/sort_type</key>
+	<applyto>/apps/gthumb/ext/webalbums/sort_type</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>file::mtime</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/sort_inverse</key>
+	<applyto>/apps/gthumb/ext/webalbums/sort_inverse</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>false</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/header</key>
+	<applyto>/apps/gthumb/ext/webalbums/header</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/footer</key>
+	<applyto>/apps/gthumb/ext/webalbums/footer</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/theme</key>
+	<applyto>/apps/gthumb/ext/webalbums/theme</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>Wiki</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/thumbnail_caption</key>
+	<applyto>/apps/gthumb/ext/webalbums/thumbnail_caption</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/image_caption</key>
+	<applyto>/apps/gthumb/ext/webalbums/image_caption</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+    </schemalist>
+</gconfschemafile>
diff --git a/extensions/webalbums/data/ui/web-album-exporter.ui b/extensions/webalbums/data/ui/web-album-exporter.ui
index 677fd36..96e062e 100644
--- a/extensions/webalbums/data/ui/web-album-exporter.ui
+++ b/extensions/webalbums/data/ui/web-album-exporter.ui
@@ -36,7 +36,7 @@
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">12</property>
+                <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="visible">True</property>
@@ -69,7 +69,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkFileChooserButton" id="wa_destination_filechooserbutton">
+                                  <object class="GtkFileChooserButton" id="destination_filechooserbutton">
                                     <property name="visible">True</property>
                                     <property name="local_only">False</property>
                                     <property name="action">select-folder</property>
@@ -85,7 +85,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="wa_use_subfolders_checkbutton">
+                              <object class="GtkCheckButton" id="use_subfolders_checkbutton">
                                 <property name="label" translatable="yes">Use subfolders to organize files</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -186,6 +186,203 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment5">
+                        <property name="visible">True</property>
+                        <property name="top_padding">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table3">
+                            <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>
+                              <object class="GtkCheckButton" id="single_index_checkbutton">
+                                <property name="label" translatable="yes">or _use a single index page</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkTable" id="columns_rows_table">
+                                <property name="visible">True</property>
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">6</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkSpinButton" id="cols_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">&#x25CF;</property>
+                                    <property name="adjustment">cols_adjustment</property>
+                                    <property name="climb_rate">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label133">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">columns,</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" id="rows_spinbutton">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">&#x25CF;</property>
+                                    <property name="adjustment">rows_adjustment</property>
+                                    <property name="climb_rate">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label132">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">rows per page</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment3">
+                                <property name="visible">True</property>
+                                <property name="top_padding">4</property>
+                                <child>
+                                  <object class="GtkLabel" id="label99">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">_Size:</property>
+                                    <property name="use_underline">True</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label112">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">S_ort:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox62">
+                                <property name="visible">True</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkComboBox" id="sort_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="model">sort_liststore</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                                      <attributes>
+                                        <attribute name="text">1</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="reverse_order_checkbutton">
+                                    <property name="label" translatable="yes">Re_verse order</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <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>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Index Layout</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkFrame" id="frame2">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
@@ -405,50 +602,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkVBox" id="vbox6">
-                                <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
-                                <property name="spacing">6</property>
-                                <child>
-                                  <object class="GtkLabel" id="label18">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">_Theme:</property>
-                                    <property name="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkScrolledWindow" id="scrolledwindow4">
-                                    <property name="width_request">200</property>
-                                    <property name="height_request">150</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
-                                    <property name="shadow_type">in</property>
-                                    <child>
-                                      <object class="GtkIconView" id="theme_iconview">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="orientation">horizontal</property>
-                                        <property name="model">theme_liststore</property>
-                                      </object>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                         </child>
                       </object>
@@ -465,7 +618,8 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="position">1</property>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
@@ -480,196 +634,60 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox3">
+              <object class="GtkVBox" id="vbox2">
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
                 <property name="orientation">vertical</property>
                 <property name="spacing">12</property>
                 <child>
-                  <object class="GtkFrame" id="frame3">
+                  <object class="GtkFrame" id="frame6">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkAlignment" id="alignment5">
+                      <object class="GtkAlignment" id="alignment8">
                         <property name="visible">True</property>
                         <property name="top_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkTable" id="table3">
+                          <object class="GtkScrolledWindow" id="scrolledwindow4">
+                            <property name="width_request">200</property>
+                            <property name="height_request">150</property>
                             <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>
-                              <object class="GtkLabel" id="label112">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">S_ort:</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHBox" id="hbox62">
-                                <property name="visible">True</property>
-                                <property name="spacing">6</property>
-                                <child>
-                                  <object class="GtkComboBox" id="sort_combobox">
-                                    <property name="visible">True</property>
-                                    <property name="model">sort_liststore</property>
-                                    <child>
-                                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
-                                      <attributes>
-                                        <attribute name="text">1</attribute>
-                                      </attributes>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="wa_reverse_order_checkbutton">
-                                    <property name="label" translatable="yes">Re_verse order</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <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>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
                             <child>
-                              <object class="GtkCheckButton" id="wa_single_index_checkbutton">
-                                <property name="label" translatable="yes">or _use a single index page</property>
+                              <object class="GtkIconView" id="theme_iconview">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkTable" id="table1">
-                                <property name="visible">True</property>
-                                <property name="n_rows">2</property>
-                                <property name="n_columns">2</property>
-                                <property name="column_spacing">6</property>
-                                <property name="row_spacing">6</property>
+                                <property name="selection_mode">browse</property>
+                                <property name="model">theme_liststore</property>
                                 <child>
-                                  <object class="GtkSpinButton" id="cols_spinbutton">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="invisible_char">&#x25CF;</property>
-                                    <property name="adjustment">cols_adjustment</property>
-                                    <property name="climb_rate">1</property>
+                                  <object class="GtkCellRendererPixbuf" id="cellrenderertext3">
+                                    <property name="follow_state">True</property>
                                   </object>
-                                  <packing>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
+                                  <attributes>
+                                    <attribute name="pixbuf">2</attribute>
+                                  </attributes>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label133">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">columns,</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkSpinButton" id="rows_spinbutton">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="invisible_char">&#x25CF;</property>
-                                    <property name="adjustment">rows_adjustment</property>
-                                    <property name="climb_rate">1</property>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label132">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">rows per page</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
+                                  <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                                  <attributes>
+                                    <attribute name="text">1</attribute>
+                                  </attributes>
                                 </child>
                               </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkAlignment" id="alignment3">
-                                <property name="visible">True</property>
-                                <property name="top_padding">4</property>
-                                <child>
-                                  <object class="GtkLabel" id="label99">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0</property>
-                                    <property name="label" translatable="yes">_Size:</property>
-                                    <property name="use_underline">True</property>
-                                  </object>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <placeholder/>
                             </child>
                           </object>
                         </child>
                       </object>
                     </child>
                     <child type="label">
-                      <object class="GtkLabel" id="label6">
+                      <object class="GtkLabel" id="label13">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Page Layout</property>
+                        <property name="label" translatable="yes">Theme</property>
                         <property name="use_markup">True</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -678,10 +696,33 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Theme</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox3">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">12</property>
+                <child>
+                  <placeholder/>
+                </child>
                 <child>
                   <object class="GtkFrame" id="frame4">
                     <property name="visible">True</property>
@@ -722,27 +763,6 @@
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Index</property>
-              </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="vbox2">
-                <property name="visible">True</property>
-                <property name="border_width">6</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">12</property>
                 <child>
                   <object class="GtkFrame" id="frame5">
                     <property name="visible">True</property>
@@ -780,7 +800,7 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="position">0</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
@@ -791,7 +811,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">Image</property>
+                <property name="label" translatable="yes">Customize</property>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -870,7 +890,6 @@
       <action-widget response="-5">ok_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="theme_liststore"/>
   <object class="GtkListStore" id="size_liststore">
     <columns>
       <!-- column-name name -->
@@ -885,4 +904,14 @@
       <column type="gchararray"/>
     </columns>
   </object>
+  <object class="GtkListStore" id="theme_liststore">
+    <columns>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+      <!-- column-name icon -->
+      <column type="GdkPixbuf"/>
+    </columns>
+  </object>
 </interface>
diff --git a/extensions/webalbums/dlg-web-exporter.c b/extensions/webalbums/dlg-web-exporter.c
index d56fb98..9a98a12 100644
--- a/extensions/webalbums/dlg-web-exporter.c
+++ b/extensions/webalbums/dlg-web-exporter.c
@@ -24,11 +24,24 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include "dlg-web-exporter.h"
+#include "gth-web-exporter.h"
+#include "preferences.h"
 
 #define GET_WIDGET(name) _gtk_builder_get_widget (data->builder, (name))
 #define STRING_IS_VOID(x) (((x) == NULL) || (*(x) == 0))
 #define DEFAULT_ALBUM_THEME "Wiki"
 
+enum {
+	THEME_COLUMN_ID,
+	THEME_COLUMN_NAME,
+	THEME_COLUMN_PREVIEW
+};
+
+enum {
+	SORT_TYPE_COLUMN_DATA,
+	SORT_TYPE_COLUMN_NAME
+};
+
 static struct {
 	int width;
 	int height;
@@ -45,6 +58,7 @@ static struct {
 
 typedef struct {
 	GthBrowser *browser;
+	GList      *file_list;
 	GtkBuilder *builder;
 	GtkWidget  *dialog;
 	GtkWidget  *thumbnail_caption_chooser;
@@ -57,6 +71,7 @@ destroy_cb (GtkWidget  *widget,
 	    DialogData *data)
 {
 	gth_browser_set_dialog (data->browser, "web_exporter", NULL);
+	_g_object_list_unref (data->file_list);
 	g_object_unref (data->builder);
 	g_free (data);
 }
@@ -74,12 +89,119 @@ static void
 ok_clicked_cb (GtkWidget  *widget,
 	       DialogData *data)
 {
-	GthTask *task;
+	char            *s_value;
+	GFile           *destination;
+	int              i_value;
+	const char      *header;
+	const char      *footer;
+	char            *thumbnail_caption;
+	char            *image_caption;
+	GtkTreeIter      iter;
+	char            *theme_name;
+	GthFileDataSort *sort_type;
+	GthTask         *task;
+
+	/* save the options */
+
+	s_value = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (GET_WIDGET ("destination_filechooserbutton")));
+	destination = g_file_new_for_uri (s_value);
+	eel_gconf_set_path (PREF_WEBALBUMS_DESTINATION, s_value);
+	g_free (s_value);
+
+	eel_gconf_set_boolean (PREF_WEBALBUMS_USE_SUBFOLDERS, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("use_subfolders_checkbutton"))));
+	eel_gconf_set_boolean (PREF_WEBALBUMS_COPY_IMAGES, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("copy_images_checkbutton"))));
+	eel_gconf_set_boolean (PREF_WEBALBUMS_RESIZE_IMAGES, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("resize_images_checkbutton"))));
+
+	i_value = gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("resize_images_combobox")));
+	eel_gconf_set_integer (PREF_WEBALBUMS_RESIZE_WIDTH, resize_size[i_value].width);
+	eel_gconf_set_integer (PREF_WEBALBUMS_RESIZE_HEIGHT, resize_size[i_value].height);
+
+	eel_gconf_set_integer (PREF_WEBALBUMS_COLUMNS, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton"))));
+	eel_gconf_set_integer (PREF_WEBALBUMS_ROWS, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("rows_spinbutton"))));
+	eel_gconf_set_boolean (PREF_WEBALBUMS_SINGLE_INDEX, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton"))));
+
+	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), &iter)) {
+		GthFileDataSort *sort_type;
+
+		gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("sort_liststore")),
+				    &iter,
+				    SORT_TYPE_COLUMN_DATA, &sort_type,
+				    -1);
+		eel_gconf_set_string (PREF_WEBALBUMS_SORT_TYPE, sort_type->name);
+	}
 
-	task = gth_web_exporter_new (data->browser, NULL);
-	gth_browser_exec_task (data->browser, task, FALSE);
+	eel_gconf_set_boolean (PREF_WEBALBUMS_SORT_INVERSE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("reverse_order_checkbutton"))));
+
+	header = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("header_entry")));
+	eel_gconf_set_string (PREF_WEBALBUMS_HEADER, header);
 
+	footer = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("footer_entry")));
+	eel_gconf_set_string (PREF_WEBALBUMS_FOOTER, footer);
+
+	theme_name = NULL;
+	{
+		GList *list;
+
+		list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (GET_WIDGET ("theme_iconview")));
+		if (list != NULL) {
+			GtkTreePath *path;
+			GtkTreeIter  iter;
+
+			path = g_list_first (list)->data;
+			gtk_tree_model_get_iter (GTK_TREE_MODEL (GET_WIDGET ("theme_liststore")), &iter, path);
+			gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("theme_liststore")), &iter,
+					    THEME_COLUMN_NAME, &theme_name,
+					    -1);
+		}
+
+		g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
+		g_list_free (list);
+	}
+	g_return_if_fail (theme_name != NULL);
+	eel_gconf_set_string (PREF_WEBALBUMS_THEME, theme_name);
+
+	thumbnail_caption = gth_metadata_chooser_get_selection (GTH_METADATA_CHOOSER (data->thumbnail_caption_chooser));
+	eel_gconf_set_string (PREF_WEBALBUMS_THUMBNAIL_CAPTION, thumbnail_caption);
+
+	image_caption = gth_metadata_chooser_get_selection (GTH_METADATA_CHOOSER (data->image_caption_chooser));
+	eel_gconf_set_string (PREF_WEBALBUMS_IMAGE_CAPTION, image_caption);
+
+	/* exec the task */
+
+	task = gth_web_exporter_new (data->browser, data->file_list);
+
+	gth_web_exporter_set_header (GTH_WEB_EXPORTER (task), header);
+	gth_web_exporter_set_footer (GTH_WEB_EXPORTER (task), footer);
+	gth_web_exporter_set_style (GTH_WEB_EXPORTER (task), theme_name);
+	gth_web_exporter_set_destination (GTH_WEB_EXPORTER (task), destination);
+	gth_web_exporter_set_use_subfolders (GTH_WEB_EXPORTER (task), eel_gconf_get_boolean (PREF_WEBALBUMS_USE_SUBFOLDERS, TRUE));
+	gth_web_exporter_set_copy_images (GTH_WEB_EXPORTER (task), eel_gconf_get_boolean (PREF_WEBALBUMS_COPY_IMAGES, FALSE));
+	gth_web_exporter_set_resize_images (GTH_WEB_EXPORTER (task),
+					    eel_gconf_get_boolean (PREF_WEBALBUMS_RESIZE_IMAGES, FALSE),
+					    eel_gconf_get_integer (PREF_WEBALBUMS_RESIZE_WIDTH, 640),
+					    eel_gconf_get_integer (PREF_WEBALBUMS_RESIZE_HEIGHT, 480));
+
+	s_value = eel_gconf_get_string (PREF_WEBALBUMS_SORT_TYPE, "file::mtime");
+	sort_type = gth_main_get_sort_type (s_value);
+	gth_web_exporter_set_sort_order (GTH_WEB_EXPORTER (task),
+					 sort_type,
+					 eel_gconf_get_boolean (PREF_WEBALBUMS_SORT_INVERSE, FALSE));
+	g_free (s_value);
+
+	gth_web_exporter_set_row_col (GTH_WEB_EXPORTER (task),
+				      eel_gconf_get_integer (PREF_WEBALBUMS_ROWS, 4),
+				      eel_gconf_get_integer (PREF_WEBALBUMS_COLUMNS, 4));
+	gth_web_exporter_set_single_index (GTH_WEB_EXPORTER (task), eel_gconf_get_boolean (PREF_WEBALBUMS_SINGLE_INDEX, FALSE));
+	gth_web_exporter_set_thumbnail_caption (GTH_WEB_EXPORTER (task), thumbnail_caption);
+	gth_web_exporter_set_image_caption (GTH_WEB_EXPORTER (task), image_caption);
+
+	gth_browser_exec_task (data->browser, task, FALSE);
 	gtk_widget_destroy (data->dialog);
+
+	g_free (image_caption);
+	g_free (thumbnail_caption);
+	g_free (theme_name);
+	g_object_unref (destination);
 }
 
 
@@ -92,10 +214,10 @@ update_sensitivity (DialogData *data)
 
 
 static void
-footer_entry_icon_press_cb (GtkEntry            *entry,
-			    GtkEntryIconPosition icon_pos,
-			    GdkEvent            *event,
-			    gpointer             user_data)
+footer_entry_icon_press_cb (GtkEntry             *entry,
+			    GtkEntryIconPosition  icon_pos,
+			    GdkEvent             *event,
+			    gpointer              user_data)
 {
 	DialogData *data = user_data;
 	GtkWidget  *help_box;
@@ -108,13 +230,104 @@ footer_entry_icon_press_cb (GtkEntry            *entry,
 }
 
 
+static void
+add_themes_from_dir (DialogData *data,
+		     GFile      *dir)
+{
+	GFileEnumerator *enumerator;
+	GFileInfo       *file_info;
+	char            *default_theme;
+
+	enumerator = g_file_enumerate_children (dir,
+						(G_FILE_ATTRIBUTE_STANDARD_NAME ","
+						 G_FILE_ATTRIBUTE_STANDARD_TYPE ","
+						 G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME),
+						G_FILE_QUERY_INFO_NONE,
+						NULL,
+						NULL);
+	if (enumerator == NULL)
+		return;
+
+	default_theme = eel_gconf_get_string (PREF_WEBALBUMS_THEME, DEFAULT_ALBUM_THEME);
+
+	while ((file_info = g_file_enumerator_next_file (enumerator, NULL, NULL)) != NULL) {
+		GFile     *file;
+		char      *filename;
+		GdkPixbuf *preview;
+
+		if (g_file_info_get_file_type (file_info) != G_FILE_TYPE_DIRECTORY) {
+			g_object_unref (file_info);
+			continue;
+		}
+
+		file = _g_file_get_child (dir, g_file_info_get_name (file_info), "preview.png", NULL);
+		filename = g_file_get_path (file);
+		preview = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
+		if (preview != NULL) {
+			GtkTreeIter iter;
+
+			gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("theme_liststore")), &iter);
+			gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("theme_liststore")), &iter,
+					    THEME_COLUMN_ID, g_file_info_get_name (file_info),
+					    THEME_COLUMN_NAME, g_file_info_get_display_name (file_info),
+					    THEME_COLUMN_PREVIEW, preview,
+					    -1);
+
+			if (g_str_equal (default_theme, g_file_info_get_name (file_info))) {
+				GtkTreePath *path;
+
+				path = gtk_tree_model_get_path (GTK_TREE_MODEL (GET_WIDGET ("theme_liststore")), &iter);
+				gtk_icon_view_select_path (GTK_ICON_VIEW (GET_WIDGET ("theme_iconview")), path);
+				gtk_tree_path_free (path);
+			}
+		}
+
+		g_object_unref (preview);
+		g_free (filename);
+		g_object_unref (file);
+		g_object_unref (file_info);
+	}
+
+	g_free (default_theme);
+	g_object_unref (enumerator);
+}
+
+
+static void
+load_themes (DialogData *data)
+{
+	char  *style_path;
+	GFile *style_dir;
+	GFile *data_dir;
+
+	/* local themes */
+
+	style_path = gth_user_dir_get_file (GTH_DIR_DATA, GTHUMB_DIR, "albumthemes", NULL);
+	style_dir = g_file_new_for_path (style_path);
+	add_themes_from_dir (data, style_dir);
+	g_object_unref (style_dir);
+	g_free (style_path);
+
+	/* system themes */
+
+	data_dir = g_file_new_for_path (WEBALBUM_DATADIR);
+	style_dir = _g_file_get_child (data_dir, "albumthemes", NULL);
+	add_themes_from_dir (data, style_dir);
+	g_object_unref (style_dir);
+	g_object_unref (data_dir);
+}
+
+
 void
-dlg_web_exporter (GthBrowser *browser)
+dlg_web_exporter (GthBrowser *browser,
+		  GList      *file_list)
 {
 	DialogData *data;
 	int         i;
 	int         active_index;
+	char       *default_sort_type;
 	GList      *scan;
+	char       *caption;
 
 	if (gth_browser_get_dialog (browser, "web_exporter") != NULL) {
 		gtk_window_present (GTK_WINDOW (gth_browser_get_dialog (browser, "web_exporter")));
@@ -123,22 +336,33 @@ dlg_web_exporter (GthBrowser *browser)
 
 	data = g_new0 (DialogData, 1);
 	data->browser = browser;
+	data->file_list = _g_object_list_ref (file_list);
 	data->builder = _gtk_builder_new_from_file ("web-album-exporter.ui", "webalbums");
 
 	data->dialog = _gtk_builder_get_widget (data->builder, "web_album_dialog");
 	gth_browser_set_dialog (browser, "web_exporter", data->dialog);
 	g_object_set_data (G_OBJECT (data->dialog), "dialog_data", data);
 
-	data->thumbnail_caption_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_IN_PRINT);
+	data->thumbnail_caption_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_EVERYWHERE);
 	gtk_widget_show (data->thumbnail_caption_chooser);
 	gtk_container_add (GTK_CONTAINER (GET_WIDGET ("thumbnail_caption_scrolledwindow")), data->thumbnail_caption_chooser);
 
-	data->image_caption_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_IN_PRINT);
+	data->image_caption_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_EVERYWHERE);
 	gtk_widget_show (data->image_caption_chooser);
 	gtk_container_add (GTK_CONTAINER (GET_WIDGET ("image_caption_scrolledwindow")), data->image_caption_chooser);
 
 	/* Set widgets data. */
 
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("use_subfolders_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_USE_SUBFOLDERS, TRUE));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("copy_images_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_COPY_IMAGES, FALSE));
+	gtk_widget_set_sensitive (GET_WIDGET ("resize_images_checkbutton"), eel_gconf_get_boolean (PREF_WEBALBUMS_COPY_IMAGES, FALSE));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("resize_images_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_RESIZE_IMAGES, FALSE));
+	gtk_widget_set_sensitive (GET_WIDGET ("resize_images_options_hbox"), eel_gconf_get_boolean (PREF_WEBALBUMS_RESIZE_IMAGES, FALSE));
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton")), eel_gconf_get_integer (PREF_WEBALBUMS_COLUMNS, 4));
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("rows_spinbutton")), eel_gconf_get_integer (PREF_WEBALBUMS_ROWS, 4));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_SINGLE_INDEX, FALSE));
+	gtk_widget_set_sensitive (GET_WIDGET ("columns_rows_table"), ! eel_gconf_get_boolean (PREF_WEBALBUMS_SINGLE_INDEX, FALSE));
+
 	active_index = 0;
 	for (i = 0; i < G_N_ELEMENTS (resize_size); i++) {
 		GtkTreeIter  iter;
@@ -146,6 +370,12 @@ dlg_web_exporter (GthBrowser *browser)
 
 		gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("size_liststore")), &iter);
 
+		if ((resize_size[i].width == eel_gconf_get_integer (PREF_WEBALBUMS_RESIZE_WIDTH, 640))
+		    && (resize_size[i].height == eel_gconf_get_integer (PREF_WEBALBUMS_RESIZE_HEIGHT, 480)))
+		{
+			active_index = i;
+		}
+
 		/* Translators: this is an image size, such as 1024 Ã? 768 */
 		name = g_strdup_printf (_("%d Ã? %d"), resize_size[i].width, resize_size[i].height);
 		gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("size_liststore")), &iter,
@@ -156,27 +386,51 @@ dlg_web_exporter (GthBrowser *browser)
 	}
 	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("resize_images_combobox")), active_index);
 
+	default_sort_type = eel_gconf_get_string (PREF_WEBALBUMS_SORT_TYPE, "file::mtime");
 	active_index = 0;
 	for (i = 0, scan = gth_main_get_all_sort_types (); scan; scan = scan->next, i++) {
 		GthFileDataSort *sort_type = scan->data;
 		GtkTreeIter      iter;
 
-		if (g_str_equal (sort_type->name, "file::mtime"))
+		if (g_str_equal (sort_type->name, default_sort_type))
 			active_index = i;
 
 		gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("sort_liststore")), &iter);
 		gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("sort_liststore")), &iter,
-				    0, sort_type,
-				    1, sort_type->display_name,
+				    SORT_TYPE_COLUMN_DATA, sort_type,
+				    SORT_TYPE_COLUMN_NAME, sort_type->display_name,
 				    -1);
 	}
 	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), active_index);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("reverse_order_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_SORT_INVERSE, FALSE));
+
+	g_free (default_sort_type);
 
 	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("header_entry")),
 			    g_file_info_get_edit_name (gth_browser_get_location_data (browser)->info));
 
+	caption = eel_gconf_get_string (PREF_WEBALBUMS_THUMBNAIL_CAPTION, "");
+	gth_metadata_chooser_set_selection (GTH_METADATA_CHOOSER (data->thumbnail_caption_chooser), caption);
+	g_free (caption);
+
+	caption = eel_gconf_get_string (PREF_WEBALBUMS_IMAGE_CAPTION, "");
+	gth_metadata_chooser_set_selection (GTH_METADATA_CHOOSER (data->image_caption_chooser), caption);
+	g_free (caption);
+
+	load_themes (data);
 	update_sensitivity (data);
 
+	{
+		char *destination;
+
+		destination = eel_gconf_get_path (PREF_WEBALBUMS_DESTINATION, NULL);
+		if (destination == NULL)
+			destination = g_strdup (get_home_uri ());
+		gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (GET_WIDGET ("destination_filechooserbutton")), destination);
+
+		g_free (destination);
+	}
+
 	/* Set the signals handlers. */
 
 	g_signal_connect (G_OBJECT (data->dialog),
diff --git a/extensions/webalbums/dlg-web-exporter.h b/extensions/webalbums/dlg-web-exporter.h
index c7a3a33..804994e 100644
--- a/extensions/webalbums/dlg-web-exporter.h
+++ b/extensions/webalbums/dlg-web-exporter.h
@@ -25,6 +25,7 @@
 
 #include <gthumb.h>
 
-void  dlg_web_exporter (GthBrowser *browser);
+void  dlg_web_exporter (GthBrowser *browser,
+			GList      *file_list); /* GFile list */
 
 #endif /* DLG_WEB_EXPORTER_H */
diff --git a/extensions/webalbums/preferences.h b/extensions/webalbums/preferences.h
new file mode 100644
index 0000000..47037fb
--- /dev/null
+++ b/extensions/webalbums/preferences.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  GThumb
+ *
+ *  Copyright (C) 2010 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 PREFERENCES_H
+#define PREFERENCES_H
+
+#include <gthumb.h>
+
+G_BEGIN_DECLS
+
+#define PREF_WEBALBUMS_INDEX_FILE          "/apps/gthumb/ext/webalbums/index_file"
+#define PREF_WEBALBUMS_DIR_PREVIEWS        "/apps/gthumb/ext/webalbums/directories/previews"
+#define PREF_WEBALBUMS_DIR_THUMBNAILS      "/apps/gthumb/ext/webalbums/directories/thumbnails"
+#define PREF_WEBALBUMS_DIR_IMAGES          "/apps/gthumb/ext/webalbums/directories/images"
+#define PREF_WEBALBUMS_DIR_HTML_IMAGES     "/apps/gthumb/ext/webalbums/directories/html_images"
+#define PREF_WEBALBUMS_DIR_HTML_INDEXES    "/apps/gthumb/ext/webalbums/directories/html_indexes"
+#define PREF_WEBALBUMS_DIR_THEME_FILES     "/apps/gthumb/ext/webalbums/directories/theme_files"
+#define PREF_WEBALBUMS_DESTINATION         "/apps/gthumb/ext/webalbums/destination"
+#define PREF_WEBALBUMS_USE_SUBFOLDERS      "/apps/gthumb/ext/webalbums/use_subfolders"
+#define PREF_WEBALBUMS_COPY_IMAGES         "/apps/gthumb/ext/webalbums/copy_images"
+#define PREF_WEBALBUMS_RESIZE_IMAGES       "/apps/gthumb/ext/webalbums/resize_images"
+#define PREF_WEBALBUMS_RESIZE_WIDTH        "/apps/gthumb/ext/webalbums/resize_width"
+#define PREF_WEBALBUMS_RESIZE_HEIGHT       "/apps/gthumb/ext/webalbums/resize_height"
+#define PREF_WEBALBUMS_COLUMNS             "/apps/gthumb/ext/webalbums/columns"
+#define PREF_WEBALBUMS_ROWS                "/apps/gthumb/ext/webalbums/rows"
+#define PREF_WEBALBUMS_SINGLE_INDEX        "/apps/gthumb/ext/webalbums/single_index"
+#define PREF_WEBALBUMS_SORT_TYPE           "/apps/gthumb/ext/webalbums/sort_type"
+#define PREF_WEBALBUMS_SORT_INVERSE        "/apps/gthumb/ext/webalbums/sort_inverse"
+#define PREF_WEBALBUMS_HEADER              "/apps/gthumb/ext/webalbums/header"
+#define PREF_WEBALBUMS_FOOTER              "/apps/gthumb/ext/webalbums/footer"
+#define PREF_WEBALBUMS_THEME               "/apps/gthumb/ext/webalbums/theme"
+#define PREF_WEBALBUMS_THUMBNAIL_CAPTION   "/apps/gthumb/ext/webalbums/thumbnail_caption"
+#define PREF_WEBALBUMS_IMAGE_CAPTION       "/apps/gthumb/ext/webalbums/image_caption"
+
+G_END_DECLS
+
+#endif /* PREFERENCES_H */



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