[gthumb] Register the content type instead of the mime type.



commit 523a2d1f3deff8eb468b16de7cee40565ecb4cde
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jun 27 23:24:59 2010 +0200

    Register the content type instead of the mime type.
    
    Fixes bug #620861

 gthumb/gth-main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 76b6199..434db4d 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -172,7 +172,7 @@ gth_main_init (GthMain *main)
 							g_str_equal,
 							NULL,
 							NULL);
-	main->priv->loaders = g_hash_table_new (g_str_hash, g_str_equal);
+	main->priv->loaders = g_hash_table_new (g_str_hash, (GEqualFunc) g_content_type_equals);
 	main->priv->metadata_category = g_ptr_array_new ();
 	main->priv->metadata_info = g_ptr_array_new ();
 	main->priv->metadata_info_sorted = FALSE;
@@ -712,7 +712,7 @@ gth_main_register_pixbuf_loader (PixbufLoader  loader,
 	va_start (var_args, first_mime_type);
 	mime_type = first_mime_type;
   	while (mime_type != NULL) {
-		g_hash_table_insert (Main->priv->loaders, (gpointer) get_static_string (mime_type), loader);
+		g_hash_table_insert (Main->priv->loaders, (gpointer) get_static_string (g_content_type_from_mime_type (mime_type)), loader);
 		mime_type = va_arg (var_args, const char *);
   	}
 	va_end (var_args);



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