[gthumb: 35/57] [webalbums] implemented other exporter options



commit b2f0924381e176cdae11ceaffb5c226cf99874fb
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 16 21:53:28 2010 +0200

    [webalbums] implemented other exporter options
    
    allow to specify a different header for the image page;
    allow to view or hide the image description and attributes.

 extensions/webalbums/albumtheme.y                  |    6 +
 .../webalbums/data/gthumb_webalbums.schemas.in     |   69 ++-
 extensions/webalbums/data/ui/web-album-exporter.ui |  747 ++++++++++----------
 extensions/webalbums/dlg-web-exporter.c            |   89 ++-
 extensions/webalbums/gth-web-exporter.c            |  376 +++-------
 extensions/webalbums/gth-web-exporter.h            |   13 +-
 extensions/webalbums/preferences.h                 |   54 +-
 7 files changed, 650 insertions(+), 704 deletions(-)
---
diff --git a/extensions/webalbums/albumtheme.y b/extensions/webalbums/albumtheme.y
index cdab92c..795c6e3 100644
--- a/extensions/webalbums/albumtheme.y
+++ b/extensions/webalbums/albumtheme.y
@@ -220,6 +220,12 @@ attribute	: ATTRIBUTE_NAME '=' '"' expr '"' {
 			g_free ($1);
 		}
 
