aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-08-05 13:59:50 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-08-05 13:59:50 +0800
commit6d0d9bb37a0a1575f4e537a52f0f53fd06638103 (patch)
treea2081445427657acfbeafe3f2a6c1e1fa41e1cc4
parent2fef103851bf1c64f34b909af5ee426af8f414dd (diff)
downloadgsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar.gz
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar.bz2
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar.lz
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar.xz
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.tar.zst
gsoc2013-evolution-6d0d9bb37a0a1575f4e537a52f0f53fd06638103.zip
Fixes the bug #312410.
2005-08-05 Srinivasa Ragavan <sragavan@novell.com> * em-format-html-display.c (efhd_init) (efhd_complete) (efhd_message_add_bar): Fixes the bug #312410. svn path=/trunk/; revision=29996
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-format-html-display.c20
2 files changed, 14 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f7a39e876e..54bfcc5678 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-05 Srinivasa Ragavan <sragavan@novell.com>
+
+ * em-format-html-display.c (efhd_init) (efhd_complete) (efhd_message_add_bar):
+ Fixes the bug #312410.
+
2005-08-04 Srinivasa Ragavan <sragavan@novell.com>
* em-utls.c (emu_update_save_path): Killed a warning.
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index a1da4532a8..72adbae97a 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -114,7 +114,6 @@ struct _EMFormatHTMLDisplayPrivate {
GtkWidget *down;
GtkWidget *save;
gboolean show_bar;
- gboolean bar_added;
GHashTable *files;
};
@@ -277,8 +276,7 @@ efhd_init(GObject *o)
#undef efh
efhd->priv->show_bar = FALSE;
- efhd->priv->bar_added = FALSE;
- efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ efhd->priv->files = NULL;
}
static void
@@ -679,6 +677,11 @@ efhd_complete(EMFormat *emf)
if (efhd->priv->search_dialog)
efhd_update_matches(efhd);
+
+ if (efhd->priv->files) {
+ g_hash_table_destroy (efhd->priv->files);
+ efhd->priv->files = NULL;
+ }
}
/* ********************************************************************** */
@@ -1045,12 +1048,6 @@ static void efhd_format_clone(EMFormat *emf, CamelFolder *folder, const char *ui
efhd->priv->show_bar = FALSE;
}
- efhd->priv->attachment_bar = NULL;
- efhd->priv->bar_added = FALSE;
- if (efhd->priv->files)
- g_hash_table_destroy(efhd->priv->files);
- efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
((EMFormatClass *)efhd_parent)->format_clone(emf, folder, uid, msg, src);
}
@@ -1954,10 +1951,11 @@ efhd_message_add_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, co
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *) emf;
const char *classid = "attachment-bar";
- if (efhd->priv->bar_added)
+ if (efhd->priv->files)
return;
- efhd->priv->bar_added = TRUE;
+ efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_add_bar);
camel_stream_printf(stream, "<td><object classid=\"%s\"></object></td>", classid);
}