[gthumb] web albums: use the template editor



commit 6f93a564cf000b7abaafd18f25d573bc7c8186c9
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri May 21 08:04:23 2021 +0200

    web albums: use the template editor

 .../org.gnome.gthumb.webalbums.gschema.xml         |    4 +-
 extensions/webalbums/data/ui/web-album-exporter.ui | 1026 ++++++++------------
 extensions/webalbums/dlg-web-exporter.c            |  235 ++++-
 extensions/webalbums/gth-web-exporter.c            |  123 +--
 4 files changed, 643 insertions(+), 745 deletions(-)
---
diff --git a/data/gschemas/org.gnome.gthumb.webalbums.gschema.xml 
b/data/gschemas/org.gnome.gthumb.webalbums.gschema.xml
index e54eb9a6..7beabf3f 100644
--- a/data/gschemas/org.gnome.gthumb.webalbums.gschema.xml
+++ b/data/gschemas/org.gnome.gthumb.webalbums.gschema.xml
@@ -56,13 +56,13 @@
       <default>false</default>
     </key>
     <key name="header" type="s">
-      <default>''</default>
+      <default>'%L'</default>
     </key>
     <key name="footer" type="s">
       <default>''</default>
     </key>
     <key name="image-page-header" type="s">
-      <default>''</default>
+      <default>'%F'</default>
     </key>
     <key name="image-page-footer" type="s">
       <default>''</default>
diff --git a/extensions/webalbums/data/ui/web-album-exporter.ui 
b/extensions/webalbums/data/ui/web-album-exporter.ui
index cdb359f1..7b3ee96d 100644
--- a/extensions/webalbums/data/ui/web-album-exporter.ui
+++ b/extensions/webalbums/data/ui/web-album-exporter.ui
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.38.2 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkAdjustment" id="cols_adjustment">
     <property name="lower">1</property>
     <property name="upper">100</property>
     <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+    <property name="step-increment">1</property>
+    <property name="page-increment">10</property>
   </object>
   <object class="GtkListStore" id="layout_liststore">
     <columns>
@@ -27,8 +27,8 @@
     <property name="lower">1</property>
     <property name="upper">100</property>
     <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+    <property name="step-increment">1</property>
+    <property name="page-increment">10</property>
   </object>
   <object class="GtkListStore" id="size_liststore">
     <columns>
@@ -57,256 +57,163 @@
   </object>
   <object class="GtkBox" id="dialog_content">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="border_width">15</property>
+    <property name="can-focus">False</property>
+    <property name="border-width">15</property>
     <property name="orientation">vertical</property>
     <property name="spacing">5</property>
     <child>
       <object class="GtkNotebook" id="notebook1">
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
+        <property name="can-focus">True</property>
         <property name="vexpand">True</property>
-        <property name="border_width">6</property>
+        <property name="border-width">6</property>
         <child>
           <object class="GtkBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">6</property>
+            <property name="can-focus">False</property>
+            <property name="border-width">12</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">6</property>
+            <property name="spacing">20</property>
             <child>
               <object class="GtkFrame" id="frame7">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</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="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</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="can_focus">False</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>
+                        <property name="can-focus">False</property>
+                        <property name="n-rows">2</property>
+                        <property name="n-columns">2</property>
+                        <property name="column-spacing">6</property>
+                        <property name="row-spacing">6</property>
                         <child>
-                          <placeholder/>
+                          <object class="GtkLabel" id="label122">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <property name="label" translatable="yes">_Footer:</property>
+                            <property name="use-underline">True</property>
+                            <property name="xalign">0</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"/>
+                          </packing>
                         </child>
                         <child>
-                          <object class="GtkTable" id="page_footer_help_table">
-                            <property name="can_focus">False</property>
-                            <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="can_focus">False</property>
-                                <property name="label">%p</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
-                              </object>
-                              <packing>
-                                <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="label8">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">%P</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label10">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">The current page number</property>
-                                <property name="xalign">0</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>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label11">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">The total number of 
pages</property>
-                                <property name="xalign">0</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>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
+                          <object class="GtkLabel" id="label86">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <property name="label" translatable="yes">_Header:</property>
+                            <property name="use-underline">True</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="x-options">GTK_FILL</property>
+                            <property name="y-options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
                             <child>
-                              <object class="GtkLabel" id="label14">
+                              <object class="GtkEntry" id="header_entry">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Special code</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="weight" value="bold"/>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
+                                <property name="can-focus">True</property>
+                                <property name="invisible-char">●</property>
+                                <property name="activates-default">True</property>
+                                <property name="secondary-icon-tooltip-markup" 
translatable="yes">Help</property>
                               </object>
                               <packing>
-                                <property name="y_options">GTK_FILL</property>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="label15">
+                              <object class="GtkButton" id="edit_header_button">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Description</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="weight" value="bold"/>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
+                                <property name="can-focus">True</property>
+                                <property name="receives-default">True</property>
+                                <child>
+                                  <object class="GtkImage">
+                                    <property name="visible">True</property>
+                                    <property name="can-focus">False</property>
+                                    <property name="icon-name">document-edit-symbolic</property>
+                                  </object>
+                                </child>
                               </object>
                               <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="y_options">GTK_FILL</property>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
+                            <style>
+                              <class name="linked"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="right-attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
                             <child>
-                              <object class="GtkLabel" id="label16">
+                              <object class="GtkEntry" id="footer_entry">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes" comments="translate only the text 
in the curly brackets">%D{ format }</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
+                                <property name="can-focus">True</property>
+                                <property name="invisible-char">●</property>
+                                <property name="activates-default">True</property>
+                                <property name="secondary-icon-tooltip-markup" 
translatable="yes">Help</property>
                               </object>
                               <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="label17">