+		| ATTRIBUTE_NAME '=' '\'' QUOTED_STRING '\'' {
+			$$ = gth_var_new_string ($1, $4);
+			g_free ($1);
+			g_free ($4);
+		}
+
 		| ATTRIBUTE_NAME {
 			GthExpr *e = gth_expr_new ();
 			gth_expr_push_integer (e, 1);
diff --git a/extensions/webalbums/data/gthumb_webalbums.schemas.in b/extensions/webalbums/data/gthumb_webalbums.schemas.in
index 3dca356..45418a6 100644
--- a/extensions/webalbums/data/gthumb_webalbums.schemas.in
+++ b/extensions/webalbums/data/gthumb_webalbums.schemas.in
@@ -275,6 +275,32 @@
       </schema>
 
       <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/image_page_header</key>
+	<applyto>/apps/gthumb/ext/webalbums/image_page_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/image_page_footer</key>
+	<applyto>/apps/gthumb/ext/webalbums/image_page_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>
@@ -288,6 +314,19 @@
       </schema>
 
       <schema>
+	<key>/schemas/apps/gthumb/ext/webalbums/enable_thumbnail_caption</key>
+	<applyto>/apps/gthumb/ext/webalbums/enable_thumbnail_caption</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/thumbnail_caption</key>
 	<applyto>/apps/gthumb/ext/webalbums/thumbnail_caption</applyto>
 	<owner>gthumb</owner>
@@ -301,8 +340,34 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/webalbums/image_caption</key>
-	<applyto>/apps/gthumb/ext/webalbums/image_caption</applyto>
+	<key>/schemas/apps/gthumb/ext/webalbums/enable_image_description</key>
+	<applyto>/apps/gthumb/ext/webalbums/enable_image_description</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/enable_image_attributes</key>
+	<applyto>/apps/gthumb/ext/webalbums/enable_image_attributes</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/image_attributes</key>
+	<applyto>/apps/gthumb/ext/webalbums/image_attributes</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default></default>
diff --git a/extensions/webalbums/data/ui/web-album-exporter.ui b/extensions/webalbums/data/ui/web-album-exporter.ui
index 9414203..e744c50 100644
--- a/extensions/webalbums/data/ui/web-album-exporter.ui
+++ b/extensions/webalbums/data/ui/web-album-exporter.ui
@@ -38,6 +38,235 @@
                 <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
+                  <object class="GtkFrame" id="frame7">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="top_padding">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table2">
+                            <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="GtkTable" id="page_footer_help_table">
+                                <property name="n_rows">4</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">12</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="label7">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">%p</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label8">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">%P</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label10">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">The current page number</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </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="GtkLabel" id="label11">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">The total number of pages</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </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>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label14">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Special code</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label15">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Description</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label16">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes" comments="translate only the text in the curly brackets">%D{ format }</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label17">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">The current date</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</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="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="footer_entry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="activates_default">True</property>
+                                <property name="secondary_icon_stock">gtk-help</property>
+                                <property name="secondary_icon_activatable">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <property name="secondary_icon_tooltip_text">Help</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="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label122">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Footer:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="header_entry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="activates_default">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label86">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Header:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label30">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Album</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">0</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
@@ -71,8 +300,8 @@
                                 <child>
                                   <object class="GtkFileChooserButton" id="destination_filechooserbutton">
                                     <property name="visible">True</property>
-                                    <property name="action">select-folder</property>
                                     <property name="local_only">False</property>
+                                    <property name="action">select-folder</property>
                                     <property name="title" translatable="yes">Choose destination folder</property>
                                   </object>
                                   <packing>
@@ -182,7 +411,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="position">0</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
@@ -197,8 +426,7 @@
                         <property name="left_padding">12</property>
                         <child>
                           <object class="GtkScrolledWindow" id="scrolledwindow4">
-                            <property name="width_request">465</property>
-                            <property name="height_request">355</property>
+                            <property name="height_request">145</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="hscrollbar_policy">automatic</property>
@@ -210,6 +438,9 @@
                                 <property name="can_focus">True</property>
                                 <property name="selection_mode">browse</property>
                                 <property name="model">theme_liststore</property>
+                                <property name="row_spacing">0</property>
+                                <property name="column_spacing">0</property>
+                                <property name="margin">0</property>
                                 <child>
                                   <object class="GtkCellRendererPixbuf" id="cellrenderertext3">
                                     <property name="follow_state">True</property>
@@ -219,7 +450,10 @@
                                   </attributes>
                                 </child>
                                 <child>
-                                  <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                                  <object class="GtkCellRendererText" id="cellrenderertext4">
+                                    <property name="alignment">center</property>
+                                    <property name="ellipsize">end</property>
+                                  </object>
                                   <attributes>
                                     <attribute name="text">1</attribute>
                                   </attributes>
@@ -242,7 +476,7 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
@@ -275,7 +509,7 @@
                         <child>
                           <object class="GtkTable" id="table3">
                             <property name="visible">True</property>
-                            <property name="n_rows">6</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>
@@ -349,199 +583,6 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="label86">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">_Header:</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkEntry" id="index_page_header_entry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">&#x25CF;</property>
-                                <property name="activates_default">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label122">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">_Footer:</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkEntry" id="index_page_footer_entry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">&#x25CF;</property>
-                                <property name="activates_default">True</property>
-                                <property name="secondary_icon_stock">gtk-help</property>
-                                <property name="secondary_icon_activatable">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
-                                <property name="secondary_icon_tooltip_text">Help</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkTable" id="page_footer_help_table">
-                                <property name="n_rows">4</property>
-                                <property name="n_columns">2</property>
-                                <property name="column_spacing">12</property>
-                                <property name="row_spacing">6</property>
-                                <child>
-                                  <object class="GtkLabel" id="label7">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">%p</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label8">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">%P</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label10">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">The current page number</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </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="GtkLabel" id="label11">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">The total number of pages</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </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>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label14">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Special code</property>
-                                    <attributes>
-                                      <attribute name="weight" value="bold"/>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label15">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Description</property>
-                                    <attributes>
-                                      <attribute name="weight" value="bold"/>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label16">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes" comments="translate only the text in the curly brackets">%D{ format }</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label17">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">The current date</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">5</property>
-                                <property name="bottom_attach">6</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
                               <object class="GtkHBox" id="hbox1">
                                 <property name="visible">True</property>
                                 <property name="spacing">6</property>
@@ -623,9 +664,6 @@
                                 <property name="mnemonic_widget">images_per_index_spinbutton</property>
                               </object>
                             </child>
-                            <child>
-                              <placeholder/>
-                            </child>
                           </object>
                         </child>
                       </object>
@@ -647,6 +685,74 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="top_padding">6</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkScrolledWindow" id="thumbnail_caption_scrolledwindow">
+                            <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>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkCheckButton" id="thumbnail_caption_checkbutton">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="draw_indicator">True</property>
+                        <child>
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Thumbnail Caption</property>
+                            <property name="use_markup">True</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <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 Page</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>
                   <object class="GtkFrame" id="frame2">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
@@ -664,7 +770,7 @@
                             <child>
                               <object class="GtkTable" id="table1">
                                 <property name="visible">True</property>
-                                <property name="n_rows">4</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>
@@ -676,8 +782,8 @@
                                     <property name="use_underline">True</property>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
@@ -696,8 +802,8 @@
                                   <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="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                     <property name="y_options">GTK_FILL</property>
                                   </packing>
                                 </child>
@@ -827,8 +933,8 @@
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                     <property name="y_options">GTK_FILL</property>
                                   </packing>
                                 </child>
@@ -840,14 +946,12 @@
                                     <property name="use_underline">True</property>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkEntry" id="index_page_header_entry1">
+                                  <object class="GtkEntry" id="image_page_header_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="invisible_char">&#x25CF;</property>
@@ -856,102 +960,17 @@
                                   <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="y_options">GTK_FILL</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label30">
-                                    <property name="visible">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">_Max size:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">image_size_combobox</property>
-                                  </object>
-                                  <packing>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <placeholder/>
                                 </child>
-                                <child>
-                                  <object class="GtkHBox" id="hbox4">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <object class="GtkComboBox" id="image_size_combobox">
-                                        <property name="visible">True</property>
-                                        <property name="model">size_liststore</property>
-                                        <child>
-                                          <object class="GtkCellRendererText" id="cellrenderertext5"/>
-                                          <attributes>
-                                            <attribute name="text">0</attribute>
-                                          </attributes>
-                                        </child>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                  </packing>
-                                </child>
                               </object>
                               <packing>
                                 <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="GtkCheckButton" id="checkbutton1">
-                                    <property name="label" translatable="yes">Thumbnails of the previous and next image</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="checkbutton2">
-                                    <property name="label" translatable="yes">Image attributes</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkCheckButton" id="checkbutton3">
-                                    <property name="label" translatable="yes">Image description</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                         </child>
                       </object>
@@ -969,72 +988,12 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <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">Layout</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>
-                  <object class="GtkFrame" id="frame4">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">none</property>
-                    <child>
-                      <object class="GtkAlignment" id="alignment6">
-                        <property name="visible">True</property>
-                        <property name="top_padding">6</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <object class="GtkScrolledWindow" id="thumbnail_caption_scrolledwindow">
-                            <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>
-                              <placeholder/>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label9">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Thumbnail Caption</property>
-                        <property name="use_markup">True</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                        </attributes>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame5">
+                    <property name="visible">True</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
@@ -1043,25 +1002,65 @@
                         <property name="top_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkScrolledWindow" id="image_caption_scrolledwindow">
-                            <property name="height_request">150</property>
+                          <object class="GtkVBox" id="vbox6">
                             <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>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">6</property>
                             <child>
-                              <placeholder/>
+                              <object class="GtkCheckButton" id="image_description_checkbutton">
+                                <property name="label" translatable="yes">Show the description, if available</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="image_attributes_checkbutton">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <child>
+                                  <object class="GtkLabel" id="label12">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Show the following attributes:</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkScrolledWindow" id="image_caption_scrolledwindow">
+                                <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>
+                                  <placeholder/>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
                             </child>
                           </object>
                         </child>
                       </object>
                     </child>
                     <child type="label">
-                      <object class="GtkLabel" id="label12">
+                      <object class="GtkLabel" id="label31">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Image Caption</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Image Attributes</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
                         </attributes>
@@ -1080,7 +1079,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">Caption</property>
+                <property name="label" translatable="yes">Image Page</property>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -1197,11 +1196,5 @@
       </row>
     </data>
   </object>
-  <object class="GtkSizeGroup" id="sizegroup1">
-    <widgets>
-      <widget name="label19"/>
-      <widget name="label28"/>
-      <widget name="label122"/>
-    </widgets>
-  </object>
+  <object class="GtkSizeGroup" id="sizegroup1"/>
 </interface>
diff --git a/extensions/webalbums/dlg-web-exporter.c b/extensions/webalbums/dlg-web-exporter.c
index e10aa88..c41b987 100644
--- a/extensions/webalbums/dlg-web-exporter.c
+++ b/extensions/webalbums/dlg-web-exporter.c
@@ -29,7 +29,7 @@
 
 #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"
+#define DEFAULT_ALBUM_THEME "ClassicClips"
 
 enum {
 	THEME_COLUMN_ID,
@@ -62,7 +62,7 @@ typedef struct {
 	GtkBuilder *builder;
 	GtkWidget  *dialog;
 	GtkWidget  *thumbnail_caption_chooser;
-	GtkWidget  *image_caption_chooser;
+	GtkWidget  *image_attributes_chooser;
 } DialogData;
 
 
@@ -92,11 +92,12 @@ ok_clicked_cb (GtkWidget  *widget,
 	char            *s_value;
 	GFile           *destination;
 	int              i_value;
-	const char      *index_page_header;
-	const char      *index_page_footer;
+	const char      *header;
+	const char      *footer;
+	const char      *image_page_header;
 	const char      *image_page_footer;
 	char            *thumbnail_caption;
-	char            *image_caption;
+	char            *image_attributes;
 	GtkTreeIter      iter;
 	char            *theme_name;
 	GthFileDataSort *sort_type;
@@ -134,11 +135,14 @@ ok_clicked_cb (GtkWidget  *widget,
 
 	eel_gconf_set_boolean (PREF_WEBALBUMS_SORT_INVERSE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("reverse_order_checkbutton"))));
 
-	index_page_header = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("index_page_header_entry")));
-	eel_gconf_set_string (PREF_WEBALBUMS_INDEX_PAGE_HEADER, index_page_header);
+	header = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("header_entry")));
+	eel_gconf_set_string (PREF_WEBALBUMS_HEADER, header);
 
