aboutsummaryrefslogtreecommitdiffstats
path: root/camel/data-wrapper-repository.c
diff options
context:
space:
mode:
authorNotZed <notzed@zedzone.helixcode.com>2000-02-10 13:03:43 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-02-10 13:03:43 +0800
commit4a2a09a7bae99778d6e11df7da7d0a166815030f (patch)
tree6c7f2ca1ce6327075a40178f400fc74eaefcfd61 /camel/data-wrapper-repository.c
parent3ef8dbd93ad44e08503f69d4929428362fc383ea (diff)
downloadgsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar.gz
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar.bz2
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar.lz
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar.xz
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.tar.zst
gsoc2013-evolution-4a2a09a7bae99778d6e11df7da7d0a166815030f.zip
Removed a bizarre comparison construct for converting case.
2000-02-10 NotZed <notzed@zedzone.helixcode.com> * camel/hash-table-utils.c (g_strcase_hash): Removed a bizarre comparison construct for converting case. 2000-02-09 NotZed <notzed@zedzone.helixcode.com> * camel/data-wrapper-repository.c (data_wrapper_repository_init): Uses case-insensitive compares. * camel/gmime-content-field.c (gmime_content_field_new): Uses case-insensitive compares. svn path=/trunk/; revision=1723
Diffstat (limited to 'camel/data-wrapper-repository.c')
-rw-r--r--camel/data-wrapper-repository.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/camel/data-wrapper-repository.c b/camel/data-wrapper-repository.c
index 7d1b1dc05f..2bc6a28abc 100644
--- a/camel/data-wrapper-repository.c
+++ b/camel/data-wrapper-repository.c
@@ -28,15 +28,14 @@
#include "data-wrapper-repository.h"
#include "camel-multipart.h"
-
-
+#include <string.h>
+#include "hash-table-utils.h"
static DataWrapperRepository _repository;
static _initialized = -1;
GMimeContentField *_content_field;
-
/**
* data_wrapper_repository_init: initialize data wrapper repository
*
@@ -49,7 +48,7 @@ gint
data_wrapper_repository_init ()
{
if (_initialized != -1) return -1;
- _repository.mime_links = g_hash_table_new (g_str_hash, g_str_equal);
+ _repository.mime_links = g_hash_table_new (g_strcase_hash, g_strcase_equal);
data_wrapper_repository_set_data_wrapper_type ("multipart", camel_multipart_get_type());
_content_field = gmime_content_field_new (NULL, NULL);
_initialized = 1;
@@ -102,13 +101,16 @@ data_wrapper_repository_get_data_wrapper_type (const gchar *mime_type)
gboolean exists;
gchar *old_mime_type;
GtkType gtk_type;
-
+
+ printf("looking up type '%s'\n", mime_type);
+
/* find if the complete mime type exists */
exists = g_hash_table_lookup_extended (_repository.mime_links, (gpointer)mime_type,
(gpointer)&old_mime_type, (gpointer)&gtk_type);
- if (exists) /* the complete mime type exists, return it */
+ if (exists) { /* the complete mime type exists, return it */
+ printf( "exists!\n");
return gtk_type;
- else {
+ } else {
/* the complete mime type association does not exists */
/* is there an association for the main mime type ? */
gmime_content_field_construct_from_string (_content_field, mime_type);