+                              <object class="GtkButton" id="edit_footer_button">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">The current date</property>
-                                <property name="xalign">0</property>
-                                <attributes>
-                                  <attribute name="size" value="8000"/>
-                                </attributes>
+                                <property name="can-focus">True</property>
+                                <property name="receives-default">True</property>
+                                <child>
+                                  <object class="GtkImage">
+                                    <property name="visible">True</property>
+                                    <property name="can-focus">False</property>
+                                    <property name="icon-name">document-edit-symbolic</property>
+                                  </object>
+                                </child>
                               </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>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
+                            <style>
+                              <class name="linked"/>
+                            </style>
                           </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">●</property>
-                            <property name="activates_default">True</property>
-                            <property name="secondary_icon_name">help-browser-symbolic</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="can_focus">False</property>
-                            <property name="label" translatable="yes">_Footer:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">footer_entry</property>
-                            <property name="xalign">0</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"/>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="header_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="activates_default">True</property>
-                            <property name="secondary_icon_name">help-browser-symbolic</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="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label86">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">_Header:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">header_entry</property>
-                            <property name="xalign">0</property>
-                          </object>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
+                            <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>
                       </object>
@@ -316,9 +223,9 @@
                 <child type="label">
                   <object class="GtkLabel" id="label30">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Album</property>
-                    <property name="use_markup">True</property>
+                    <property name="use-markup">True</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -334,33 +241,33 @@
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="top-padding">6</property>
+                    <property name="left-padding">12</property>
                     <child>
                       <object class="GtkBox" id="vbox5">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkBox" id="hbox2">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkLabel" id="label84">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="label" translatable="yes">_Destination:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">destination_filechooserbutton</property>
+                                <property name="use-underline">True</property>
+                                <property name="mnemonic-widget">destination_filechooserbutton</property>
                                 <property name="xalign">0</property>
                               </object>
                               <packing>
@@ -372,9 +279,9 @@
                             <child>
                               <object class="GtkFileChooserButton" id="destination_filechooserbutton">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="action">select-folder</property>
-                                <property name="local_only">False</property>
+                                <property name="local-only">False</property>
                                 <property name="title" translatable="yes">Choose destination 
folder</property>
                               </object>
                               <packing>
@@ -393,13 +300,13 @@
                         <child>
                           <object class="GtkCheckButton" id="copy_images_checkbutton">
                             <property name="label" translatable="yes">_Copy originals to 
destination</property>
-                            <property name="use_action_appearance">False</property>
+                            <property name="use-action-appearance">False</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">False</property>
+                            <property name="use-underline">True</property>
                             <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
+                            <property name="draw-indicator">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -410,23 +317,23 @@
                         <child>
                           <object class="GtkAlignment" id="alignment1">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="left_padding">12</property>
+                            <property name="can-focus">False</property>
+                            <property name="left-padding">12</property>
                             <child>
                               <object class="GtkBox" id="resize_images_hbox">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="spacing">6</property>
                                 <child>
                                   <object class="GtkCheckButton" id="resize_images_checkbutton">
                                     <property name="label" translatable="yes">_Resize if larger 
than:</property>
-                                    <property name="use_action_appearance">False</property>
+                                    <property name="use-action-appearance">False</property>
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
+                                    <property name="can-focus">True</property>
+                                    <property name="receives-default">False</property>
+                                    <property name="use-underline">True</property>
                                     <property name="xalign">0.5</property>
-                                    <property name="draw_indicator">True</property>
+                                    <property name="draw-indicator">True</property>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
@@ -437,12 +344,12 @@
                                 <child>
                                   <object class="GtkBox" id="resize_images_options_hbox">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="spacing">6</property>
                                     <child>
                                       <object class="GtkComboBox" id="resize_images_combobox">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
+                                        <property name="can-focus">False</property>
                                         <property name="model">size_liststore</property>
                                         <child>
                                           <object class="GtkCellRendererText" id="cellrenderertext1"/>
@@ -480,9 +387,9 @@
                 <child type="label">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Saving</property>
-                    <property name="use_markup">True</property>
+                    <property name="use-markup">True</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -498,47 +405,39 @@
             <child>
               <object class="GtkFrame" id="frame6">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment8">
+                  <object class="GtkScrolledWindow" id="scrolledwindow4">
+                    <property name="height-request">150</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">True</property>
+                    <property name="shadow-type">in</property>
                     <child>
-                      <object class="GtkScrolledWindow" id="scrolledwindow4">
-                        <property name="height_request">150</property>
+                      <object class="GtkIconView" id="theme_iconview">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="shadow_type">in</property>
+                        <property name="can-focus">True</property>
+                        <property name="margin">0</property>
+                        <property name="vexpand">False</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>
                         <child>
-                          <object class="GtkIconView" id="theme_iconview">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="margin">0</property>
-                            <property name="vexpand">False</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>
-                            <child>
-                              <object class="GtkCellRendererPixbuf" id="cellrenderertext3"/>
-                              <attributes>
-                                <attribute name="pixbuf">2</attribute>
-                              </attributes>
-                            </child>
-                            <child>
-                              <object class="GtkCellRendererText" id="cellrenderertext4">
-                                <property name="alignment">center</property>
-                                <property name="ellipsize">end</property>
-                              </object>
-                              <attributes>
-                                <attribute name="text">1</attribute>
-                              </attributes>
-                            </child>
+                          <object class="GtkCellRendererPixbuf" id="cellrenderertext3"/>
+                          <attributes>
+                            <attribute name="pixbuf">2</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext4">
+                            <property name="alignment">center</property>
+                            <property name="ellipsize">end</property>
                           </object>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
                         </child>
                       </object>
                     </child>