-	index_page_footer = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("index_page_footer_entry")));
-	eel_gconf_set_string (PREF_WEBALBUMS_INDEX_PAGE_FOOTER, index_page_footer);
+	footer = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("footer_entry")));
+	eel_gconf_set_string (PREF_WEBALBUMS_FOOTER, footer);
+
+	image_page_header = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("image_page_header_entry")));
+	eel_gconf_set_string (PREF_WEBALBUMS_IMAGE_PAGE_HEADER, image_page_header);
 
 	image_page_footer = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("image_page_footer_entry")));
 	eel_gconf_set_string (PREF_WEBALBUMS_IMAGE_PAGE_FOOTER, image_page_footer);
@@ -165,18 +169,25 @@ ok_clicked_cb (GtkWidget  *widget,
 	g_return_if_fail (theme_name != NULL);
 	eel_gconf_set_string (PREF_WEBALBUMS_THEME, theme_name);
 
+	eel_gconf_set_boolean (PREF_WEBALBUMS_ENABLE_THUMBNAIL_CAPTION, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("thumbnail_caption_checkbutton"))));
+
 	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);
+	eel_gconf_set_boolean (PREF_WEBALBUMS_ENABLE_IMAGE_ATTRIBUTES, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_attributes_checkbutton"))));
+
+	eel_gconf_set_boolean (PREF_WEBALBUMS_ENABLE_IMAGE_DESCRIPTION, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_description_checkbutton"))));
+
+	image_attributes = gth_metadata_chooser_get_selection (GTH_METADATA_CHOOSER (data->image_attributes_chooser));
+	eel_gconf_set_string (PREF_WEBALBUMS_IMAGE_ATTRIBUTES, image_attributes);
 
 	/* exec the task */
 
 	task = gth_web_exporter_new (data->browser, data->file_list);
 
-	gth_web_exporter_set_header (GTH_WEB_EXPORTER (task), index_page_header);
-	gth_web_exporter_set_index_page_footer (GTH_WEB_EXPORTER (task), index_page_footer);
+	gth_web_exporter_set_header (GTH_WEB_EXPORTER (task), header);
+	gth_web_exporter_set_footer (GTH_WEB_EXPORTER (task), footer);
+	gth_web_exporter_set_image_page_header (GTH_WEB_EXPORTER (task), image_page_header);
 	gth_web_exporter_set_image_page_footer (GTH_WEB_EXPORTER (task), image_page_footer);
 	gth_web_exporter_set_style (GTH_WEB_EXPORTER (task), theme_name);
 	gth_web_exporter_set_destination (GTH_WEB_EXPORTER (task), destination);
@@ -198,13 +209,15 @@ ok_clicked_cb (GtkWidget  *widget,
 	gth_web_exporter_set_single_index (GTH_WEB_EXPORTER (task), eel_gconf_get_boolean (PREF_WEBALBUMS_SINGLE_INDEX, FALSE));
 	gth_web_exporter_set_columns (GTH_WEB_EXPORTER (task), eel_gconf_get_integer (PREF_WEBALBUMS_COLUMNS, 4));
 	gth_web_exporter_set_adapt_to_width (GTH_WEB_EXPORTER (task), eel_gconf_get_boolean (PREF_WEBALBUMS_ADAPT_TO_WIDTH, 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_web_exporter_set_thumbnail_caption (GTH_WEB_EXPORTER (task), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("thumbnail_caption_checkbutton"))) ? thumbnail_caption : "");
+	gth_web_exporter_set_image_attributes (GTH_WEB_EXPORTER (task),
+					       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_description_checkbutton"))),
+					       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_attributes_checkbutton"))) ? image_attributes : "");
 
 	gth_browser_exec_task (data->browser, task, FALSE);
 	gtk_widget_destroy (data->dialog);
 
-	g_free (image_caption);
+	g_free (image_attributes);
 	g_free (thumbnail_caption);
 	g_free (theme_name);
 	g_object_unref (destination);
@@ -218,6 +231,8 @@ update_sensitivity (DialogData *data)
 	gtk_widget_set_sensitive (GET_WIDGET ("resize_images_hbox"), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("copy_images_checkbutton"))));
 	gtk_widget_set_sensitive (GET_WIDGET ("images_per_index_spinbutton"), ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton"))));
 	gtk_widget_set_sensitive (GET_WIDGET ("cols_spinbutton"), ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("adapt_column_checkbutton"))));
+	gtk_widget_set_sensitive (data->image_attributes_chooser, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_attributes_checkbutton"))));
+	gtk_widget_set_sensitive (data->thumbnail_caption_chooser, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("thumbnail_caption_checkbutton"))));
 }
 
 
