gthumb r2204 - in trunk: . libgthumb src



Author: mjc
Date: Sun Jan 20 21:26:34 2008
New Revision: 2204
URL: http://svn.gnome.org/viewvc/gthumb?rev=2204&view=rev

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

        * libgthumb/gth-exif-utils.c:
        * src/catalog-web-exporter.c: (comp_func_exif_date),
        (gth_parsed_doc_print), (image_loader_done):
        * src/gth-browser.c: (window_update_statusbar_image_info):
        * src/gth-viewer.c: (viewer_update_statusbar_image_info):
        Modify some functions to fetch exif_time from existing
        FileData->metadata list, rather than reading the file again.
        More work to be done.



Modified:
   trunk/ChangeLog
   trunk/libgthumb/gth-exif-utils.c
   trunk/src/catalog-web-exporter.c
   trunk/src/gth-browser.c
   trunk/src/gth-viewer.c

Modified: trunk/libgthumb/gth-exif-utils.c
==============================================================================
--- trunk/libgthumb/gth-exif-utils.c	(original)
+++ trunk/libgthumb/gth-exif-utils.c	Sun Jan 20 21:26:34 2008
@@ -190,6 +190,7 @@
 	return strcmp (a->display_name, b);
 }
 
+
 time_t
 get_metadata_time (const char *mime_type, 
 		   const char *uri,

Modified: trunk/src/catalog-web-exporter.c
==============================================================================
--- trunk/src/catalog-web-exporter.c	(original)
+++ trunk/src/catalog-web-exporter.c	Sun Jan 20 21:26:34 2008
@@ -101,9 +101,6 @@
 	char             *place;
 	char             *date_time;
 	char             *dest_filename;
-	/*GnomeVFSFileSize  file_size;
-	time_t            file_time;*/
-	time_t		  exif_time;
 	GdkPixbuf        *image;
 	int               image_width, image_height;
 	GdkPixbuf        *thumb;
@@ -729,7 +726,7 @@
 	data_a = IMAGE_DATA (a);
 	data_b = IMAGE_DATA (b);
 
-	return gth_sort_by_filetime_then_name (data_a->exif_time, data_b->exif_time,
+	return gth_sort_by_filetime_then_name (data_a->src_file->exif_time, data_b->src_file->exif_time,
 					       data_a->src_file->path, data_b->src_file->path);
 }
 
@@ -1806,7 +1803,7 @@
 				struct tm *tp;
 				char s[100];
 
-				t = get_metadata_time (NULL, idata->src_file->path, NULL);
+				t = get_metadata_time (NULL, NULL, idata->src_file->metadata);
 				if (t != 0) {
 					tp = localtime (&t);
 					strftime (s, 99, DATE_FORMAT, tp);
@@ -2676,10 +2673,6 @@
 	idata->thumb_width = gdk_pixbuf_get_width (idata->thumb);
 	idata->thumb_height = gdk_pixbuf_get_height (idata->thumb);
 
-	/**/
-
-	idata->exif_time = get_metadata_time (idata->src_file->mime_type, idata->src_file->path, NULL);
-
 	/* save the image */
 
 	if (! ce->copy_images)

Modified: trunk/src/gth-browser.c
==============================================================================
--- trunk/src/gth-browser.c	(original)
+++ trunk/src/gth-browser.c	Sun Jan 20 21:26:34 2008
@@ -476,7 +476,7 @@
 		height = 0;
 	}
 
-	timer = get_metadata_time (NULL, priv->image->path, NULL);
+	timer = get_metadata_time (NULL, NULL, priv->image->metadata);
 	if (timer == 0)
 		timer = priv->image->mtime;
 	tm = localtime (&timer);

Modified: trunk/src/gth-viewer.c
==============================================================================
--- trunk/src/gth-viewer.c	(original)
+++ trunk/src/gth-viewer.c	Sun Jan 20 21:26:34 2008
@@ -606,7 +606,7 @@
 		height = 0;
 	}
 
-	timer = get_metadata_time (NULL, priv->image->path, NULL);
+	timer = get_metadata_time (NULL, NULL, priv->image->metadata);
 	if (timer == 0)
 		timer = priv->image->mtime;
 	tm = localtime (&timer);



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