@@ -547,9 +446,9 @@
                 <child type="label">
                   <object class="GtkLabel" id="label13">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Theme</property>
-                    <property name="use_markup">True</property>
+                    <property name="use-markup">True</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -567,65 +466,65 @@
         <child type="tab">
           <object class="GtkLabel" id="label3">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can-focus">False</property>
             <property name="label" translatable="yes">General</property>
           </object>
           <packing>
-            <property name="tab_fill">False</property>
+            <property name="tab-fill">False</property>
           </packing>
         </child>
         <child>
           <object class="GtkBox" id="vbox2">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">6</property>
+            <property name="can-focus">False</property>
+            <property name="border-width">12</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">12</property>
+            <property name="spacing">20</property>
             <child>
               <object class="GtkFrame" id="frame3">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment5">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="top-padding">6</property>
+                    <property name="left-padding">12</property>
                     <child>
                       <object class="GtkTable" id="table3">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</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>
+                        <property name="can-focus">False</property>
+                        <property name="n-rows">3</property>
+                        <property name="n-columns">2</property>
+                        <property name="column-spacing">6</property>
+                        <property name="row-spacing">6</property>
                         <child>
                           <object class="GtkLabel" id="label112">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="label" translatable="yes">S_ort:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">sort_combobox</property>
+                            <property name="use-underline">True</property>
+                            <property name="mnemonic-widget">sort_combobox</property>
                             <property name="xalign">0</property>
                           </object>
                           <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
+                            <property name="top-attach">2</property>
+                            <property name="bottom-attach">3</property>
+                            <property name="x-options">GTK_FILL</property>
+                            <property name="y-options"/>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkBox" id="hbox62">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkComboBox" id="sort_combobox">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="model">sort_liststore</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext2"/>
@@ -643,13 +542,13 @@
                             <child>
                               <object class="GtkCheckButton" id="reverse_order_checkbutton">
                                 <property name="label" translatable="yes">Re_verse order</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="use-action-appearance">False</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
+                                <property name="can-focus">True</property>
+                                <property name="receives-default">False</property>
+                                <property name="use-underline">True</property>
                                 <property name="xalign">0.5</property>
-                                <property name="draw_indicator">True</property>
+                                <property name="draw-indicator">True</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -659,41 +558,41 @@
                             </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>
+                            <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="GtkLabel" id="label18">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="label" translatable="yes">Columns:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">cols_spinbutton</property>
+                            <property name="use-underline">True</property>
+                            <property name="mnemonic-widget">cols_spinbutton</property>
                             <property name="xalign">0</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">GTK_FILL</property>
+                            <property name="top-attach">1</property>
+                            <property name="bottom-attach">2</property>
+                            <property name="x-options">GTK_FILL</property>
+                            <property name="y-options">GTK_FILL</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkBox" id="hbox1">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkSpinButton" id="cols_spinbutton">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">●</property>
+                                <property name="can-focus">True</property>
+                                <property name="invisible-char">●</property>
                                 <property name="adjustment">cols_adjustment</property>
-                                <property name="climb_rate">1</property>
+                                <property name="climb-rate">1</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -704,13 +603,13 @@
                             <child>
                               <object class="GtkCheckButton" id="adapt_column_checkbutton">
                                 <property name="label" translatable="yes">_Adapt to the window width 
</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="use-action-appearance">False</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
+                                <property name="can-focus">True</property>
+                                <property name="receives-default">False</property>
+                                <property name="use-underline">True</property>
                                 <property name="xalign">0.5</property>
-                                <property name="draw_indicator">True</property>
+                                <property name="draw-indicator">True</property>
                               </object>
                               <packing>
                                 <property name="expand">True</property>
@@ -720,25 +619,25 @@
                             </child>
                           </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>
+                            <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="GtkBox" id="hbox3">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkSpinButton" id="images_per_index_spinbutton">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">●</property>
+                                <property name="can-focus">True</property>
+                                <property name="invisible-char">●</property>
                                 <property name="adjustment">rows_adjustment</property>
-                                <property name="climb_rate">1</property>
+                                <property name="climb-rate">1</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -749,12 +648,12 @@
                             <child>
                               <object class="GtkCheckButton" id="single_index_checkbutton">
                                 <property name="label" translatable="yes">All images on a single 
page</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="use-action-appearance">False</property>
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
+                                <property name="can-focus">True</property>
+                                <property name="receives-default">False</property>
                                 <property name="xalign">0.5</property>
-                                <property name="draw_indicator">True</property>
+                                <property name="draw-indicator">True</property>
                               </object>
                               <packing>
                                 <property name="expand">True</property>
@@ -764,23 +663,23 @@
                             </child>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
+                            <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="label28">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <property name="label" translatable="yes">Images per page:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">images_per_index_spinbutton</property>
+                            <property name="use-underline">True</property>
+                            <property name="mnemonic-widget">images_per_index_spinbutton</property>
                             <property name="xalign">0</property>
                           </object>
                           <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
+                            <property name="x-options">GTK_FILL</property>
+                            <property name="y-options">GTK_FILL</property>
                           </packing>
                         </child>
                       </object>
@@ -790,9 +689,9 @@
                 <child type="label">
                   <object class="GtkLabel" id="label6">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Index Page</property>
