]> git.pld-linux.org Git - packages/gnome-vfs2.git/commitdiff
- fix reading mime keys, now it get all info, not only first ones.
authorMarcin Krzyżanowski <marcin.krzyzanowski@hakore.com>
Sat, 17 Apr 2004 18:35:29 +0000 (18:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gnome-vfs2-mime.patch -> 1.1

gnome-vfs2-mime.patch [new file with mode: 0644]

diff --git a/gnome-vfs2-mime.patch b/gnome-vfs2-mime.patch
new file mode 100644 (file)
index 0000000..2b0179f
--- /dev/null
@@ -0,0 +1,35 @@
+diff -Nuard gnome-vfs-2.6.0.orig/libgnomevfs/gnome-vfs-mime-info.c gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-mime-info.c
+--- gnome-vfs-2.6.0.orig/libgnomevfs/gnome-vfs-mime-info.c     2003-10-17 17:11:22.000000000 +0200
++++ gnome-vfs-2.6.0/libgnomevfs/gnome-vfs-mime-info.c  2004-04-17 20:34:28.000000000 +0200
+@@ -258,6 +258,8 @@
+ context_add_key (GnomeMimeContext *context, char *key, char *lang, char *value)
+ {
+       int lang_level;
++      gpointer prevtmp = NULL;
++      gchar *newval = NULL;
+       lang_level = language_level (lang);
+       /* wrong language completely */
+@@ -270,9 +272,19 @@
+               return;
+       }
+-      /*      fprintf (stderr, "Add key: '%s' '%s' '%s' %d\n", key, lang, value, lang_level);*/
+-
+-      g_hash_table_replace (context->keys, g_strdup (key), g_strdup (value));
++/*    g_print ("Add key: '%s' '%s' '%s' %d\n", key, lang, value, lang_level); */
++      
++      prevtmp = g_hash_table_lookup(context->keys,g_strdup (key));
++      
++      if ((prevtmp != NULL) && (strstr(key,"list_application_ids") != NULL) && (strstr(prevtmp,value) == NULL)) {
++              newval = g_strconcat(prevtmp,",",value,NULL);
++      } else {
++              newval = g_strdup(value);
++      }
++      
++/*    g_print("%s %s\n",key,newval); */
++      
++      g_hash_table_replace (context->keys, g_strdup (key), newval);
+       previous_key_lang_level = lang_level;
+ }
This page took 0.091351 seconds and 4 git commands to generate.