gthumb r2190 - in trunk: . libgthumb src



Author: mjc
Date: Tue Jan 15 19:17:08 2008
New Revision: 2190
URL: http://svn.gnome.org/viewvc/gthumb?rev=2190&view=rev

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

        * libgthumb/gth-exif-utils.c: (sort_by_tag_name),
        (update_metadata):
        * libgthumb/gth-exif-utils.h:
        * src/gth-exif-data-viewer.c:
        Move update_metadata to a library file, to allow broader use.



Modified:
   trunk/ChangeLog
   trunk/libgthumb/gth-exif-utils.c
   trunk/libgthumb/gth-exif-utils.h
   trunk/src/gth-exif-data-viewer.c

Modified: trunk/libgthumb/gth-exif-utils.c
==============================================================================
--- trunk/libgthumb/gth-exif-utils.c	(original)
+++ trunk/libgthumb/gth-exif-utils.c	Tue Jan 15 19:17:08 2008
@@ -31,6 +31,7 @@
 #include "file-utils.h"
 #include "gth-exif-utils.h"
 #include "glib-utils.h"
+#include "gth-gstreamer-utils.h"
 
 
 ExifData *
@@ -768,3 +769,30 @@
 }
 
 
+static gint
+sort_by_tag_name (GthMetadata *entry1, GthMetadata *entry2)
+{
+	return strcmp_null_tolerant (entry1->display_name, entry2->display_name);
+}
+
+
+GList * 
+update_metadata (GList *metadata, char *uri, const char *mime_type) 
+{ 
+        char  *local_file = NULL; 
+	
+        if (uri == NULL) 
+                return metadata; 
+
+        if (mime_type_is_image (mime_type)) 
+                metadata = gth_read_exiv2 (uri, metadata); 
+ 	else if ( mime_type_is_audio (mime_type) || mime_type_is_video (mime_type)) 
+                metadata = gth_read_gstreamer (uri, metadata); 
+ 
+        /* Sort alphabetically by tag name. The "position" value will 
+           override this sorting, if position is non-zero. */ 
+        metadata = g_list_sort (metadata, (GCompareFunc) sort_by_tag_name); 
+ 
+        return metadata; 
+} 
+

Modified: trunk/libgthumb/gth-exif-utils.h
==============================================================================
--- trunk/libgthumb/gth-exif-utils.h	(original)
+++ trunk/libgthumb/gth-exif-utils.h	Tue Jan 15 19:17:08 2008
@@ -98,5 +98,7 @@
 GList *       gth_read_exiv2		  (const char   *filename,
 					   GList        *metadata);
 void          free_metadata               (GList        *metadata);
-
+GList *       update_metadata		  (GList 	*metadata, 
+					   char 	*uri,
+					   const char 	*mime_type);
 #endif /* EXIF_UTILS_H */

Modified: trunk/src/gth-exif-data-viewer.c
==============================================================================
--- trunk/src/gth-exif-data-viewer.c	(original)
+++ trunk/src/gth-exif-data-viewer.c	Tue Jan 15 19:17:08 2008
@@ -33,7 +33,6 @@
 #include "file-utils.h"
 #include "glib-utils.h"
 #include "gth-exif-utils.h"
-#include "gth-gstreamer-utils.h"
 #include "gth-exif-data-viewer.h"
 #include "image-viewer.h"
 #include "gconf-utils.h"
@@ -331,34 +330,6 @@
 }
 
 
-static gint
-sort_by_tag_name (GthMetadata *entry1, GthMetadata *entry2)
-{
-	return strcmp_null_tolerant (entry1->display_name, entry2->display_name);
-}
-
-
-static GList *
-update_metadata (GList *metadata, char *uri, const char *mime_type)
-{
-	char  *local_file = NULL;
-
-	if (uri == NULL)
-		return metadata;
-
-	if ( mime_type_is_image (mime_type))
-		metadata = gth_read_exiv2 (uri, metadata);
-
-	if ( mime_type_is_audio (mime_type) || mime_type_is_video (mime_type))
-		metadata = gth_read_gstreamer (uri, metadata);
-
-	/* Sort alphabetically by tag name. The "position" value will
-	   override this sorting, if position is non-zero. */
-	metadata = g_list_sort (metadata, (GCompareFunc) sort_by_tag_name);
-
-	return metadata;
-}
-
 static void
 update_file_info (GthExifDataViewer *edv)
 {



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