-                    <property name="use_markup">True</property>
+                    <property name="use-markup">True</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -808,20 +707,20 @@
             <child>
               <object class="GtkFrame" id="frame4">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</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="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</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="shadow_type">in</property>
+                        <property name="can-focus">True</property>
+                        <property name="shadow-type">in</property>
                         <child>
                           <placeholder/>
                         </child>
@@ -831,18 +730,18 @@
                 </child>
                 <child type="label">
                   <object class="GtkCheckButton" id="thumbnail_caption_checkbutton">
-                    <property name="use_action_appearance">False</property>
+                    <property name="use-action-appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">False</property>
                     <property name="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="draw-indicator">True</property>
                     <child>
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="label" translatable="yes">Thumbnail Caption</property>
-                        <property name="use_markup">True</property>
+                        <property name="use-markup">True</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
                         </attributes>
@@ -865,328 +764,167 @@
         <child type="tab">
           <object class="GtkLabel" id="label5">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can-focus">False</property>
             <property name="label" translatable="yes">Index Page</property>
           </object>
           <packing>
             <property name="position">1</property>
-            <property name="tab_fill">False</property>
+            <property name="tab-fill">False</property>
           </packing>
         </child>
         <child>
           <object class="GtkBox" id="vbox3">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">6</property>
+            <property name="can-focus">False</property>
+            <property name="border-width">12</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">12</property>
+            <property name="spacing">20</property>
             <child>
               <object class="GtkFrame" id="frame2">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment4">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="top-padding">6</property>
+                    <property name="left-padding">12</property>
                     <child>
                       <object class="GtkBox" id="vbox4">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkTable" id="table1">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <property name="column_spacing">6</property>
-                            <property name="row_spacing">6</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="can-focus">False</property>
+                            <property name="n-rows">2</property>
+                            <property name="n-columns">2</property>
+                            <property name="column-spacing">6</property>
+                            <property name="row-spacing">6</property>
                             <child>
                               <object class="GtkLabel" id="label19">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="label" translatable="yes">_Footer:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">image_page_footer_entry</property>
+                                <property name="use-underline">True</property>
                                 <property name="xalign">0</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 name="top-attach">1</property>
+                                <property name="bottom-attach">2</property>
+                                <property name="x-options">GTK_FILL</property>
+                                <property name="y-options"/>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkEntry" id="image_page_footer_entry">
+                              <object class="GtkLabel" id="label29">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">●</property>
-                                <property name="activates_default">True</property>
-                                <property name="secondary_icon_name">help-browser-symbolic</property>
-                                <property name="secondary_icon_tooltip_text">Help</property>
+                                <property name="can-focus">False</property>
+                                <property name="label" translatable="yes">_Header:</property>
+                                <property name="use-underline">True</property>
+                                <property name="xalign">0</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>
+                                <property name="x-options">GTK_FILL</property>
+                                <property name="y-options"/>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkTable" id="image_footer_help_table">
-                                <property name="can_focus">False</property>
-                                <property name="n_rows">6</property>
-                                <property name="n_columns">2</property>
-                                <property name="column_spacing">12</property>
-                                <property name="row_spacing">6</property>
-                                <child>
-                                  <object class="GtkLabel" id="label20">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label">%i</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <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="label21">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label">%I</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label22">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">The current image 
number</property>
-                                    <property name="xalign">0</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>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label23">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">The total number of 
images</property>
-                                    <property name="xalign">0</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>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label24">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Special code</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="weight" value="bold"/>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label25">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Description</property>
-                                    <property name="xalign">0</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>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label26">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes" comments="translate only the 
text in the curly brackets">%D{ format }</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
-                                  </object>
-                                  <packing>
-                                    <property name="top_attach">5</property>
-                                    <property name="bottom_attach">6</property>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label27">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">The current date</property>
-                                    <property name="xalign">0</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">5</property>
-                                    <property name="bottom_attach">6</property>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
+                              <object class="GtkBox">
+                                <property name="visible">True</property>
+                                <property name="can-focus">False</property>
                                 <child>
-                                  <object class="GtkLabel" id="label32">
+                                  <object class="GtkEntry" id="image_page_footer_entry">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label">%F</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
+                                    <property name="can-focus">True</property>
+                                    <property name="invisible-char">●</property>
+                                    <property name="activates-default">True</property>
+                                    <property name="secondary-icon-tooltip-markup" 
translatable="yes">Help</property>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">3</property>
-                                    <property name="bottom_attach">4</property>
-                                    <property name="y_options">GTK_FILL</property>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label33">
+                                  <object class="GtkButton" id="edit_image_page_footer_button">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">The original 
filename</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
+                                    <property name="can-focus">True</property>
+                                    <property name="receives-default">True</property>
+                                    <child>
+                                      <object class="GtkImage">
+                                        <property name="visible">True</property>
+                                        <property name="can-focus">False</property>
+                                        <property name="icon-name">document-edit-symbolic</property>
+                                      </object>
+                                    </child>
                                   </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>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
                                   </packing>
                                 </child>
+                                <style>
+                                  <class name="linked"/>
+                                </style>
+                              </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="GtkBox">
+                                <property name="visible">True</property>
+                                <property name="can-focus">False</property>
                                 <child>
