2005-12-13 [colin] 1.9.100cvs87
authorColin Leroy <colin@colino.net>
Tue, 13 Dec 2005 19:19:53 +0000 (19:19 +0000)
committerColin Leroy <colin@colino.net>
Tue, 13 Dec 2005 19:19:53 +0000 (19:19 +0000)
* src/compose.c
Uniq-ify and sort the mimetypes list
Patch by Fabien Vantard

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 6e254d9..7327e8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-13 [colin]     1.9.100cvs87
+
+       * src/compose.c
+               Uniq-ify and sort the mimetypes list
+               Patch by Fabien Vantard
+
 2005-12-13 [colin]     1.9.100cvs86
 
        * src/imap.c
index 6f1e72f..f545b67 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/icon_legend.c;  ) > 1.9.100cvs84.patchset
 ( cvs diff -u -r 1.75.2.14 -r 1.75.2.15 src/matcher.c;  ) > 1.9.100cvs85.patchset
 ( cvs diff -u -r 1.179.2.83 -r 1.179.2.84 src/imap.c;  cvs diff -u -r 1.101.2.18 -r 1.101.2.19 src/news.c;  cvs diff -u -r 1.13.2.10 -r 1.13.2.11 src/common/plugin.c;  cvs diff -u -r 1.1.4.25 -r 1.1.4.26 src/etpan/imap-thread.c;  ) > 1.9.100cvs86.patchset
+( cvs diff -u -r 1.382.2.203 -r 1.382.2.204 src/compose.c;  ) > 1.9.100cvs87.patchset
index 0b37231..96497f8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=86
+EXTRA_VERSION=87
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 4f95520..60e850e 100644 (file)
@@ -6380,11 +6380,17 @@ static void compose_attach_property_create(gboolean *cancelled)
        strlist = NULL;
        for (; mime_type_list != NULL; mime_type_list = mime_type_list->next) {
                MimeType *type = (MimeType *) mime_type_list->data;
-               strlist = g_list_append(strlist, 
-                               g_strdup_printf("%s/%s",
-                                       type->type, type->sub_type));
+               gchar *tmp;
+
+               tmp = g_strdup_printf("%s/%s", type->type, type->sub_type);
+
+               if (g_list_find_custom(strlist, tmp, (GCompareFunc)strcmp2))
+                       g_free(tmp);
+               else
+                       strlist = g_list_insert_sorted(strlist, (gpointer)tmp,
+                                       (GCompareFunc)strcmp2);
        }
-       
+
        gtk_combo_set_popdown_strings(GTK_COMBO(mimetype_entry), strlist);
 
        for (mime_type_list = strlist; mime_type_list != NULL;