gthumb r2374 - in trunk: . doc src



Author: mjc
Date: Fri Aug  1 18:56:13 2008
New Revision: 2374
URL: http://svn.gnome.org/viewvc/gthumb?rev=2374&view=rev

Log:
2008-08-01  Michael J. Chudobiak  <mjc svn gnome org>

        * doc/theme-xml.txt:
        * src/catalog-web-exporter.c: (gth_parsed_doc_print):
        Add thumbnail and preview attributes to file_name and file_path tags
        in web album exporter. Patch by Christophe Bisiere. Bug #545750.



Modified:
   trunk/ChangeLog
   trunk/doc/theme-xml.txt
   trunk/src/catalog-web-exporter.c

Modified: trunk/doc/theme-xml.txt
==============================================================================
--- trunk/doc/theme-xml.txt	(original)
+++ trunk/doc/theme-xml.txt	Fri Aug  1 18:56:13 2008
@@ -118,6 +118,10 @@
 				    filename of the previous image will be 
 				    displayed.
 
+  thumbnail="0/1"                   Display the image thumbnail filename
+  
+  preview="0/1"                     Display the image preview filename
+  
   with_path="0/1"                   Display the full image path instead of the 
 				    filename only.
 				    For example '/home/joe/images/foo.jpg'
@@ -147,6 +151,8 @@
 <gthumb:file_path/>
   idx="EXPR"
   idx_relative="EXPR"
+  thumbnail="0/1"                   Display the image thumbnail file path
+  preview="0/1"                     Display the image preview file path
   relative_path="0/1"
   visibility="index/image/always"
   utf8="0/1"

Modified: trunk/src/catalog-web-exporter.c
==============================================================================
--- trunk/src/catalog-web-exporter.c	(original)
+++ trunk/src/catalog-web-exporter.c	Fri Aug  1 18:56:13 2008
@@ -1550,15 +1550,23 @@
 			idata = g_list_nth (ce->file_list, idx)->data;
 			ce->eval_image = idata;
 
+			if (gth_tag_get_var (ce, tag, "thumbnail") != 0) {
+				uri = get_thumbnail_uri (ce, idata, ce->base_dir);
+			} 
+			else if (gth_tag_get_var (ce, tag, "preview") != 0) {
+				uri = get_preview_uri (ce, idata, ce->base_dir);
+			} 
+			else {
+				uri = get_image_uri (ce, idata, ce->base_dir);
+			}
+			
 			if (gth_tag_get_var (ce, tag, "with_path") != 0) {
-				line = get_image_uri (ce, idata, ce->base_dir);
+				line = uri;
 			} else if (gth_tag_get_var (ce, tag, "with_relative_path") != 0) {
-				uri = get_image_uri (ce, idata, ce->base_dir);
 				line = get_path_relative_to_uri (uri, relative_to);
 				g_free (uri);
 
 			} else {
-				uri = get_image_uri (ce, idata, ce->base_dir);
 				line = g_strdup (file_name_from_path (uri));
 				g_free (uri);
 			}
@@ -1579,7 +1587,16 @@
 			idata = g_list_nth (ce->file_list, idx)->data;
 			ce->eval_image = idata;
 
-			uri = get_image_uri (ce, idata, ce->base_dir);
+			if (gth_tag_get_var (ce, tag, "thumbnail") != 0) {
+				uri = get_thumbnail_uri (ce, idata, ce->base_dir);
+			} 
+			else if (gth_tag_get_var (ce, tag, "preview") != 0) {
+				uri = get_preview_uri (ce, idata, ce->base_dir);
+			} 
+			else {
+				uri = get_image_uri (ce, idata, ce->base_dir);
+			}
+
 			if (gth_tag_get_var (ce, tag, "relative_path") != 0) {
 				char *tmp;
 				tmp = get_path_relative_to_uri (uri, relative_to);



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