[gthumb] added ability to create an image-wall



commit 2dbee04eefeae71eb9c4db5c73414763b5842a7b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Jan 1 19:47:51 2011 +0100

    added ability to create an image-wall
    
    the image-wall is a special theme for the contact sheet, where
    there is no header, footer and caption and no space between
    images.

 extensions/contact_sheet/Makefile.am               |    2 +
 extensions/contact_sheet/actions.c                 |   23 +
 extensions/contact_sheet/actions.h                 |    1 +
 extensions/contact_sheet/callbacks.c               |   15 +-
 .../data/gthumb_contact_sheet.schemas.in           |  185 +++++-
 extensions/contact_sheet/data/ui/Makefile.am       |    5 +-
 .../data/ui/contact-sheet-theme-properties.ui      |   38 +-
 .../{contact-sheet-creator.ui => contact-sheet.ui} |    0
 extensions/contact_sheet/data/ui/image-wall.ui     |  591 ++++++++++++++++++++
 extensions/contact_sheet/dlg-contact-sheet.c       |    2 +-
 extensions/contact_sheet/dlg-image-wall.c          |  363 ++++++++++++
 extensions/contact_sheet/dlg-image-wall.h          |   30 +
 .../contact_sheet/gth-contact-sheet-creator.c      |   71 +---
 extensions/contact_sheet/gth-contact-sheet-theme.c |    2 -
 extensions/contact_sheet/preferences.h             |   10 +
 gthumb/cairo-utils.c                               |    4 +-
 16 files changed, 1217 insertions(+), 125 deletions(-)
---
diff --git a/extensions/contact_sheet/Makefile.am b/extensions/contact_sheet/Makefile.am
index 0b808d9..68908d5 100644
--- a/extensions/contact_sheet/Makefile.am
+++ b/extensions/contact_sheet/Makefile.am
@@ -11,6 +11,7 @@ HEADER_FILES = 					\
 	actions.h				\
 	callbacks.h				\
 	dlg-contact-sheet.h			\
+	dlg-image-wall.h			\
 	gth-contact-sheet-creator.h		\
 	gth-contact-sheet-theme.h		\
 	gth-contact-sheet-theme-dialog.h	\
@@ -44,6 +45,7 @@ libcontact_sheet_la_SOURCES = 			\
 	actions.c				\
 	callbacks.c				\
 	dlg-contact-sheet.c			\
+	dlg-image-wall.c			\
 	gth-contact-sheet-creator.c		\
 	gth-contact-sheet-theme.c		\
 	gth-contact-sheet-theme-dialog.c	\
diff --git a/extensions/contact_sheet/actions.c b/extensions/contact_sheet/actions.c
index 213c511..63d9a03 100644
--- a/extensions/contact_sheet/actions.c
+++ b/extensions/contact_sheet/actions.c
@@ -24,6 +24,7 @@
 #include <glib/gi18n.h>
 #include <gthumb.h>
 #include "dlg-contact-sheet.h"
+#include "dlg-image-wall.h"
 
 
 void
@@ -46,3 +47,25 @@ gth_browser_activate_action_create_contact_sheet (GtkAction  *action,
 	_g_object_list_unref (file_data_list);
 	_gtk_tree_path_list_free (items);
 }
+
+
+void
+gth_browser_activate_action_create_image_wall (GtkAction  *action,
+					       GthBrowser *browser)
+{
+	GList *items;
+	GList *file_data_list;
+	GList *file_list;
+
+	items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
+	file_data_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
+	if (file_data_list == NULL)
+		file_data_list = gth_file_store_get_visibles (gth_browser_get_file_store (browser));
+	file_list = gth_file_data_list_to_file_list (file_data_list);
+
+	dlg_image_wall (browser, file_list);
+
+	_g_object_list_unref (file_list);
+	_g_object_list_unref (file_data_list);
+	_gtk_tree_path_list_free (items);
+}
diff --git a/extensions/contact_sheet/actions.h b/extensions/contact_sheet/actions.h
index 240731f..f36c0f6 100644
--- a/extensions/contact_sheet/actions.h
+++ b/extensions/contact_sheet/actions.h
@@ -27,5 +27,6 @@
 #define DEFINE_ACTION(x) void x (GtkAction *action, gpointer data);
 
 DEFINE_ACTION(gth_browser_activate_action_create_contact_sheet)
+DEFINE_ACTION(gth_browser_activate_action_create_image_wall)
 
 #endif /* ACTIONS_H */
diff --git a/extensions/contact_sheet/callbacks.c b/extensions/contact_sheet/callbacks.c
index 6f3d325..079a983 100644
--- a/extensions/contact_sheet/callbacks.c
+++ b/extensions/contact_sheet/callbacks.c
@@ -36,24 +36,35 @@ static const char *ui_info =
 "    <menu name='File' action='FileMenu'>"
 "      <menu name='Export' action='ExportMenu'>"
 "        <placeholder name='Misc_Actions'>"
-"          <menuitem action='Tool_CreateContactSheet'/>"
+"          <menu name='ContactSheet' action='ContactSheetMenu'>"
+"            <menuitem action='Tool_CreateContactSheet'/>"
+"            <menuitem action='Tool_CreateImageWall'/>"
+"          </menu>"
 "        </placeholder>"
 "      </menu>"
 "    </menu>"
 "  </menubar>"
 "  <popup name='ExportPopup'>"
 "    <placeholder name='Misc_Actions'>"