-                                  <object class="GtkLabel" id="label35">
+                                  <object class="GtkEntry" id="image_page_header_entry">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">The file comment</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
+                                    <property name="can-focus">True</property>
+                                    <property name="invisible-char">●</property>
+                                    <property name="activates-default">True</property>
+                                    <property name="secondary-icon-tooltip-markup" 
translatable="yes">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>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel" id="label34">
+                                  <object class="GtkButton" id="edit_image_page_header_button">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label">%C</property>
-                                    <property name="xalign">0</property>
-                                    <attributes>
-                                      <attribute name="size" value="8000"/>
-                                    </attributes>
+                                    <property name="can-focus">True</property>
+                                    <property name="receives-default">True</property>
+                                    <child>
+                                      <object class="GtkImage">
+                                        <property name="visible">True</property>
+                                        <property name="can-focus">False</property>
+                                        <property name="icon-name">document-edit-symbolic</property>
+                                      </object>
+                                    </child>
                                   </object>
                                   <packing>
-                                    <property name="top_attach">4</property>
-                                    <property name="bottom_attach">5</property>
-                                    <property name="y_options">GTK_FILL</property>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
                                   </packing>
                                 </child>
+                                <style>
+                                  <class name="linked"/>
+                                </style>
                               </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="GtkLabel" id="label29">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">_Header:</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">image_page_header_entry</property>
-                                <property name="xalign">0</property>
-                              </object>
-                              <packing>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"/>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkEntry" id="image_page_header_entry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="invisible_char">●</property>
-                                <property name="activates_default">True</property>
-                                <property name="secondary_icon_name">help-browser-symbolic</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="y_options">GTK_FILL</property>
+                                <property name="left-attach">1</property>
+                                <property name="right-attach">2</property>
                               </packing>
                             </child>
                           </object>
@@ -1203,9 +941,9 @@
                 <child type="label">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Image Page</property>
-                    <property name="use_markup">True</property>
+                    <property name="use-markup">True</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -1221,30 +959,30 @@
             <child>
               <object class="GtkFrame" id="frame5">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkAlignment" id="alignment7">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="top_padding">6</property>
-                    <property name="left_padding">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="top-padding">6</property>
+                    <property name="left-padding">12</property>
                     <child>
                       <object class="GtkBox" id="vbox6">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkCheckButton" id="image_description_checkbutton">
                             <property name="label" translatable="yes">Show the description, if 
available</property>
-                            <property name="use_action_appearance">False</property>
+                            <property name="use-action-appearance">False</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">False</property>
                             <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
+                            <property name="draw-indicator">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -1254,16 +992,16 @@
                         </child>
                         <child>
                           <object class="GtkCheckButton" id="image_attributes_checkbutton">
-                            <property name="use_action_appearance">False</property>
+                            <property name="use-action-appearance">False</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">False</property>
                             <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
+                            <property name="draw-indicator">True</property>
                             <child>
                               <object class="GtkLabel" id="label12">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
+                                <property name="can-focus">False</property>
                                 <property name="label" translatable="yes">Show the following 
attributes:</property>
                               </object>
                             </child>
@@ -1276,10 +1014,10 @@
                         </child>
                         <child>
                           <object class="GtkScrolledWindow" id="image_caption_scrolledwindow">
-                            <property name="height_request">150</property>
+                            <property name="height-request">150</property>
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="shadow_type">in</property>
+                            <property name="can-focus">True</property>
+                            <property name="shadow-type">in</property>
                             <child>
                               <placeholder/>
                             </child>
@@ -1297,7 +1035,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label31">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes">Image Attributes</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
@@ -1319,12 +1057,12 @@
         <child type="tab">
           <object class="GtkLabel" id="label4">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can-focus">False</property>
             <property name="label" translatable="yes">Image Page</property>
           </object>
           <packing>
             <property name="position">2</property>
-            <property name="tab_fill">False</property>
+            <property name="tab-fill">False</property>
           </packing>
         </child>
       </object>
diff --git a/extensions/webalbums/dlg-web-exporter.c b/extensions/webalbums/dlg-web-exporter.c
index 6cee34f7..04b9154d 100644
--- a/extensions/webalbums/dlg-web-exporter.c
+++ b/extensions/webalbums/dlg-web-exporter.c
@@ -31,6 +31,23 @@
 #define STRING_IS_VOID(x) (((x) == NULL) || (*(x) == 0))
 
 
+static GthTemplateCode Album_Header_Special_Codes[] = {
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Current page number"), 'p', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Total number of pages"), 'P', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Location"), 'L', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_DATE, N_("Current date"), 'D', 1 },
+};
+
+
+static GthTemplateCode Image_Header_Special_Codes[] = {
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Current image number"), 'i', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Total number of images"), 'I', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Original filename"), 'F', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_SIMPLE, N_("Comment"), 'C', 0 },
+       { GTH_TEMPLATE_CODE_TYPE_DATE, N_("Current date"), 'D', 1 },
+};
+
+
 enum {
        THEME_COLUMN_ID,
        THEME_COLUMN_NAME,
@@ -43,13 +60,14 @@ enum {
 };
 
 typedef struct {
-       GthBrowser *browser;
-       GSettings  *settings;
-       GList      *file_list;
-       GtkBuilder *builder;
-       GtkWidget  *dialog;
-       GtkWidget  *thumbnail_caption_chooser;
-       GtkWidget  *image_attributes_chooser;
+       GthBrowser  *browser;
+       GthFileData *location;
+       GSettings   *settings;
+       GList       *file_list;
+       GtkBuilder  *builder;
+       GtkWidget   *dialog;
+       GtkWidget   *thumbnail_caption_chooser;
+       GtkWidget   *image_attributes_chooser;
 } DialogData;
 
 
@@ -60,6 +78,7 @@ destroy_cb (GtkWidget  *widget,
        gth_browser_set_dialog (data->browser, "web_exporter", NULL);
        _g_object_list_unref (data->file_list);
        g_object_unref (data->settings);
+       g_object_unref (data->location);
        g_object_unref (data->builder);
        g_free (data);
 }
@@ -221,24 +240,156 @@ update_sensitivity (DialogData *data)
 }
 
 
