From 7f7c32f6d202a2b1f9cc413bf361be91bcd47010 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Sat, 4 Nov 2000 10:11:50 +0000 Subject: use inline images hash table 2000-11-04 Radek Doulik * listener.c (resolve_image_url): use inline images hash table * e-msg-composer.c (init): create inlined images hash table (destroy): destroy it (clear_inline_images): helper function, used from g_hash_table_foreach_remove to destroy one inline image record * e-msg-composer.h: added hash table with inlined images url -> cid info 2000-11-03 Radek Doulik * listener.c (impl_event): updated for API changed implemented image_url event (resolve_image_url): new helper function, attaches image to mail and returns new (resolved) url pointing to mime component * e-msg-composer-attachment.c (e_msg_composer_attachment_new): added conponent_id parameter * e-msg-composer-attachment-bar.c (e_msg_composer_attachment_bar_attach): added parameter content_id (add_from_file): likewise svn path=/trunk/; revision=6390 --- composer/e-msg-composer.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index dbf37ac0bb..6fd10d578c 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -707,7 +707,7 @@ menu_file_add_attachment_cb (BonoboUIComponent *uic, e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), - NULL); + NULL, NULL); } static void @@ -987,6 +987,15 @@ attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar, /* GtkObject methods. */ +static gboolean +clear_inline_images (gpointer key, gpointer value, gpointer user_data) +{ + g_free (key); + g_free (value); + + return TRUE; +} + static void destroy (GtkObject *object) { @@ -1034,6 +1043,7 @@ destroy (GtkObject *object) Bonobo_Unknown_unref (composer->editor_engine, &ev); CORBA_Object_release (composer->editor_engine, &ev); } + g_hash_table_foreach_remove (composer->inline_images, clear_inline_images, NULL); CORBA_exception_free (&ev); @@ -1084,7 +1094,7 @@ drag_data_received (EMsgComposer *composer, e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), - filename); + filename, NULL); g_free (filename); } @@ -1142,7 +1152,9 @@ init (EMsgComposer *composer) composer->persist_file_interface = CORBA_OBJECT_NIL; composer->persist_stream_interface = CORBA_OBJECT_NIL; + composer->editor_engine = CORBA_OBJECT_NIL; + composer->inline_images = g_hash_table_new (g_str_hash, g_str_equal); composer->attachment_bar_visible = FALSE; composer->send_html = FALSE; -- cgit v1.2.3