aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 74ccb2f27d..97ce5674bb 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-02 Radek Doulik <rodo@ximian.com>
+
+ * e-msg-composer.c (add_inlined_images): use hash table to
+ eliminate duplicates
+
2001-11-02 <NotZed@Ximian.com>
* e-msg-composer.c (e_msg_composer_set_enable_autosave): New
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index ec3fea9578..aeca4b58cb 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -271,13 +271,19 @@ static void
add_inlined_images (EMsgComposer *composer, CamelMultipart *multipart)
{
GList *d = composer->current_images;
+ GHashTable *added;
+ added = g_hash_table_new (g_direct_hash, g_direct_equal);
while (d) {
CamelMimePart *part = d->data;
- camel_multipart_add_part (multipart, part);
+ if (!g_hash_table_lookup (added, part)) {
+ camel_multipart_add_part (multipart, part);
+ g_hash_table_insert (added, part, part);
+ }
d = d->next;
}
+ g_hash_table_destroy (added);
}
/* This functions builds a CamelMimeMessage for the message that the user has