-static void
-footer_entry_icon_press_cb (GtkEntry             *entry,
-                           GtkEntryIconPosition  icon_pos,
-                           GdkEvent             *event,
-                           gpointer              user_data)
+static gboolean
+text_preview_cb (TemplateFlags   flags,
+                gunichar        parent_code,
+                gunichar        code,
+                char          **args,
+                GString        *result,
+                gpointer        user_data)
 {
        DialogData *data = user_data;
-       GtkWidget  *help_box;
+       GDateTime  *timestamp;
+       char       *text;
+
+       if (parent_code == 'D') {
+               /* strftime code, return the code itself. */
+               _g_string_append_template_code (result, code, args);
+               return FALSE;
+       }
+
+       if (code != 0)
+               g_string_append (result, "<span foreground=\"#4696f8\">");
+
+       switch (code) {
+       case 'p':
+               g_string_append (result, "1");
+               break;
+
+       case 'P':
+               g_string_append (result, "5");
+               break;
+
+       case 'D':
+               timestamp = g_date_time_new_now_local ();
+               text = g_date_time_format (timestamp,
+                                          (args[0] != NULL) ? args[0] : DEFAULT_STRFTIME_FORMAT);
+               g_string_append (result, text);
+
+               g_free (text);
+               g_date_time_unref (timestamp);
+               break;
+
+       case 'i':
+               g_string_append (result, "1");
+               break;
+
+       case 'I':
+               g_string_append_printf (result, "%d", g_list_length (data->file_list));
+               break;
+
+       case 'F':
+               _g_string_append_markup_escaped (result, "%s", "filename.jpeg");
+               break;
+
+       case 'C':
+               _g_string_append_markup_escaped (result, "%s", _("Comment"));
+               break;
+
+       case 'L':
+               _g_string_append_markup_escaped (result, "%s", g_file_info_get_edit_name 
(data->location->info));
+               break;
+
+       default:
+               break;
+       }
+
+       if (code != 0)
+               g_string_append (result, "</span>");
+
+       return FALSE;
+}
+
+
+static void
+album_header_button_clicked_cb (DialogData *data,
+                               const char *entry_name)
+{
+       GtkWidget *dialog;
+
+       dialog = gth_template_editor_dialog_new (Album_Header_Special_Codes,
+                                                G_N_ELEMENTS (Album_Header_Special_Codes),
+                                                0,
+                                                _("Edit Template"),
+                                                GTK_WINDOW (data->dialog));
+       gth_template_editor_dialog_set_preview_cb (GTH_TEMPLATE_EDITOR_DIALOG (dialog),
+                                                  text_preview_cb,
+                                                  data);
+       gth_template_editor_dialog_set_template (GTH_TEMPLATE_EDITOR_DIALOG (dialog),
+                                                gtk_entry_get_text (GTK_ENTRY (GET_WIDGET (entry_name))));
+       g_signal_connect (dialog,
+                         "response",
+                         G_CALLBACK (gth_template_editor_dialog_default_response),
+                         GET_WIDGET (entry_name));
+       gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+       gtk_window_present (GTK_WINDOW (dialog));
+}
+
+
+static void
+edit_header_button_clicked_cb (GtkButton *button,
+                              gpointer   user_data)
+{
+       album_header_button_clicked_cb ((DialogData *) user_data, "header_entry");
+}
 
-       if ((GTK_WIDGET (entry) == GET_WIDGET ("header_entry")) || (GTK_WIDGET (entry) == GET_WIDGET 
("footer_entry")))
-               help_box = GET_WIDGET ("page_footer_help_table");
-       else
-               help_box = GET_WIDGET ("image_footer_help_table");
 
-       if (gtk_widget_get_visible (help_box))
-               gtk_widget_hide (help_box);
-       else
-               gtk_widget_show (help_box);
+static void
+edit_footer_button_clicked_cb (GtkButton *button,
+                              gpointer   user_data)
+{
+       album_header_button_clicked_cb ((DialogData *) user_data, "footer_entry");
+}
+
+
+static void
+album_image_page_header_button_clicked_cb (DialogData *data,
+                                          const char *entry_name)
+{
+       GtkWidget *dialog;
+
+       dialog = gth_template_editor_dialog_new (Image_Header_Special_Codes,
+                                                G_N_ELEMENTS (Image_Header_Special_Codes),
+                                                0,
+                                                _("Edit Template"),
+                                                GTK_WINDOW (data->dialog));
+       gth_template_editor_dialog_set_preview_cb (GTH_TEMPLATE_EDITOR_DIALOG (dialog),
+                                                  text_preview_cb,
+                                                  data);
+       gth_template_editor_dialog_set_template (GTH_TEMPLATE_EDITOR_DIALOG (dialog),
+                                                gtk_entry_get_text (GTK_ENTRY (GET_WIDGET (entry_name))));
+       g_signal_connect (dialog,
+                         "response",
+                         G_CALLBACK (gth_template_editor_dialog_default_response),
+                         GET_WIDGET (entry_name));
+       gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+       gtk_window_present (GTK_WINDOW (dialog));
+}
+
+
+static void
+edit_image_page_header_button_clicked_cb (GtkButton *button,
+                                         gpointer   user_data)
+{
+       album_image_page_header_button_clicked_cb ((DialogData *) user_data, "image_page_header_entry");
+}
+
+
+static void
+edit_image_page_footer_button_clicked_cb (GtkButton *button,
+                                         gpointer   user_data)
+{
+       album_image_page_header_button_clicked_cb ((DialogData *) user_data, "image_page_footer_entry");
 }
 
 
