From: Colin Leroy Date: Tue, 13 Dec 2005 19:19:53 +0000 (+0000) Subject: 2005-12-13 [colin] 1.9.100cvs87 X-Git-Tag: rel_2_0_0~128 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e5c2a2a6c1ec4f92d38e5b1386046f86cdba7a0c;hp=36137f90de24f6647c0f78cde47687ffa2894e3d 2005-12-13 [colin] 1.9.100cvs87 * src/compose.c Uniq-ify and sort the mimetypes list Patch by Fabien Vantard --- diff --git a/ChangeLog b/ChangeLog index 6e254d911..7327e8b97 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index 6f1e72ff1..f545b6727 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1070,3 +1070,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 0b3723119..96497f86d 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/compose.c b/src/compose.c index 4f9552027..60e850eaa 100644 --- a/src/compose.c +++ b/src/compose.c @@ -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;