-"      <menuitem action='Tool_CreateContactSheet'/>"
+"      <menu name='ContactSheet' action='ContactSheetMenu'>"
+"        <menuitem action='Tool_CreateContactSheet'/>"
+"        <menuitem action='Tool_CreateImageWall'/>"
+"      </menu>"
 "    </placeholder>"
 "  </popup>"
 "</ui>";
 
 
 static GtkActionEntry action_entries[] = {
+	{ "ContactSheetMenu", NULL, N_("Contact _Sheet") },
 	{ "Tool_CreateContactSheet", "contact-sheet",
 	  N_("Contact _Sheet..."), NULL,
 	  N_("Create a contact sheet"),
 	  G_CALLBACK (gth_browser_activate_action_create_contact_sheet) },
+	{ "Tool_CreateImageWall", "image-wall",
+	  N_("Image _Wall..."), NULL,
+	  N_("Create an image-wall"),
+	  G_CALLBACK (gth_browser_activate_action_create_image_wall) },
 };
 
 
diff --git a/extensions/contact_sheet/data/gthumb_contact_sheet.schemas.in b/extensions/contact_sheet/data/gthumb_contact_sheet.schemas.in
index b01df49..ebe3d72 100644
--- a/extensions/contact_sheet/data/gthumb_contact_sheet.schemas.in
+++ b/extensions/contact_sheet/data/gthumb_contact_sheet.schemas.in
@@ -1,9 +1,11 @@
 <gconfschemafile>
     <schemalist>
 
+      <!-- contact sheet -->
+
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/header</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/header</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/header</key>
+	<applyto>/apps/gthumb/ext/image_wall/header</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default></default>
@@ -15,8 +17,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/footer</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/footer</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/footer</key>
+	<applyto>/apps/gthumb/ext/image_wall/footer</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default></default>
@@ -28,8 +30,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/destination</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/destination</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/destination</key>
+	<applyto>/apps/gthumb/ext/image_wall/destination</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default></default>
@@ -41,8 +43,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/template</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/template</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/template</key>
+	<applyto>/apps/gthumb/ext/image_wall/template</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default>###</default>
@@ -54,8 +56,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/mime_type</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/mime_type</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/mime_type</key>
+	<applyto>/apps/gthumb/ext/image_wall/mime_type</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default>image/jpeg</default>
@@ -67,8 +69,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/html_image_map</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/html_image_map</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/html_image_map</key>
+	<applyto>/apps/gthumb/ext/image_wall/html_image_map</applyto>
 	<owner>gthumb</owner>
 	<type>bool</type>
 	<default>false</default>
@@ -80,8 +82,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/theme</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/theme</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/theme</key>
+	<applyto>/apps/gthumb/ext/image_wall/theme</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default>default.cst</default>
@@ -93,8 +95,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/images_per_page</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/images_per_page</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/images_per_page</key>
+	<applyto>/apps/gthumb/ext/image_wall/images_per_page</applyto>
 	<owner>gthumb</owner>
 	<type>int</type>
 	<default>25</default>
@@ -106,8 +108,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/single_page</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/single_page</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/single_page</key>
+	<applyto>/apps/gthumb/ext/image_wall/single_page</applyto>
 	<owner>gthumb</owner>
 	<type>bool</type>
 	<default>false</default>
@@ -119,8 +121,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/columns</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/columns</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/columns</key>
+	<applyto>/apps/gthumb/ext/image_wall/columns</applyto>
 	<owner>gthumb</owner>
 	<type>int</type>
 	<default>5</default>
@@ -132,8 +134,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/sort_type</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/sort_type</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/sort_type</key>
+	<applyto>/apps/gthumb/ext/image_wall/sort_type</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default>general::unsorted</default>
@@ -145,8 +147,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/sort_inverse</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/sort_inverse</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/sort_inverse</key>
+	<applyto>/apps/gthumb/ext/image_wall/sort_inverse</applyto>
 	<owner>gthumb</owner>
 	<type>bool</type>
 	<default>false</default>
@@ -158,8 +160,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/same_size</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/same_size</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/same_size</key>
+	<applyto>/apps/gthumb/ext/image_wall/same_size</applyto>
 	<owner>gthumb</owner>
 	<type>bool</type>
 	<default>true</default>
@@ -171,8 +173,8 @@
       </schema>
       
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/thumbnail_size</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/thumbnail_size</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/thumbnail_size</key>
+	<applyto>/apps/gthumb/ext/image_wall/thumbnail_size</applyto>
 	<owner>gthumb</owner>
 	<type>int</type>
 	<default>128</default>
@@ -184,8 +186,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/squared_thumbnail</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/squared_thumbnail</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/squared_thumbnail</key>
+	<applyto>/apps/gthumb/ext/image_wall/squared_thumbnail</applyto>
 	<owner>gthumb</owner>
 	<type>bool</type>
 	<default>false</default>
@@ -197,8 +199,8 @@
       </schema>
 
       <schema>
-	<key>/schemas/apps/gthumb/ext/contact_sheet/thumbnail_caption</key>
-	<applyto>/apps/gthumb/ext/contact_sheet/thumbnail_caption</applyto>
+	<key>/schemas/apps/gthumb/ext/image_wall/thumbnail_caption</key>
+	<applyto>/apps/gthumb/ext/image_wall/thumbnail_caption</applyto>
 	<owner>gthumb</owner>
 	<type>string</type>
 	<default></default>