@@ -371,6 +522,7 @@ dlg_web_exporter (GthBrowser *browser,
 
        data = g_new0 (DialogData, 1);
        data->browser = browser;
+       data->location = gth_file_data_dup (gth_browser_get_location_data (browser));
        data->file_list = _g_object_list_ref (file_list);
        data->builder = _gtk_builder_new_from_file ("web-album-exporter.ui", "webalbums");
        data->settings = g_settings_new (GTHUMB_WEBALBUMS_SCHEMA);
@@ -442,13 +594,18 @@ dlg_web_exporter (GthBrowser *browser,
 
        g_free (default_sort_type);
 
-       gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("header_entry")),
-                           g_file_info_get_edit_name (gth_browser_get_location_data (browser)->info));
+       s_value = g_settings_get_string (data->settings, PREF_WEBALBUMS_HEADER);
+       gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("header_entry")), s_value);
+       g_free (s_value);
 
        s_value = g_settings_get_string (data->settings, PREF_WEBALBUMS_FOOTER);
        gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("footer_entry")), s_value);
        g_free (s_value);
 
+       s_value = g_settings_get_string (data->settings, PREF_WEBALBUMS_IMAGE_PAGE_HEADER);
+       gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("image_page_header_entry")), s_value);
+       g_free (s_value);
+
        s_value = g_settings_get_string (data->settings, PREF_WEBALBUMS_IMAGE_PAGE_FOOTER);
        gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("image_page_footer_entry")), s_value);
        g_free (s_value);
@@ -507,22 +664,6 @@ dlg_web_exporter (GthBrowser *browser,
                                  "clicked",
                                  G_CALLBACK (update_sensitivity),
                                  data);
