From 27f894733e551067737a21bc21259ccbda60c777 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Sat, 10 Jul 2004 01:31:04 +0000 Subject: only call expunge if the folder is set. (emfb_enable_map[]): only enable 2004-07-09 Not Zed * em-folder-browser.c (emfb_folder_expunge): only call expunge if the folder is set. (emfb_enable_map[]): only enable expunge menu item if we have a valid folder set. ** See bug #60900. * em-format-html.c: convert the text_inline_parts hash to be keyed off the partid. (efh_free_inline_parts): -> efh_free_cache and fix to do it. * em-format.c (emf_free_cache): make the inline table cache other info too based on partid, this frees the structure. (emf_clone_inlines): copy all of the cache data. (em_format_is_inline): use the new data structure to determine state. (em_format_set_inline): same for setting. (emf_multipart_signed): cache/lookup the cached part. (emf_insert_cache): helper to add a cache entry. (emf_multipart_encrypted): cache decrypted part. (emf_application_xpkcs7mime): same. 2004-07-08 Not Zed ** See bug #60900 (related only). * em-format-html-display.c (efhd_attachment_show): let set_inline do the redraw itself if required. kill some dead code. * em-format.c (em_format_set_inline): trigger a redraw here like the other em_format_set methods, if the state changed. * em-format.c (emf_format_clone): free inline table keys & setup string hash table. * em-format-quote.c (emfq_format_attachment): * em-format-html-display.c (efhd_format_attachment): * em-format-html.c (efh_format_attachment): is_inline api changes. * em-format-html-display.c (efhd_attachment_show): set_inline api changes. * em-format.c (em_format_is_inline): make this use the partid rather than the part address as a key, which may change. (emf_init): make the inline talbe a string hashtable. (emf_finalise): free inline keys. (emf_clone_inlines): copy the key string. svn path=/trunk/; revision=26614 --- mail/em-format-html-display.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'mail/em-format-html-display.c') diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index a55189d644..fd5e653625 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -1046,38 +1046,7 @@ efhd_attachment_show(GtkWidget *w, struct _attach_puri *info) d(printf("show attachment button called\n")); info->shown = ~info->shown; - em_format_set_inline(info->puri.format, info->puri.part, info->shown); - /* FIXME: do this in an idle handler */ - em_format_redraw(info->puri.format); -#if 0 - /* FIXME: track shown state in parent */ - - if (info->shown) { - d(printf("hiding\n")); - info->shown = FALSE; - if (info->frame) - gtk_widget_hide((GtkWidget *)info->frame); - gtk_widget_show(info->forward); - gtk_widget_hide(info->down); - } else { - d(printf("showing\n")); - info->shown = TRUE; - if (info->frame) - gtk_widget_show((GtkWidget *)info->frame); - gtk_widget_hide(info->forward); - gtk_widget_show(info->down); - - /* have we decoded it yet? */ - if (info->output) { - info->handle->handler(info->puri.format, info->output, info->puri.part, info->handle); - camel_stream_close(info->output); - camel_object_unref(info->output); - info->output = NULL; - } - } - - em_format_set_inline(info->puri.format, info->puri.part, info->shown); -#endif + em_format_set_inline(info->puri.format, info->puri.part_id, info->shown); } static EMPopupItem efhd_menu_items[] = { @@ -1498,7 +1467,7 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, info = (struct _attach_puri *)em_format_add_puri(emf, sizeof(*info), classid, part, efhd_attachment_frame); em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_attachment_button); info->handle = handle; - info->shown = em_format_is_inline(emf, info->puri.part, handle); + info->shown = em_format_is_inline(emf, info->puri.part_id, info->puri.part, handle); info->snoop_mime_type = emf->snoop_mime_type; camel_stream_write_string(stream, -- cgit v1.2.3