@@ -209,5 +211,124 @@
 	</locale>
       </schema>      
 
+      <!-- image wall -->
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/destination</key>
+	<applyto>/apps/gthumb/ext/image_wall/destination</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default></default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+      
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/template</key>
+	<applyto>/apps/gthumb/ext/image_wall/template</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>###</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/mime_type</key>
+	<applyto>/apps/gthumb/ext/image_wall/mime_type</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>image/jpeg</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+     
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/images_per_page</key>
+	<applyto>/apps/gthumb/ext/image_wall/images_per_page</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>25</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+      
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/single_page</key>
+	<applyto>/apps/gthumb/ext/image_wall/single_page</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>false</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+      
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/columns</key>
+	<applyto>/apps/gthumb/ext/image_wall/columns</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>5</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+      
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/sort_type</key>
+	<applyto>/apps/gthumb/ext/image_wall/sort_type</applyto>
+	<owner>gthumb</owner>
+	<type>string</type>
+	<default>general::unsorted</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/sort_inverse</key>
+	<applyto>/apps/gthumb/ext/image_wall/sort_inverse</applyto>
+	<owner>gthumb</owner>
+	<type>bool</type>
+	<default>false</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+      
+      <schema>
+	<key>/schemas/apps/gthumb/ext/image_wall/thumbnail_size</key>
+	<applyto>/apps/gthumb/ext/image_wall/thumbnail_size</applyto>
+	<owner>gthumb</owner>
+	<type>int</type>
+	<default>128</default>
+	<locale name="C">
+	  <short></short>
+	  <long>
+	  </long>
+	</locale>
+      </schema>
+
     </schemalist>
 </gconfschemafile>
diff --git a/extensions/contact_sheet/data/ui/Makefile.am b/extensions/contact_sheet/data/ui/Makefile.am
index 1749261..3fab9b2 100644
--- a/extensions/contact_sheet/data/ui/Makefile.am
+++ b/extensions/contact_sheet/data/ui/Makefile.am
@@ -1,5 +1,8 @@
 uidir = $(pkgdatadir)/ui
-ui_DATA = contact-sheet-creator.ui contact-sheet-theme-properties.ui
+ui_DATA = 					\
+	contact-sheet.ui			\
+	contact-sheet-theme-properties.ui	\
+	image-wall.ui	
 EXTRA_DIST = $(ui_DATA)
 
 -include $(top_srcdir)/git.mk
diff --git a/extensions/contact_sheet/data/ui/contact-sheet-theme-properties.ui b/extensions/contact_sheet/data/ui/contact-sheet-theme-properties.ui
index d06a15f..1213749 100644
--- a/extensions/contact_sheet/data/ui/contact-sheet-theme-properties.ui
+++ b/extensions/contact_sheet/data/ui/contact-sheet-theme-properties.ui
@@ -392,7 +392,6 @@
                             <property name="label" translatable="yes">C_olor:</property>
                             <property name="use_underline">True</property>
                             <property name="justify">center</property>
-                            <property name="mnemonic_widget">frame_colorpicker</property>
                           </object>
                           <packing>
                             <property name="top_attach">1</property>
@@ -402,37 +401,44 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkColorButton" id="frame_colorpicker">
+                          <object class="GtkComboBox" id="frame_style_combobox">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="title" translatable="yes">Select a color</property>
-                            <property name="color">#000000000000</property>
+                            <property name="model">frame_style_liststore</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </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="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="frame_style_combobox">
+                          <object class="GtkHBox" id="hbox4">
                             <property name="visible">True</property>
-                            <property name="model">frame_style_liststore</property>
                             <child>
-                              <object class="GtkCellRendererText" id="cellrenderertext1"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
+                              <object class="GtkColorButton" id="frame_colorpicker">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="title" translatable="yes">Select a color</property>
+                                <property name="color">#000000000000</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
                             </child>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
                           </packing>
                         </child>
                       </object>
