gthumb r2470 - in trunk: . libgthumb src



Author: mjc
Date: Wed Dec 24 02:06:02 2008
New Revision: 2470
URL: http://svn.gnome.org/viewvc/gthumb?rev=2470&view=rev

Log:
2008-12-23  Michael J. Chudobiak  <mjc svn gnome org>

        * libgthumb/file-utils.c: (get_mime_type_from_ext):
        * libgthumb/file-utils.h:
        * src/dlg-image-prop.c: (update_general_info):
        * src/dlg-open-with.c: (dlg_open_with):
        Remove the gnome-vfs mimetype detection routine, and replace
        it with the existing gfile-based one.



Modified:
   trunk/ChangeLog
   trunk/libgthumb/file-utils.c
   trunk/libgthumb/file-utils.h
   trunk/src/dlg-image-prop.c
   trunk/src/dlg-open-with.c

Modified: trunk/libgthumb/file-utils.c
==============================================================================
--- trunk/libgthumb/file-utils.c	(original)
+++ trunk/libgthumb/file-utils.c	Wed Dec 24 02:06:02 2008
@@ -590,22 +590,13 @@
 
 
 const char *
-get_mime_type (const char *uri)
-{
-	if (uri_scheme_is_file (uri))
-		uri = get_file_path_from_uri (uri);
-	return gnome_vfs_get_file_mime_type (uri, NULL, FALSE);
-}
-
-
-const char *
 get_mime_type_from_ext (const char *ext)
 {
 	char       *filename;
 	const char *result;
 
 	filename = g_strconcat ("x.", ext, NULL);
-	result = get_mime_type (filename);
+	result = get_file_mime_type (filename, TRUE);
 	g_free (filename);
 
 	return result;

Modified: trunk/libgthumb/file-utils.h
==============================================================================
--- trunk/libgthumb/file-utils.h	(original)
+++ trunk/libgthumb/file-utils.h	Wed Dec 24 02:06:02 2008
@@ -249,7 +249,6 @@
 						   const char       *format,
 						   ...);
 guint64             get_destination_free_space    (const char       *path);
-const char *        get_mime_type                 (const char       *path);
 const char*         get_file_mime_type            (const char       *path,
 						   gboolean          fast_file_type);
 const char *        get_mime_type_from_ext        (const char       *ext);

Modified: trunk/src/dlg-image-prop.c
==============================================================================
--- trunk/src/dlg-image-prop.c	(original)
+++ trunk/src/dlg-image-prop.c	Wed Dec 24 02:06:02 2008
@@ -407,7 +407,7 @@
 		
 		/**/
 	
-		mime_type = get_mime_type (image_filename);	
+		mime_type = get_file_mime_type (image_filename, FALSE);
 		mime_description = g_content_type_get_description (mime_type);
 		mime_full = g_strdup_printf ("%s (%s)", mime_description, mime_type);
 		gtk_label_set_text (GTK_LABEL (data->i_type_label), mime_full);

Modified: trunk/src/dlg-open-with.c
==============================================================================
--- trunk/src/dlg-open-with.c	(original)
+++ trunk/src/dlg-open-with.c	Wed Dec 24 02:06:02 2008
@@ -324,7 +324,7 @@
 		const char *uri = scan->data;
 		const char *result;
 
-		result = get_mime_type (uri);
+		result = get_file_mime_type (uri, FALSE);
 		if (result != NULL)
 			data->apps = g_list_concat (data->apps, g_app_info_get_all_for_type (result));
 	}



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