-       g_signal_connect (GET_WIDGET ("header_entry"),
-                         "icon-press",
-                         G_CALLBACK (footer_entry_icon_press_cb),
-                         data);
-       g_signal_connect (GET_WIDGET ("footer_entry"),
-                         "icon-press",
-                         G_CALLBACK (footer_entry_icon_press_cb),
-                         data);
-       g_signal_connect (GET_WIDGET ("image_page_header_entry"),
-                         "icon-press",
-                         G_CALLBACK (footer_entry_icon_press_cb),
-                         data);
-       g_signal_connect (GET_WIDGET ("image_page_footer_entry"),
-                         "icon-press",
-                         G_CALLBACK (footer_entry_icon_press_cb),
-                         data);
        g_signal_connect_swapped (GET_WIDGET ("single_index_checkbutton"),
                                  "toggled",
                                  G_CALLBACK (update_sensitivity),
@@ -539,6 +680,22 @@ dlg_web_exporter (GthBrowser *browser,
                                  "toggled",
                                  G_CALLBACK (update_sensitivity),
                                  data);
+       g_signal_connect (GET_WIDGET ("edit_header_button"),
+                         "clicked",
+                         G_CALLBACK (edit_header_button_clicked_cb),
+                         data);
+       g_signal_connect (GET_WIDGET ("edit_footer_button"),
+                         "clicked",
+                         G_CALLBACK (edit_footer_button_clicked_cb),
+                         data);
+       g_signal_connect (GET_WIDGET ("edit_image_page_header_button"),
+                         "clicked",
+                         G_CALLBACK (edit_image_page_header_button_clicked_cb),
+                         data);
+       g_signal_connect (GET_WIDGET ("edit_image_page_footer_button"),
+                         "clicked",
+                         G_CALLBACK (edit_image_page_footer_button_clicked_cb),
+                         data);
 
        /* Run dialog. */
 
diff --git a/extensions/webalbums/gth-web-exporter.c b/extensions/webalbums/gth-web-exporter.c
index 96c654c3..c89cd286 100644
--- a/extensions/webalbums/gth-web-exporter.c
+++ b/extensions/webalbums/gth-web-exporter.c
@@ -107,6 +107,7 @@ typedef struct {
 struct _GthWebExporterPrivate {
        GthBrowser        *browser;
        GList             *gfile_list;             /* GFile list */
+       GthFileData       *location;
 
        /* options */
 
@@ -159,6 +160,7 @@ struct _GthWebExporterPrivate {
        LoopInfo          *loop_info;
        GError            *error;
        gboolean           interrupted;
+       GDateTime         *timestamp;
 };
 
 
@@ -986,73 +988,74 @@ get_current_language (void)
 }
 
 
+/* -- get_header_footer_text -- */
+
+
 static gboolean
-header_footer_eval_cb (const GMatchInfo *match_info,
-                      GString          *result,
-                      gpointer          user_data)
+header_footer_eval_cb (TemplateFlags   flags,
+                      gunichar        parent_code,
+                      gunichar        code,
+                      char          **args,
+                      GString        *result,
+                      gpointer        user_data)
 {
        GthWebExporter *self = user_data;
-       char           *r = NULL;
-       char           *match;
+       GList          *link;
+       char           *text = NULL;
 
-       match = g_match_info_fetch (match_info, 0);
-       if (strcmp (match, "%p") == 0) {
-               r = g_strdup_printf ("%d", self->priv->page + 1);
-       }
-       else if (strcmp (match, "%P") == 0) {
-               r = g_strdup_printf ("%d", self->priv->n_pages);
-       }
-       else if (strcmp (match, "%i") == 0) {
-               r = g_strdup_printf ("%d", self->priv->image + 1);
-       }
-       else if (strcmp (match, "%I") == 0) {
-               r = g_strdup_printf ("%d", self->priv->n_images);
+       if (parent_code == 'D') {
+               /* strftime code, return the code itself. */
+               _g_string_append_template_code (result, code, args);
+               return FALSE;
        }
-       else if (strncmp (match, "%D", 2) == 0) {
-               GTimeVal   timeval;
-               GRegex    *re;
-               char     **a;
-               char      *format = NULL;
 
-               g_get_current_time (&timeval);
+       switch (code) {
+       case 'p':
+               g_string_append_printf (result, "%d", self->priv->page + 1);
+               break;
 
-               /* Get the date format */
+       case 'P':
+               g_string_append_printf (result, "%d", self->priv->n_pages);
+               break;
 
-               re = g_regex_new ("%[A-Z]\\{([^}]+)\\}", 0, 0, NULL);
-               a = g_regex_split (re, match, 0);
-               if (g_strv_length (a) >= 2)
-                       format = g_strstrip (a[1]);
-               else
-                       format = DEFAULT_DATE_FORMAT;
-               r = _g_time_val_strftime (&timeval, format);
+       case 'i':
+               g_string_append_printf (result, "%d", self->priv->image + 1);
+               break;
 
-               g_strfreev (a);
-               g_regex_unref (re);
-       }
-       else if (strcmp (match, "%F") == 0) {
-               GList *link;
+       case 'I':
+               g_string_append_printf (result, "%d", self->priv->n_images);
+               break;
 
+       case 'D':
+               text = g_date_time_format (self->priv->timestamp,
+                                          (args[0] != NULL) ? args[0] : DEFAULT_STRFTIME_FORMAT);
+               break;
+
+       case 'F':
                link = g_list_nth (self->priv->file_list, self->priv->image);
                if (link != NULL) {
                        ImageData *idata = link->data;
-                       r = g_strdup (g_file_info_get_display_name (idata->file_data->info));
+                       text = g_strdup (g_file_info_get_display_name (idata->file_data->info));
                }
-       }
-       else if (strcmp (match, "%C") == 0) {
-               GList *link;
+               break;
 
+       case 'C':
                link = g_list_nth (self->priv->file_list, self->priv->image);
                if (link != NULL) {
                        ImageData *idata = link->data;
-                       r = gth_file_data_get_attribute_as_string (idata->file_data, "general::description");
+                       text = gth_file_data_get_attribute_as_string (idata->file_data, 
"general::description");
                }
-       }
+               break;
 
-       if (r != NULL)
-               g_string_append (result, r);
+       case 'L':
+               g_string_append (result, g_file_info_get_edit_name (self->priv->location->info));
+               break;
+       }
 
-       g_free (r);
-       g_free (match);
+       if (text != NULL) {
+               g_string_append (result, text);
+               g_free (text);
+       }
 
        return FALSE;
 }
@@ -1062,20 +1065,10 @@ static char *
 get_header_footer_text (GthWebExporter *self,
                        const char     *utf8_text)
 {
-       GRegex *re;
-       char   *new_text;
-
-       if (utf8_text == NULL)
-               return NULL;
-
-       if (g_utf8_strchr (utf8_text,  -1, '%') == NULL)
-               return g_strdup (utf8_text);
-
-       re = g_regex_new ("%[pPiIDFC](\\{[^}]+\\})?", 0, 0, NULL);
-       new_text = g_regex_replace_eval (re, utf8_text, -1, 0, 0, header_footer_eval_cb, self, NULL);
-       g_regex_unref (re);
-
-       return new_text;
+       return _g_template_eval (utf8_text,
+                                0,
+                                header_footer_eval_cb,
+                                self);
 }
 
 
@@ -2949,6 +2942,10 @@ gth_web_exporter_exec (GthTask *task)
                return;
        }
 
+       if (self->priv->timestamp != NULL)
+               g_date_time_unref (self->priv->timestamp);
+       self->priv->timestamp = g_date_time_new_now_local ();
+
        /*
         * check that the style directory is not NULL.  A NULL indicates that
         * the folder of the selected style has been deleted or renamed
@@ -3124,6 +3121,9 @@ gth_web_exporter_finalize (GObject *object)
                g_list_free (self->priv->file_list);
        }
        _g_object_list_unref (self->priv->gfile_list);
+       if (self->priv->timestamp != NULL)
+               g_date_time_unref (self->priv->timestamp);
+       _g_object_unref (self->priv->location);
 
        G_OBJECT_CLASS (gth_web_exporter_parent_class)->finalize (object);
 }
@@ -3185,6 +3185,8 @@ gth_web_exporter_init (GthWebExporter *self)
        self->priv->interrupted = FALSE;
        self->priv->iloader = gth_image_loader_new (NULL, NULL);
        self->priv->error = NULL;
+       self->priv->timestamp = NULL;
+       self->priv->location = NULL;
 }
 
 
@@ -3198,6 +3200,7 @@ gth_web_exporter_new (GthBrowser *browser,
 
        self = (GthWebExporter *) g_object_new (GTH_TYPE_WEB_EXPORTER, NULL);
        self->priv->browser = browser;
+       self->priv->location = gth_file_data_dup (gth_browser_get_location_data (browser));
        self->priv->gfile_list = _g_object_list_ref (file_list);
 
        return (GthTask *) self;


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