diff --git a/extensions/contact_sheet/data/ui/contact-sheet-creator.ui b/extensions/contact_sheet/data/ui/contact-sheet.ui
similarity index 100%
rename from extensions/contact_sheet/data/ui/contact-sheet-creator.ui
rename to extensions/contact_sheet/data/ui/contact-sheet.ui
diff --git a/extensions/contact_sheet/data/ui/image-wall.ui b/extensions/contact_sheet/data/ui/image-wall.ui
new file mode 100644
index 0000000..1fe873e
--- /dev/null
+++ b/extensions/contact_sheet/data/ui/image-wall.ui
@@ -0,0 +1,591 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkDialog" id="image_wall_dialog">
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Contact Sheet</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</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="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox5">
+                        <property name="visible">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkTable" id="table4">
+                            <property name="visible">True</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">6</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label84">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Destination:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkFileChooserButton" id="destination_filechooserbutton">
+                                <property name="visible">True</property>
+                                <property name="action">select-folder</property>
+                                <property name="local_only">False</property>
+                                <property name="title" translatable="yes">Choose destination folder</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label54">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">File_name:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">template_entry</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox47">
+                                <property name="visible">True</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkEntry" id="template_entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">&#x25CF;</property>
+                                    <property name="activates_default">True</property>
+                                    <property name="text" translatable="yes">###</property>
+                                    <property name="secondary_icon_stock">gtk-help</property>
+                                    <property name="secondary_icon_activatable">True</property>
+                                    <property name="secondary_icon_sensitive">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkComboBox" id="filetype_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="model">filetype_liststore</property>
+                                    <property name="active">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkTable" id="template_help_table">
+                                <property name="n_rows">2</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">12</property>
+                                <property name="row_spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="label32">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">#</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label34">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">New enumerator digit</property>
+                                    <attributes>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label36">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Special code</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label37">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Description</property>
+                                    <attributes>
+                                      <attribute name="weight" value="bold"/>
+                                      <attribute name="size" value="8000"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                              </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>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Saving</property>
+                    <property name="use_markup">True</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table3">
+                        <property name="visible">True</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">3</property>
+                        <property name="column_spacing">6</property>
+                        <property name="row_spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label18">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Columns:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox3">
+                            <property name="visible">True</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">&#x25CF;</property>
+                                <property name="adjustment">cols_adjustment</property>
+                                <property name="climb_rate">1</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox4">
+                            <property name="visible">True</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">&#x25CF;</property>
+                                <property name="adjustment">rows_adjustment</property>
+                                <property name="climb_rate">1</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label28">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</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>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="single_index_checkbutton">
+                            <property name="label" translatable="yes">All images on a single page</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Layout</property>
+                    <property name="use_markup">True</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox4">
+                        <property name="visible">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkTable" id="table1">
+                            <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">6</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label112">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">S_ort:</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox62">
+                                <property name="visible">True</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkComboBox" id="sort_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="model">sort_liststore</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                                      <attributes>
+                                        <attribute name="text">1</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" id="reverse_order_checkbutton">
+                                    <property name="label" translatable="yes">Re_verse order</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </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="size_label">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Size:</property>
+                                <property name="use_underline">True</property>
+                                <property name="justify">center</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkComboBox" id="thumbnail_size_combobox">
+                                    <property name="visible">True</property>
+                                    <property name="model">thumbnail_size_liststore</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="cellrenderertext5"/>
+                                      <attributes>
+                                        <attribute name="text">1</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Thumbnails</property>
+                    <property name="use_markup">True</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label">gtk-save</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-11">help_button</action-widget>
+      <action-widget response="-6">cancel_button</action-widget>
+      <action-widget response="-5">ok_button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="rows_adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="cols_adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkListStore" id="sort_liststore">
+    <columns>
+      <!-- column-name data -->
+      <column type="gpointer"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="thumbnail_size_liststore">
+    <columns>
+      <!-- column-name size -->
+      <column type="gint"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="filetype_liststore">
+    <columns>
+      <!-- column-name default_extension -->
+      <column type="gchararray"/>
+      <!-- column-name mime_type -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+</interface>
diff --git a/extensions/contact_sheet/dlg-contact-sheet.c b/extensions/contact_sheet/dlg-contact-sheet.c
index ee9622f..c661cf1 100644
--- a/extensions/contact_sheet/dlg-contact-sheet.c
+++ b/extensions/contact_sheet/dlg-contact-sheet.c
@@ -688,7 +688,7 @@ dlg_contact_sheet (GthBrowser *browser,
 	data = g_new0 (DialogData, 1);
 	data->browser = browser;
 	data->file_list = _g_object_list_ref (file_list);
-	data->builder = _gtk_builder_new_from_file ("contact-sheet-creator.ui", "contact_sheet");
+	data->builder = _gtk_builder_new_from_file ("contact-sheet.ui", "contact_sheet");
 
 	data->dialog = _gtk_builder_get_widget (data->builder, "contact_sheet_dialog");
 	gth_browser_set_dialog (browser, "contact_sheet", data->dialog);
diff --git a/extensions/contact_sheet/dlg-image-wall.c b/extensions/contact_sheet/dlg-image-wall.c
new file mode 100644
index 0000000..a361171
--- /dev/null
+++ b/extensions/contact_sheet/dlg-image-wall.c
@@ -0,0 +1,363 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  GThumb
+ *
+ *  Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include "dlg-image-wall.h"
+#include "gth-contact-sheet-creator.h"
+#include "preferences.h"
+
+#define GET_WIDGET(name) _gtk_builder_get_widget (data->builder, (name))
+#define STRING_IS_VOID(x) (((x) == NULL) || (*(x) == 0))
+
+
+enum {
+	SORT_TYPE_COLUMN_DATA,
+	SORT_TYPE_COLUMN_NAME
+};
+
+enum {
+	THUMBNAIL_SIZE_TYPE_COLUMN_SIZE,
+	THUMBNAIL_SIZE_TYPE_COLUMN_NAME
+};
+
+enum {
+	FILE_TYPE_COLUMN_DEFAULT_EXTENSION,
+	FILE_TYPE_COLUMN_MIME_TYPE
+};
+
+typedef struct {
+	GthBrowser *browser;
+	GList      *file_list;
+	GtkBuilder *builder;
+	GtkWidget  *dialog;
+} DialogData;
+
+
+static int thumb_size[] = { 64, 112, 128, 164, 200, 256, 312, 512 };
+static int thumb_sizes = sizeof (thumb_size) / sizeof (int);
+
+
+static int
+get_idx_from_size (int size)
+{
+	int i;
+
+	for (i = 0; i < thumb_sizes; i++)
+		if (size == thumb_size[i])
+			return i;
+	return -1;
+}
+
+
+static void
+destroy_cb (GtkWidget  *widget,
+	    DialogData *data)
+{
+	gth_browser_set_dialog (data->browser, "image_wall", NULL);
+	_g_object_list_unref (data->file_list);
+	g_object_unref (data->builder);
+	g_free (data);
+}
+
+
+static void
+help_clicked_cb (GtkWidget  *widget,
+		 DialogData *data)
+{
+	show_help_dialog (GTK_WINDOW (data->dialog), "image-wall");
+}
+
+
+static void
+ok_clicked_cb (GtkWidget  *widget,
+	       DialogData *data)
+{
+	char                 *s_value;
+	GFile                *destination;
+	const char           *template;
+	char                 *mime_type;
+	char                 *file_extension;
+	GthContactSheetTheme *theme;
+	int                   images_per_index;
+	int                   single_page;
+	int                   columns;
+	GthFileDataSort      *sort_type;
+	gboolean              sort_inverse;
+	int                   thumbnail_size;
+	GtkTreeIter           iter;
+	GthTask              *task;
+
+	/* save the options */
+
+	s_value = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (GET_WIDGET ("destination_filechooserbutton")));
+	destination = g_file_new_for_uri (s_value);
+	eel_gconf_set_path (PREF_IMAGE_WALL_DESTINATION, s_value);
+	g_free (s_value);
+
+	template = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("template_entry")));
+	eel_gconf_set_string (PREF_IMAGE_WALL_TEMPLATE, template);
+
+	mime_type = NULL;
+	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("filetype_combobox")), &iter)) {
+		gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("filetype_liststore")),
+				    &iter,
+				    FILE_TYPE_COLUMN_MIME_TYPE, &mime_type,
+				    FILE_TYPE_COLUMN_DEFAULT_EXTENSION, &file_extension,
+				    -1);
+		eel_gconf_set_string (PREF_IMAGE_WALL_MIME_TYPE, mime_type);
+	}
+
+	images_per_index = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("images_per_index_spinbutton")));
+	eel_gconf_set_integer (PREF_IMAGE_WALL_IMAGES_PER_PAGE, images_per_index);
+
+	single_page = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton")));
+	eel_gconf_set_boolean (PREF_IMAGE_WALL_SINGLE_PAGE, single_page);
+
+	columns = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton")));
+	eel_gconf_set_integer (PREF_IMAGE_WALL_COLUMNS, columns);
+
+	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), &iter)) {
+		gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("sort_liststore")),
+				    &iter,
+				    SORT_TYPE_COLUMN_DATA, &sort_type,
+				    -1);
+		eel_gconf_set_string (PREF_IMAGE_WALL_SORT_TYPE, sort_type->name);
+	}
+
+	sort_inverse = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("reverse_order_checkbutton")));
+	eel_gconf_set_boolean (PREF_IMAGE_WALL_SORT_INVERSE, sort_inverse);
+
+	thumbnail_size = thumb_size[gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("thumbnail_size_combobox")))];
+	eel_gconf_set_integer (PREF_IMAGE_WALL_THUMBNAIL_SIZE, thumbnail_size);
+
+	theme = gth_contact_sheet_theme_new ();
+	theme->background_type = GTH_CONTACT_SHEET_BACKGROUND_TYPE_SOLID;
+	gdk_color_parse ("#000", &theme->background_color1);
+	theme->frame_style = GTH_CONTACT_SHEET_FRAME_STYLE_NONE;
+	theme->frame_hpadding = 0;
+	theme->frame_vpadding = 0;
+	theme->frame_border = 0;
+	theme->row_spacing = 0;
+	theme->col_spacing = 0;
+
+	/* exec the task */
+
+	task = gth_contact_sheet_creator_new (data->browser, data->file_list);
+
+	gth_contact_sheet_creator_set_header (GTH_CONTACT_SHEET_CREATOR (task), "");
+	gth_contact_sheet_creator_set_footer (GTH_CONTACT_SHEET_CREATOR (task), "");
+	gth_contact_sheet_creator_set_destination (GTH_CONTACT_SHEET_CREATOR (task), destination);
+	gth_contact_sheet_creator_set_filename_template (GTH_CONTACT_SHEET_CREATOR (task), template);
+	gth_contact_sheet_creator_set_mime_type (GTH_CONTACT_SHEET_CREATOR (task), mime_type, file_extension);
+	gth_contact_sheet_creator_set_write_image_map (GTH_CONTACT_SHEET_CREATOR (task), FALSE);
+	gth_contact_sheet_creator_set_theme (GTH_CONTACT_SHEET_CREATOR (task), theme);
+	gth_contact_sheet_creator_set_images_per_index (GTH_CONTACT_SHEET_CREATOR (task), images_per_index);
+	gth_contact_sheet_creator_set_single_index (GTH_CONTACT_SHEET_CREATOR (task), single_page);
+	gth_contact_sheet_creator_set_columns (GTH_CONTACT_SHEET_CREATOR (task), columns);
+	gth_contact_sheet_creator_set_sort_order (GTH_CONTACT_SHEET_CREATOR (task), sort_type, sort_inverse);
+	gth_contact_sheet_creator_set_same_size (GTH_CONTACT_SHEET_CREATOR (task), FALSE);
+	gth_contact_sheet_creator_set_thumb_size (GTH_CONTACT_SHEET_CREATOR (task), TRUE, thumbnail_size, thumbnail_size);
+	gth_contact_sheet_creator_set_thumbnail_caption (GTH_CONTACT_SHEET_CREATOR (task), "");
+
+	gth_browser_exec_task (data->browser, task, FALSE);
+	gtk_widget_destroy (data->dialog);
+
+	gth_contact_sheet_theme_unref (theme);
+	g_free (file_extension);
+	g_free (mime_type);
+	g_object_unref (destination);
+}
+
+
+static void
+update_sensitivity (DialogData *data)
+{
+	gtk_widget_set_sensitive (GET_WIDGET ("images_per_index_spinbutton"), ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton"))));
+}
+
+
+static void
+entry_help_icon_press_cb (GtkEntry             *entry,
+			  GtkEntryIconPosition  icon_pos,
+			  GdkEvent             *event,
+			  gpointer              user_data)
+{
+	DialogData *data = user_data;
+	GtkWidget  *help_box;
+
+	if (GTK_WIDGET (entry) == GET_WIDGET ("template_entry"))
+		help_box = GET_WIDGET ("template_help_table");
+
+	if (gtk_widget_get_visible (help_box))
+		gtk_widget_hide (help_box);
+	else
+		gtk_widget_show (help_box);
+}
+
+
+void
+dlg_image_wall (GthBrowser *browser,
+		GList      *file_list)
+{
+	DialogData *data;
+	int         i;
+	int         active_index;
+	char       *default_sort_type;
+	GList      *sort_types;
+	GList      *scan;
+	char       *s_value;
+	char       *default_mime_type;
+	GArray     *savers;
+
+	if (gth_browser_get_dialog (browser, "image_wall") != NULL) {
+		gtk_window_present (GTK_WINDOW (gth_browser_get_dialog (browser, "image_wall")));
+		return;
+	}
+
+	data = g_new0 (DialogData, 1);
+	data->browser = browser;
+	data->file_list = _g_object_list_ref (file_list);
+	data->builder = _gtk_builder_new_from_file ("image-wall.ui", "contact_sheet");
+
+	data->dialog = _gtk_builder_get_widget (data->builder, "image_wall_dialog");
+	gth_browser_set_dialog (browser, "image_wall", data->dialog);
+	g_object_set_data (G_OBJECT (data->dialog), "dialog_data", data);
+
+	/* Set widgets data. */
+
+	s_value = eel_gconf_get_path (PREF_IMAGE_WALL_DESTINATION, NULL);
+	if (s_value == NULL) {
+		GFile *location = gth_browser_get_location (data->browser);
+		if (location != NULL)
+			s_value = g_file_get_uri (location);
+		else
+			s_value = g_strdup (get_home_uri ());
+	}
+	gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (GET_WIDGET ("destination_filechooserbutton")), s_value);
+	g_free (s_value);
+
+	s_value = eel_gconf_get_path (PREF_IMAGE_WALL_TEMPLATE, NULL);
+	gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("template_entry")), s_value);
+	g_free (s_value);
+
+	default_mime_type = eel_gconf_get_string (PREF_IMAGE_WALL_MIME_TYPE, "image/jpeg");
+	active_index = 0;
+	savers = gth_main_get_type_set ("pixbuf-saver");
+	for (i = 0; (savers != NULL) && (i < savers->len); i++) {
+		GthPixbufSaver *saver;
+		GtkTreeIter     iter;
+
+		saver = g_object_new (g_array_index (savers, GType, i), NULL);
+
+		if (g_str_equal (default_mime_type, gth_pixbuf_saver_get_mime_type (saver)))
+			active_index = i;
+
+		gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("filetype_liststore")), &iter);
+		gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("filetype_liststore")), &iter,
+				    FILE_TYPE_COLUMN_MIME_TYPE, gth_pixbuf_saver_get_mime_type (saver),
+				    FILE_TYPE_COLUMN_DEFAULT_EXTENSION, gth_pixbuf_saver_get_default_ext (saver),
+				    -1);
+
+		g_object_unref (saver);
+	}
+	g_free (default_mime_type);
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("filetype_combobox")), active_index);
+
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("images_per_index_spinbutton")), eel_gconf_get_integer (PREF_IMAGE_WALL_IMAGES_PER_PAGE, 25));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("single_index_checkbutton")), eel_gconf_get_boolean (PREF_IMAGE_WALL_SINGLE_PAGE, FALSE));
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton")), eel_gconf_get_integer (PREF_IMAGE_WALL_COLUMNS, 5));
+
+	default_sort_type = eel_gconf_get_string (PREF_IMAGE_WALL_SORT_TYPE, "general::unsorted");
+	active_index = 0;
+	sort_types = gth_main_get_all_sort_types ();
+	for (i = 0, scan = sort_types; scan; scan = scan->next, i++) {
+		GthFileDataSort *sort_type = scan->data;
+		GtkTreeIter      iter;
+
+		if (g_str_equal (sort_type->name, default_sort_type))
+			active_index = i;
+
+		gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("sort_liststore")), &iter);
+		gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("sort_liststore")), &iter,
+				    SORT_TYPE_COLUMN_DATA, sort_type,
+				    SORT_TYPE_COLUMN_NAME, _(sort_type->display_name),
+				    -1);
+	}
+	g_list_free (sort_types);
+	g_free (default_sort_type);
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), active_index);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("reverse_order_checkbutton")), eel_gconf_get_boolean (PREF_IMAGE_WALL_SORT_INVERSE, FALSE));
+
+	for (i = 0; i < thumb_sizes; i++) {
+		char        *name;
+		GtkTreeIter  iter;
+
+		name = g_strdup_printf ("%d", thumb_size[i]);
+
+		gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("thumbnail_size_liststore")), &iter);
+		gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("thumbnail_size_liststore")), &iter,
+				    THUMBNAIL_SIZE_TYPE_COLUMN_SIZE, thumb_size[i],
+				    THUMBNAIL_SIZE_TYPE_COLUMN_NAME, name,
+				    -1);
+
+		g_free (name);
+	}
+	gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("thumbnail_size_combobox")), get_idx_from_size (eel_gconf_get_integer (PREF_IMAGE_WALL_THUMBNAIL_SIZE, 128)));
+
+	update_sensitivity (data);
+
+	/* Set the signals handlers. */
+
+	g_signal_connect (G_OBJECT (data->dialog),
+			  "destroy",
+			  G_CALLBACK (destroy_cb),
+			  data);
+	g_signal_connect (GET_WIDGET ("ok_button"),
+			  "clicked",
+			  G_CALLBACK (ok_clicked_cb),
+			  data);
+        g_signal_connect (GET_WIDGET ("help_button"),
+                          "clicked",
+                          G_CALLBACK (help_clicked_cb),
+                          data);
+	g_signal_connect_swapped (GET_WIDGET ("cancel_button"),
+				  "clicked",
+				  G_CALLBACK (gtk_widget_destroy),
+				  data->dialog);
+	g_signal_connect (GET_WIDGET ("template_entry"),
+			  "icon-press",
+			  G_CALLBACK (entry_help_icon_press_cb),
+			  data);
+	g_signal_connect_swapped (GET_WIDGET ("single_index_checkbutton"),
+				  "toggled",
+				  G_CALLBACK (update_sensitivity),
+				  data);
+
+	/* Run dialog. */
+
+	gtk_window_set_transient_for (GTK_WINDOW (data->dialog), GTK_WINDOW (browser));
+	gtk_window_set_modal (GTK_WINDOW (data->dialog), FALSE);
+	gtk_widget_show (data->dialog);
+}
diff --git a/extensions/contact_sheet/dlg-image-wall.h b/extensions/contact_sheet/dlg-image-wall.h
new file mode 100644
index 0000000..95e71cd
--- /dev/null
+++ b/extensions/contact_sheet/dlg-image-wall.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  GThumb
+ *
+ *  Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DLG_CONTACT_SHEET_H
+#define DLG_CONTACT_SHEET_H
+
+#include <gthumb.h>
+
+void  dlg_contact_sheet (GthBrowser *browser,
+			 GList      *file_list); /* GFile list */
+
+#endif /* DLG_CONTACT_SHEET_H */
diff --git a/extensions/contact_sheet/gth-contact-sheet-creator.c b/extensions/contact_sheet/gth-contact-sheet-creator.c
index b008030..969f8fa 100644
--- a/extensions/contact_sheet/gth-contact-sheet-creator.c
+++ b/extensions/contact_sheet/gth-contact-sheet-creator.c
@@ -550,73 +550,6 @@ paint_frame (GthContactSheetCreator *self,
 {
 	gth_contact_sheet_theme_paint_frame (self->priv->theme, self->priv->cr, frame_rect, image_rect);
 
-#if 0
-	switch (self->priv->theme->frame_style) {
-	case GTH_CONTACT_SHEET_FRAME_STYLE_NONE:
-		break;
-
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SLIDE:
-		gthumb_draw_slide_with_colors (self->priv->pixmap,
-					       frame_rect->x,
-					       frame_rect->y,
-					       frame_rect->width,
-					       frame_rect->height,
-					       image_rect->width,
-					       image_rect->height,
-					       &self->priv->theme->frame_color,
-					       &self->priv->black,
-					       &self->priv->dark_gray,
-					       &self->priv->gray,
-					       &self->priv->white);
-		break;
-
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SIMPLE:
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SHADOW:
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SIMPLE_WITH_SHADOW:
-		if (self->priv->theme->frame_style == GTH_FRAME_STYLE_SHADOW)
-			gthumb_draw_image_shadow (self->priv->pixmap,
-						  image_rect->x,
-						  image_rect->y,
-						  image_rect->width,
-						  image_rect->height);
-
-		if (self->priv->theme->frame_style == GTH_FRAME_STYLE_SIMPLE_WITH_SHADOW)
-			gthumb_draw_frame_shadow (self->priv->pixmap,
-						  image_rect->x,
-						  image_rect->y,
-						  image_rect->width,
-						  image_rect->height);
-
-		if ((self->priv->theme->frame_style == GTH_FRAME_STYLE_SIMPLE)
-		    || (self->priv->theme->frame_style == GTH_FRAME_STYLE_SIMPLE_WITH_SHADOW))
-		{
-			gthumb_draw_frame (self->priv->pixmap,
-					   image_rect->x,
-					   image_rect->y,
-					   image_rect->width,
-					   image_rect->height,
-					   &self->priv->theme->frame_color);
-		}
-		break;
-
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SHADOW_IN:
-		gthumb_draw_image_shadow_in (self->priv->pixmap,
-					     image_rect->x,
-					     image_rect->y,
-					     image_rect->width,
-					     image_rect->height);
-		break;
-
-	case GTH_CONTACT_SHEET_FRAME_STYLE_SHADOW_OUT:
-		gthumb_draw_image_shadow_out (self->priv->pixmap,
-					      image_rect->x,
-					      image_rect->y,
-					      image_rect->width,
-					      image_rect->height);
-		break;
-	}
-#endif
-
 	if (self->priv->imagemap_stream != NULL) {
 		char   *file;
 		char   *destination;
@@ -801,8 +734,8 @@ export (GthContactSheetCreator *self)
 				thumbnail_width = gdk_pixbuf_get_width (row_item->thumbnail);
 				thumbnail_height = gdk_pixbuf_get_height (row_item->thumbnail);
 
-				image_rect.x = x + (frame_width - thumbnail_width) / 2 + 1;
-				image_rect.y = y + (frame_height - thumbnail_height) / 2 + 1;
+				image_rect.x = x + (frame_width - thumbnail_width) / 2;
+				image_rect.y = y + (frame_height - thumbnail_height) / 2;
 				image_rect.width = thumbnail_width;
 				image_rect.height = thumbnail_height;
 
diff --git a/extensions/contact_sheet/gth-contact-sheet-theme.c b/extensions/contact_sheet/gth-contact-sheet-theme.c
index b09a5eb..027bc75 100644
--- a/extensions/contact_sheet/gth-contact-sheet-theme.c
+++ b/extensions/contact_sheet/gth-contact-sheet-theme.c
@@ -109,8 +109,6 @@ gth_contact_sheet_theme_new_from_key_file (GKeyFile *key_file)
 	g_free (nick);
 
 	_g_key_file_get_color (key_file, "Frame", "Color", &theme->frame_color, NULL);
-	/*theme->frame_hpadding = g_key_file_get_integer (key_file, "Frame", "HPadding", NULL);*/
-	/*theme->frame_vpadding = g_key_file_get_integer (key_file, "Frame", "VPadding", NULL);*/
 
 	theme->header_font_name = g_key_file_get_string (key_file, "Header", "Font", NULL);
 	_g_key_file_get_color (key_file, "Header", "Color", &theme->header_color, NULL);
diff --git a/extensions/contact_sheet/preferences.h b/extensions/contact_sheet/preferences.h
index 3daf69f..eac704a 100644
--- a/extensions/contact_sheet/preferences.h
+++ b/extensions/contact_sheet/preferences.h
@@ -43,6 +43,16 @@ G_BEGIN_DECLS
 #define PREF_CONTACT_SHEET_SQUARED_THUMBNAIL        "/apps/gthumb/ext/contact_sheet/squared_thumbnail"
 #define PREF_CONTACT_SHEET_THUMBNAIL_CAPTION        "/apps/gthumb/ext/contact_sheet/thumbnail_caption"
 
+#define PREF_IMAGE_WALL_DESTINATION                 "/apps/gthumb/ext/image_wall/destination"
+#define PREF_IMAGE_WALL_TEMPLATE                    "/apps/gthumb/ext/image_wall/template"
+#define PREF_IMAGE_WALL_MIME_TYPE                   "/apps/gthumb/ext/image_wall/mime_type"
+#define PREF_IMAGE_WALL_IMAGES_PER_PAGE             "/apps/gthumb/ext/image_wall/images_per_page"
+#define PREF_IMAGE_WALL_SINGLE_PAGE                 "/apps/gthumb/ext/image_wall/single_page"
+#define PREF_IMAGE_WALL_COLUMNS                     "/apps/gthumb/ext/image_wall/columns"
+#define PREF_IMAGE_WALL_SORT_TYPE                   "/apps/gthumb/ext/image_wall/sort_type"
+#define PREF_IMAGE_WALL_SORT_INVERSE                "/apps/gthumb/ext/image_wall/sort_inverse"
+#define PREF_IMAGE_WALL_THUMBNAIL_SIZE              "/apps/gthumb/ext/image_wall/thumbnail_size"
+
 G_END_DECLS
 
 #endif /* PREFERENCES_H */
diff --git a/gthumb/cairo-utils.c b/gthumb/cairo-utils.c
index 4fea260..b37af37 100644
--- a/gthumb/cairo-utils.c
+++ b/gthumb/cairo-utils.c
@@ -230,8 +230,8 @@ _cairo_draw_slide (cairo_t  *cr,
 	if ((image_width > 0) && (image_height > 0)) {
 		double image_x, image_y;
 
-		image_x = frame_x + (frame_width - image_width) / 2 + 0.5;
-		image_y = frame_y + (frame_height - image_height) / 2 + 0.5;
+		image_x = frame_x + (frame_width - image_width) / 2 - 0.5;
+		image_y = frame_y + (frame_height - image_height) / 2 - 0.5;
 
 		/* inner border. */
 



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