@@ -230,7 +245,7 @@ footer_entry_icon_press_cb (GtkEntry             *entry,
 	DialogData *data = user_data;
 	GtkWidget  *help_box;
 
-	if (GTK_WIDGET (entry) == GET_WIDGET ("index_page_footer_entry"))
+	if (GTK_WIDGET (entry) == GET_WIDGET ("footer_entry"))
 		help_box = GET_WIDGET ("page_footer_help_table");
 	else
 		help_box = GET_WIDGET ("image_footer_help_table");
@@ -356,21 +371,19 @@ dlg_web_exporter (GthBrowser *browser,
 	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_EVERYWHERE);
+	data->thumbnail_caption_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_IN_FILE_LIST);
 	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_EVERYWHERE);
-	gtk_widget_show (data->image_caption_chooser);
-	gtk_container_add (GTK_CONTAINER (GET_WIDGET ("image_caption_scrolledwindow")), data->image_caption_chooser);
+	data->image_attributes_chooser = gth_metadata_chooser_new (GTH_METADATA_ALLOW_IN_PROPERTIES_VIEW);
+	gtk_widget_show (data->image_attributes_chooser);
+	gtk_container_add (GTK_CONTAINER (GET_WIDGET ("image_caption_scrolledwindow")), data->image_attributes_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 ("images_per_index_spinbutton")), eel_gconf_get_integer (PREF_WEBALBUMS_IMAGES_PER_INDEX, 16));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_SINGLE_INDEX, FALSE));
 	gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton")), eel_gconf_get_integer (PREF_WEBALBUMS_COLUMNS, 4));
@@ -419,25 +432,35 @@ dlg_web_exporter (GthBrowser *browser,
 
 	g_free (default_sort_type);
 
-	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("index_page_header_entry")),
+	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("header_entry")),
 			    g_file_info_get_edit_name (gth_browser_get_location_data (browser)->info));
 
-	s_value = eel_gconf_get_string (PREF_WEBALBUMS_INDEX_PAGE_FOOTER, "");
-	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("index_page_footer_entry")), s_value);
+	s_value = eel_gconf_get_string (PREF_WEBALBUMS_FOOTER, "");
+	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("footer_entry")), s_value);
 	g_free (s_value);
 
 	s_value = eel_gconf_get_string (PREF_WEBALBUMS_IMAGE_PAGE_FOOTER, "");
 	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("image_page_footer_entry")), s_value);
 	g_free (s_value);
 
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("thumbnail_caption_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_ENABLE_THUMBNAIL_CAPTION, TRUE));
+
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_description_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_ENABLE_IMAGE_DESCRIPTION, TRUE));
+
 	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);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("image_attributes_checkbutton")), eel_gconf_get_boolean (PREF_WEBALBUMS_ENABLE_IMAGE_ATTRIBUTES, TRUE));
+
+	caption = eel_gconf_get_string (PREF_WEBALBUMS_IMAGE_ATTRIBUTES, "");
+	gth_metadata_chooser_set_selection (GTH_METADATA_CHOOSER (data->image_attributes_chooser), caption);
 	g_free (caption);
 
+	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("theme_liststore")),
+					      THEME_COLUMN_NAME,
+					      GTK_SORT_ASCENDING);
+
 	load_themes (data);
 	update_sensitivity (data);
 
@@ -478,7 +501,7 @@ dlg_web_exporter (GthBrowser *browser,
 				  "clicked",
 				  G_CALLBACK (update_sensitivity),
 				  data);
-	g_signal_connect (GET_WIDGET ("index_page_footer_entry"),
+	g_signal_connect (GET_WIDGET ("footer_entry"),
 			  "icon-press",
 			  G_CALLBACK (footer_entry_icon_press_cb),
 			  data);
@@ -494,6 +517,14 @@ dlg_web_exporter (GthBrowser *browser,
 				  "toggled",
 				  G_CALLBACK (update_sensitivity),
 				  data);
+	g_signal_connect_swapped (GET_WIDGET ("image_attributes_checkbutton"),
+				  "toggled",
+				  G_CALLBACK (update_sensitivity),
+				  data);
+	g_signal_connect_swapped (GET_WIDGET ("thumbnail_caption_checkbutton"),
+				  "toggled",
+				  G_CALLBACK (update_sensitivity),
+				  data);
 
 	/* Run dialog. */
 
diff --git a/extensions/webalbums/gth-web-exporter.c b/extensions/webalbums/gth-web-exporter.c
index 757f6cb..7ac726b 100644
--- a/extensions/webalbums/gth-web-exporter.c
+++ b/extensions/webalbums/gth-web-exporter.c
@@ -35,7 +35,7 @@
 #include "albumtheme-private.h"
 #include "preferences.h"
 
-#define DATE_FORMAT ("%x, %X")
+#define DEFAULT_DATE_FORMAT ("%x, %X")
 #define DEFAULT_THUMB_SIZE 100
 #define DEFAULT_INDEX_FILE "index.html"
 #define SAVING_TIMEOUT 5
@@ -121,7 +121,8 @@ struct _GthWebExporterPrivate {
 	/* options */
 
 	char              *header;
-	char              *index_page_footer;
+	char              *footer;
+	char              *image_page_header;
 	char              *image_page_footer;
 	GFile             *style_dir;
 	GFile             *target_dir;             /* Save files in this location. */
@@ -145,7 +146,8 @@ struct _GthWebExporterPrivate {
 	int                preview_max_height;
 	int                preview_min_width;
 	int                preview_min_height;
-	char              *image_caption;
+	gboolean           image_description_enabled;
+	char              *image_attributes;
 	char              *thumbnail_caption;
 
 	/* private date */
@@ -213,7 +215,6 @@ image_data_new (GthFileData *file_data,
 
 	idata = g_new0 (ImageData, 1);
 	idata->file_data = g_object_ref (file_data);
-	/* FIXME */
 	idata->dest_filename = g_strdup_printf ("%03d-%s", file_idx, g_file_info_get_name (file_data->info));
 
 	idata->image = NULL;
@@ -302,15 +303,7 @@ get_style_dir (GthWebExporter *self,
 }
 
 
-/* FIXME */
-
-
-#define RETURN_IMAGE_FIELD(image, field) {	\
-	if (image == NULL)			\
-		return 0;			\
-	else					\
-		return image->field;		\
-}
+#define IMAGE_FIELD(image, field) ((image != NULL) ? image->field : 0)
 
 
 static int
@@ -345,17 +338,17 @@ get_var_value (GthExpr    *expr,
 		return GTH_VISIBILITY_ALWAYS;
 
 	else if (strcmp (var_name, "image_width") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, image_width)
+		return IMAGE_FIELD (self->priv->eval_image, image_width);
 	else if (strcmp (var_name, "image_height") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, image_height)
+		return IMAGE_FIELD (self->priv->eval_image, image_height);
 	else if (strcmp (var_name, "preview_width") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, preview_width)
+		return IMAGE_FIELD (self->priv->eval_image, preview_width);
 	else if (strcmp (var_name, "preview_height") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, preview_height)
+		return IMAGE_FIELD (self->priv->eval_image, preview_height);
 	else if (strcmp (var_name, "thumb_width") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, thumb_width)
+		return IMAGE_FIELD (self->priv->eval_image, thumb_width);
 	else if (strcmp (var_name, "thumb_height") == 0)
-		RETURN_IMAGE_FIELD (self->priv->eval_image, thumb_height)
+		return IMAGE_FIELD (self->priv->eval_image, thumb_height);
 
 	else if (g_str_equal (var_name, "first_item"))
 		return (self->priv->loop_info != NULL) ? self->priv->loop_info->first_item : FALSE;
@@ -383,74 +376,31 @@ get_var_value (GthExpr    *expr,
 		else
 			return 0;
 	}
-
-	/* FIXME: use a generic function to get an attribute visibility */
-/*
-	else if (strcmp (var_name, "image_dim_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_IMAGE_DIM;
-	else if (strcmp (var_name, "file_name_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_FILE_NAME;
- 	else if (strcmp (var_name, "file_path_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_FILE_PATH;
-	else if (strcmp (var_name, "file_size_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_FILE_SIZE;
-	else if (strcmp (var_name, "comment_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_COMMENT;
-	else if (strcmp (var_name, "place_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_PLACE;
-	else if (strcmp (var_name, "date_time_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_DATE_TIME;
-	else if (strcmp (var_name, "exif_date_time_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_DATE_TIME;
-	else if (strcmp (var_name, "exif_exposure_time_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_EXPOSURE_TIME;
-	else if (strcmp (var_name, "exif_exposure_mode_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_EXPOSURE_MODE;
-	else if (strcmp (var_name, "exif_flash_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_FLASH;
-	else if (strcmp (var_name, "exif_shutter_speed_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_SHUTTER_SPEED;
-	else if (strcmp (var_name, "exif_aperture_value_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_APERTURE_VALUE;
-	else if (strcmp (var_name, "exif_focal_length_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_FOCAL_LENGTH;
-	else if (strcmp (var_name, "exif_camera_model_visibility_index") == 0)
-		return self->priv->index_caption_mask & GTH_CAPTION_EXIF_CAMERA_MODEL;
-
-	else if (strcmp (var_name, "image_dim_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_IMAGE_DIM;
-	else if (strcmp (var_name, "file_name_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_FILE_NAME;
- 	else if (strcmp (var_name, "file_path_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_FILE_PATH;
-	else if (strcmp (var_name, "file_size_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_FILE_SIZE;
-	else if (strcmp (var_name, "comment_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_COMMENT;
-	else if (strcmp (var_name, "place_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_PLACE;
-	else if (strcmp (var_name, "date_time_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_DATE_TIME;
-	else if (strcmp (var_name, "exif_date_time_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_DATE_TIME;
-	else if (strcmp (var_name, "exif_exposure_time_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_EXPOSURE_TIME;
-	else if (strcmp (var_name, "exif_exposure_mode_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_EXPOSURE_MODE;
-	else if (strcmp (var_name, "exif_flash_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_FLASH;
-	else if (strcmp (var_name, "exif_shutter_speed_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_SHUTTER_SPEED;
-	else if (strcmp (var_name, "exif_aperture_value_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_APERTURE_VALUE;
-	else if (strcmp (var_name, "exif_focal_length_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_FOCAL_LENGTH;
-	else if (strcmp (var_name, "exif_camera_model_visibility_image") == 0)
-		return self->priv->image_caption_mask & GTH_CAPTION_EXIF_CAMERA_MODEL;
-*/
-
-	else if (strcmp (var_name, "copy_originals") == 0)
+	else if (strcmp (var_name, "copy_originals") == 0) {
 		return self->priv->copy_images;
+	}
+	else if (g_str_equal (var_name, "image_description_enabled")) {
+		return self->priv->image_description_enabled;
+	}
+	else if (strcmp (var_name, "image_attributes_enabled") == 0) {
+		return ! g_str_equal (self->priv->image_attributes, "");
+	}
+	else if (g_str_equal (var_name, "image_attribute_enabled")) {
+		GthCell *cell;
+
+		cell = gth_expr_get_pos (expr, (*index) + 1);
+		if ((cell != NULL) && (cell->type == GTH_CELL_TYPE_STRING)) {
+			const char *attribute_id;
+			int         result;
+
+			attribute_id = cell->value.string->str;
+			result = _g_file_attributes_matches_any (attribute_id, self->priv->image_attributes);
+
+			return result;
+		}
+		else
+			return 0;
+	}
 
 	g_warning ("[GetVarValue] Unknown variable name: %s", var_name);
 
@@ -677,19 +627,18 @@ get_image_attribute (GthWebExporter    *self,
 		     ImageData         *image_data)
 {
 	char *value;
-	int   max_size;
+	int   max_length;
 	char *line = NULL;
 
-	/* FIXME */
 	value = gth_file_data_get_attribute_as_string (image_data->file_data, attribute);
 	if (value == NULL)
 		return NULL;
 
-	max_size = gth_tag_get_var (self, tag, "max_size");
-	if (max_size > 0) {
+	max_length = gth_tag_get_var (self, tag, "max_length");
+	if (max_length > 0) {
 		char *truncated;
 
-		truncated = g_strndup (value, max_size);
+		truncated = g_strndup (value, max_length);
 		if (strlen (truncated) < strlen (value))
 			line = g_strconcat (truncated, "...", NULL);
 		else
@@ -886,14 +835,14 @@ get_preview_file (GthWebExporter *self,
 
 
 static char *
-get_current_date (void)
+get_current_date (const char *format)
 {
 	GTimeVal  timeval;
 	char     *s;
 	char     *u;
 
 	g_get_current_time (&timeval);
-	s = _g_time_val_strftime (&timeval, DATE_FORMAT);
+	s = _g_time_val_strftime (&timeval, format);
 	u = g_locale_to_utf8 (s, -1, 0, 0, 0);
 
 	g_free (s);
@@ -1059,7 +1008,7 @@ gth_parsed_doc_print (GthWebExporter      *self,
 		int         idx;
 		int         image_width;
 		int         image_height;
-		int         max_size;
+		int         max_length;
 		int         r, c;
 		int         value;
 		const char *src;
@@ -1078,15 +1027,18 @@ gth_parsed_doc_print (GthWebExporter      *self,
 
 		switch (tag->type) {
 		case GTH_TAG_HEADER:
-			line = get_header_footer_text (self, self->priv->header);
+			if (template_type == GTH_TEMPLATE_TYPE_INDEX)
+				line = get_header_footer_text (self, self->priv->header);
+			else if (template_type == GTH_TEMPLATE_TYPE_IMAGE)
+				line = get_header_footer_text (self, self->priv->image_page_header ? self->priv->image_page_header : self->priv->header);
 			write_markup_escape_line (ostream, line, error);
 			break;
 
 		case GTH_TAG_FOOTER:
 			if (template_type == GTH_TEMPLATE_TYPE_INDEX)
-				line = get_header_footer_text (self, self->priv->index_page_footer);
+				line = get_header_footer_text (self, self->priv->footer);
 			else if (template_type == GTH_TEMPLATE_TYPE_IMAGE)
-				line = get_header_footer_text (self, self->priv->image_page_footer);
+				line = get_header_footer_text (self, self->priv->image_page_footer ? self->priv->image_page_footer : self->priv->footer);
 			if (line != NULL)
 				write_markup_escape_line (ostream, line, error);
 			break;
@@ -1140,17 +1092,18 @@ gth_parsed_doc_print (GthWebExporter      *self,
 			else
 				class_attr = g_strdup ("");
 
-			max_size = gth_tag_get_var (self, tag, "max_size");
-			if (max_size > 0)
+			max_length = gth_tag_get_var (self, tag, "max_length");
+			if (max_length > 0)
 				scale_keeping_ratio (&image_width,
 						     &image_height,
-						     max_size,
-						     max_size,
+						     max_length,
+						     max_length,
 						     FALSE);
 
 			alt = gth_tag_get_str (self, tag, "alt");
-			if (alt != NULL)
+			if (alt != NULL) {
 				alt_attr = g_strdup (alt);
+			}
 			else {
 				char *unescaped_path;
 
@@ -1310,43 +1263,6 @@ gth_parsed_doc_print (GthWebExporter      *self,
 			write_markup_escape_line (ostream, line, error);
 			break;
 
-			/* FIXME
-		case GTH_TAG_COMMENT:
-			line = get_image_attribute (self, tag, "general::title", image_data);
-			write_markup_escape_line (ostream, line, error);
-			break;
-
-		case GTH_TAG_PLACE:
-			line = get_image_attribute (self, tag, "general::location", image_data);
-			write_markup_escape_line (ostream, line, error);
-			break;
-
-		case GTH_TAG_DATE_TIME:
-			line = get_image_attribute (self, tag, "general::datetime", image_data);
-			write_markup_escape_line (ostream, line, error);
-			break;
-			*/
-
-			/* FIXME
-			if (idata->date_time == NULL)
-				break;
-
-			max_size = gth_tag_get_var (self, tag, "max_size");
-			if (max_size <= 0)
-				line = g_strdup (idata->date_time);
-			else {
-				char *date_time = g_strndup (idata->date_time, max_size);
-				if (strlen (date_time) < strlen (idata->date_time))
-					line = g_strconcat (date_time, "...", NULL);
-				else
-					line = g_strdup (date_time);
-				g_free (date_time);
-			}
-
-			write_markup_escape_line (ostream, error, line);
-			break;
-			*/
-
 		case GTH_TAG_PAGE_LINK:
 			if (gth_tag_get_var (self, tag, "image_idx") != 0) {
 				int image_idx;
@@ -1433,103 +1349,21 @@ gth_parsed_doc_print (GthWebExporter      *self,
 			}
 			break;
 
-		case GTH_TAG_TIMESTAMP: /* FIXME: add custom format support */
-			line = get_current_date ();
-			write_markup_escape_line (ostream, line, error);
-			break;
-
-		case GTH_TAG_HTML:
-			write_line (ostream, tag->value.html, error);
-			break;
-
-			/* FIXME: make a generic function to print file attributes */
-#if 0
-		case GTH_TAG_EXIF_EXPOSURE_TIME:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data, TAG_NAME_SETS[EXPTIME_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_EXPOSURE_MODE:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-							    TAG_NAME_SETS[EXPMODE_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_FLASH:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-					     		    TAG_NAME_SETS[FLASH_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_SHUTTER_SPEED:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-							    TAG_NAME_SETS[SHUTTERSPEED_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_APERTURE_VALUE:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-							    TAG_NAME_SETS[APERTURE_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_FOCAL_LENGTH:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-					     		    TAG_NAME_SETS[FOCAL_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_EXIF_DATE_TIME:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
+		case GTH_TAG_TIMESTAMP:
 			{
-				time_t     t;
-				struct tm *tp;
-				char s[100];
-
-				t = get_exif_time (idata->file_data);
-				if (t != 0) {
-					tp = localtime (&t);
-					strftime (s, 99, DATE_FORMAT, tp);
-					line = g_locale_to_utf8 (s, -1, 0, 0, 0);
-					write_markup_escape_line (ostream, error, line);
-				}
-				else
-					write_line (ostream, error, "-");
+				const char *format;
 
+				format = gth_tag_get_str (self, tag, "format");
+				if (format == NULL)
+					format = DEFAULT_DATE_FORMAT;
+				line = get_current_date (format);
+				write_markup_escape_line (ostream, line, error);
 			}
 			break;
 
-		case GTH_TAG_EXIF_CAMERA_MODEL:
-			idx = get_image_idx (tag, self);
-			idata = g_list_nth (self->priv->file_list, idx)->data;
-			line = get_metadata_tagset_string (idata->file_data,
-							    TAG_NAME_SETS[MAKE_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			g_free (line);
-
-			write_line (ostream, error, " &nbsp; ");
-
-			line = get_metadata_tagset_string (idata->file_data,
-					    		    TAG_NAME_SETS[MODEL_TAG_NAMES]);
-			write_markup_escape_line (ostream, error, line);
-			break;
-
-		case GTH_TAG_SET_VAR:
+		case GTH_TAG_HTML:
+			write_line (ostream, tag->value.html, error);
 			break;
-#endif
 
 		case GTH_TAG_EVAL:
 			idx = get_image_idx (tag, self);
@@ -1551,7 +1385,7 @@ gth_parsed_doc_print (GthWebExporter      *self,
 				if (expression_value (self, cond->expr) != 0) {
 					gth_parsed_doc_print (self,
 							      cond->document,
-							      GTH_TEMPLATE_TYPE_FRAGMENT,
+							      template_type,
 							      loop_info,
 							      relative_to,
 							      ostream,
@@ -1563,7 +1397,6 @@ gth_parsed_doc_print (GthWebExporter      *self,
 
 		case GTH_TAG_FOR_EACH_THUMBNAIL_CAPTION:
 		case GTH_TAG_FOR_EACH_IMAGE_CAPTION:
-			/* FIXME */
 			{
 				LoopInfo  *inner_loop_info;
 				char     **attributes;
@@ -1579,7 +1412,7 @@ gth_parsed_doc_print (GthWebExporter      *self,
 				if (tag->type == GTH_TAG_FOR_EACH_THUMBNAIL_CAPTION)
 					attributes = g_strsplit (self->priv->thumbnail_caption, ",", -1);
 				else
-					attributes = g_strsplit (self->priv->image_caption, ",", -1);
+					attributes = g_strsplit (self->priv->image_attributes, ",", -1);
 
 				first_non_empty = -1;
 				last_non_empty = -1;
@@ -2584,11 +2417,6 @@ parse_theme_files (GthWebExporter *self)
 	}
 	g_object_unref (template);
 
-	/*
-	g_print ("\n\nIndex: \n");
-	gth_parsed_doc_print_tree (self->priv->index_template);
-	*/
-
 	/* read and parse thumbnail.gthtml */
 
 	template = g_file_get_child (self->priv->style_dir, "thumbnail.gthtml");
@@ -2614,11 +2442,6 @@ parse_theme_files (GthWebExporter *self)
 	}
 	g_object_unref (template);
 
-	/*
-	g_print ("\n\nThumbnail: \n");
-	gth_parsed_doc_print_tree (self->priv->thumbnail_template);
-	*/
-
 	/* Read and parse image.gthtml */
 
 	template = g_file_get_child (self->priv->style_dir, "image.gthtml");
@@ -2644,11 +2467,6 @@ parse_theme_files (GthWebExporter *self)
 	}
 	g_object_unref (template);
 
-	/*
-	g_print ("\n\nImage: \n");
-	gth_parsed_doc_print_tree (self->priv->image_template);
-	*/
-
 	/* read index.html and set variables. */
 
 	for (scan = self->priv->index_template; scan; scan = scan->next) {
@@ -2828,9 +2646,13 @@ gth_web_exporter_exec (GthTask *task)
 	parse_theme_files (self);
 
 	required_attributes = g_string_new (GFILE_STANDARD_ATTRIBUTES_WITH_CONTENT_TYPE);
-	if (self->priv->image_caption != NULL) {
+	if (self->priv->image_attributes != NULL) {
 		g_string_append (required_attributes, ",");
-		g_string_append (required_attributes, self->priv->image_caption);
+		g_string_append (required_attributes, self->priv->image_attributes);
+	}
+	if (self->priv->image_description_enabled) {
+		g_string_append (required_attributes, ",general::description");
+		g_string_append (required_attributes, ",general::title");
 	}
 	if (self->priv->thumbnail_caption != NULL) {
 		g_string_append (required_attributes, ",");
@@ -2861,7 +2683,8 @@ gth_web_exporter_finalize (GObject *object)
 
 	self = GTH_WEB_EXPORTER (object);
 	g_free (self->priv->header);
-	g_free (self->priv->index_page_footer);
+	g_free (self->priv->footer);
+	g_free (self->priv->image_page_header);
 	g_free (self->priv->image_page_footer);
 	_g_object_unref (self->priv->style_dir);
 	_g_object_unref (self->priv->target_dir);
@@ -2875,7 +2698,7 @@ gth_web_exporter_finalize (GObject *object)
 	g_free (self->priv->index_file);
 	_g_object_unref (self->priv->iloader);
 	g_free (self->priv->thumbnail_caption);
-	g_free (self->priv->image_caption);
+	g_free (self->priv->image_attributes);
 	free_parsed_docs (self);
 	if (self->priv->file_list != NULL) {
 		g_list_foreach (self->priv->file_list, (GFunc) image_data_free, NULL);
@@ -2909,7 +2732,8 @@ gth_web_exporter_init (GthWebExporter *self)
 {
 	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_WEB_EXPORTER, GthWebExporterPrivate);
 	self->priv->header = NULL;
-	self->priv->index_page_footer = NULL;
+	self->priv->footer = NULL;
+	self->priv->image_page_header = NULL;
 	self->priv->image_page_footer = NULL;
 	self->priv->style_dir = NULL;
 	self->priv->target_dir = NULL;
@@ -2937,7 +2761,7 @@ gth_web_exporter_init (GthWebExporter *self)
 	self->priv->preview_min_width = 0;
 	self->priv->preview_min_height = 0;
 	self->priv->thumbnail_caption = NULL;
-	self->priv->image_caption = NULL;
+	self->priv->image_attributes = NULL;
 	self->priv->index_file = g_strdup (DEFAULT_INDEX_FILE);
 	self->priv->file_list = NULL;
 	self->priv->tmp_dir = NULL;
@@ -2998,34 +2822,51 @@ gth_web_exporter_new (GthBrowser *browser,
 
 void
 gth_web_exporter_set_header (GthWebExporter *self,
-			     const char     *header)
+			     const char     *value)
 {
 	g_return_if_fail (GTH_IS_WEB_EXPORTER (self));
 
 	g_free (self->priv->header);
-	self->priv->header = g_strdup (header);
+	self->priv->header = g_strdup (value);
 }
 
 
 void
-gth_web_exporter_set_index_page_footer (GthWebExporter *self,
-					const char     *footer)
+gth_web_exporter_set_footer (GthWebExporter *self,
+			     const char     *value)
 {
 	g_return_if_fail (GTH_IS_WEB_EXPORTER (self));
 
-	g_free (self->priv->index_page_footer);
-	self->priv->index_page_footer = g_strdup (footer);
+	g_free (self->priv->footer);
+	self->priv->footer = g_strdup (value);
+}
+
+
+void
+gth_web_exporter_set_image_page_header (GthWebExporter *self,
+					const char     *value)
+{
+	g_return_if_fail (GTH_IS_WEB_EXPORTER (self));
+
+	g_free (self->priv->image_page_header);
+	if ((value != NULL) && (*value != '\0'))
+		self->priv->image_page_header = g_strdup (value);
+	else
+		self->priv->image_page_header = NULL;
 }
 
 
 void
 gth_web_exporter_set_image_page_footer (GthWebExporter *self,
-					const char     *footer)
+					const char     *value)
 {
 	g_return_if_fail (GTH_IS_WEB_EXPORTER (self));
 
 	g_free (self->priv->image_page_footer);
-	self->priv->image_page_footer = g_strdup (footer);
+	if ((value != NULL) && (*value != '\0'))
+		self->priv->image_page_footer = g_strdup (value);
+	else
+		self->priv->image_page_footer = NULL;
 }
 
 
@@ -3180,13 +3021,16 @@ gth_web_exporter_set_preview_min_size (GthWebExporter *self,
 
 
 void
-gth_web_exporter_set_image_caption (GthWebExporter *self,
-				    const char     *caption)
+gth_web_exporter_set_image_attributes (GthWebExporter *self,
+				       gboolean        image_description_enabled,
+				       const char     *caption)
 {
 	g_return_if_fail (GTH_IS_WEB_EXPORTER (self));
 
-	g_free (self->priv->image_caption);
-	self->priv->image_caption = g_strdup (caption);
+	self->priv->image_description_enabled = image_description_enabled;
+
+	g_free (self->priv->image_attributes);
+	self->priv->image_attributes = g_strdup (caption);
 }
 
 
diff --git a/extensions/webalbums/gth-web-exporter.h b/extensions/webalbums/gth-web-exporter.h
index 45608c3..ece5cf2 100644
--- a/extensions/webalbums/gth-web-exporter.h
+++ b/extensions/webalbums/gth-web-exporter.h
@@ -53,11 +53,13 @@ GType      gth_web_exporter_get_type              (void);
 GthTask *  gth_web_exporter_new                   (GthBrowser       *browser,
 						   GList            *file_list); /* GFile list */
 void       gth_web_exporter_set_header            (GthWebExporter   *self,
-						   const char       *header);
-void       gth_web_exporter_set_index_page_footer (GthWebExporter   *self,
-						   const char       *footer);
+						   const char       *value);
+void       gth_web_exporter_set_footer            (GthWebExporter   *self,
+						   const char       *value);
+void       gth_web_exporter_set_image_page_header (GthWebExporter   *self,
+						   const char       *value);
 void       gth_web_exporter_set_image_page_footer (GthWebExporter   *self,
-						   const char       *footer);
+						   const char       *value);
 void       gth_web_exporter_set_style             (GthWebExporter   *self,
 						   const char       *style_name);
 void       gth_web_exporter_set_destination       (GthWebExporter   *self,
@@ -90,7 +92,8 @@ void       gth_web_exporter_set_preview_size      (GthWebExporter   *self,
 void       gth_web_exporter_set_preview_min_size  (GthWebExporter   *self,
 					           int               width,
 					           int               height);
-void       gth_web_exporter_set_image_caption     (GthWebExporter   *self,
+void       gth_web_exporter_set_image_attributes  (GthWebExporter   *self,
+						   gboolean          image_description_enabled,
 						   const char       *caption);
 void       gth_web_exporter_set_thumbnail_caption (GthWebExporter   *self,
 						   const char       *caption);
diff --git a/extensions/webalbums/preferences.h b/extensions/webalbums/preferences.h
index b347a8a..a167dce 100644
--- a/extensions/webalbums/preferences.h
+++ b/extensions/webalbums/preferences.h
@@ -27,31 +27,35 @@
 
 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_IMAGES_PER_INDEX    "/apps/gthumb/ext/webalbums/images_per_index"
-#define PREF_WEBALBUMS_SINGLE_INDEX        "/apps/gthumb/ext/webalbums/single_index"
-#define PREF_WEBALBUMS_COLUMNS             "/apps/gthumb/ext/webalbums/columns"
-#define PREF_WEBALBUMS_ADAPT_TO_WIDTH      "/apps/gthumb/ext/webalbums/adapt_to_width"
-#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_INDEX_PAGE_HEADER   "/apps/gthumb/ext/webalbums/index_page_header"
-#define PREF_WEBALBUMS_INDEX_PAGE_FOOTER   "/apps/gthumb/ext/webalbums/index_page_footer"
-#define PREF_WEBALBUMS_IMAGE_PAGE_FOOTER   "/apps/gthumb/ext/webalbums/image_page_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"
+#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_IMAGES_PER_INDEX         "/apps/gthumb/ext/webalbums/images_per_index"
+#define PREF_WEBALBUMS_SINGLE_INDEX             "/apps/gthumb/ext/webalbums/single_index"
+#define PREF_WEBALBUMS_COLUMNS                  "/apps/gthumb/ext/webalbums/columns"
+#define PREF_WEBALBUMS_ADAPT_TO_WIDTH           "/apps/gthumb/ext/webalbums/adapt_to_width"
+#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_IMAGE_PAGE_HEADER        "/apps/gthumb/ext/webalbums/image_page_header"
+#define PREF_WEBALBUMS_IMAGE_PAGE_FOOTER        "/apps/gthumb/ext/webalbums/image_page_footer"
+#define PREF_WEBALBUMS_THEME                    "/apps/gthumb/ext/webalbums/theme"
+#define PREF_WEBALBUMS_ENABLE_THUMBNAIL_CAPTION "/apps/gthumb/ext/webalbums/enable_thumbnail_caption"
+#define PREF_WEBALBUMS_THUMBNAIL_CAPTION        "/apps/gthumb/ext/webalbums/thumbnail_caption"
+#define PREF_WEBALBUMS_ENABLE_IMAGE_DESCRIPTION "/apps/gthumb/ext/webalbums/enable_image_description"
+#define PREF_WEBALBUMS_ENABLE_IMAGE_ATTRIBUTES  "/apps/gthumb/ext/webalbums/enable_image_attributes"
+#define PREF_WEBALBUMS_IMAGE_ATTRIBUTES         "/apps/gthumb/ext/webalbums/image_attributes"
 
 G_END_DECLS
 



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