aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-format-html-display.c32
-rw-r--r--mail/em-format-html.c4
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-attachment-bar.c21
-rw-r--r--widgets/misc/e-attachment-bar.h4
6 files changed, 77 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 027e2b1fb8..aa09e8976c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2008-04-20 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #334444
+
+ * em-format-html-display.c: (efhd_attachment_button),
+ (efhd_update_bar), (efhd_message_update_bar),
+ (efhd_message_add_bar):
+ * em-format-html.c: (efh_format_exec):
+
2008-04-17 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #526739
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index be0bfa3c87..a81e6c13e6 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -147,6 +147,7 @@ struct _EMFormatHTMLDisplayPrivate {
GtkWidget *attachment_area;
gboolean show_bar;
GHashTable *files;
+ gboolean updated;
};
static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh);
@@ -156,6 +157,7 @@ static void efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDispla
static void efhd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
static gboolean efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
static void efhd_message_add_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
+static void efhd_message_update_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
static void efhd_attachment_bar_refresh (EMFormatHTMLDisplay *efhd);
struct _attach_puri {
@@ -1309,6 +1311,8 @@ static EMFormatHandler type_builtin_table[] = {
{ "x-evolution/message/prefix", (EMFormatFunc)efhd_message_prefix },
{ "x-evolution/message/post-header", (EMFormatFunc)efhd_message_add_bar },
+ { "x-evolution/message/post-header-closure", (EMFormatFunc)efhd_message_update_bar },
+
};
static void
@@ -1833,7 +1837,7 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
new->encrypt = info->encrypt;
/* Add the attachment to the bar.*/
- e_attachment_bar_add_attachment(E_ATTACHMENT_BAR(efhd->priv->attachment_bar), new);
+ e_attachment_bar_add_attachment_silent (E_ATTACHMENT_BAR(efhd->priv->attachment_bar), new);
efhd_attachment_bar_refresh(efhd);
}
@@ -2160,6 +2164,16 @@ efhd_mnemonic_show_bar (GtkWidget *widget, gboolean focus, GtkWidget *efhd)
}
static gboolean
+efhd_update_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
+{
+ EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
+ struct _EMFormatHTMLDisplayPrivate *priv = efhd->priv;
+
+ e_attachment_bar_refresh (priv->attachment_bar);
+
+ return TRUE;
+}
+static gboolean
efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
{
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh;
@@ -2231,6 +2245,21 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
return TRUE;
}
+static void
+efhd_message_update_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
+{
+ EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *) emf;
+ const char *classid = "attachment-bar-refresh";
+
+ if (efhd->nobar || efhd->priv->updated )
+ return;
+
+ efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ efhd->priv->updated = TRUE;
+ em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_update_bar);
+ camel_stream_printf(stream, "<td><object classid=\"%s\"></object></td>", classid);
+
+}
static void
efhd_message_add_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
@@ -2242,6 +2271,7 @@ efhd_message_add_bar(EMFormat *emf, CamelStream *stream, CamelMimePart *part, co
return;
efhd->priv->files = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ efhd->priv->updated = FALSE;
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);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 96cf0ca27a..b4e8308cf7 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1262,6 +1262,10 @@ efh_format_exec (struct _format_msg *m)
handle = em_format_find_handler((EMFormat *)m->format, "x-evolution/message/rfc822");
if (handle)
handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
+ handle = em_format_find_handler((EMFormat *)m->format, "x-evolution/message/post-header-closure");
+ if (handle)
+ handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
+
}
camel_stream_flush((CamelStream *)m->estream);
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 608a0db842..1f9093d2e4 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-20 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #334444
+
+ * e-attachment-bar.c: (e_attachment_bar_add_attachment_silent),
+ (e_attachment_bar_refresh):
+ * e-attachment-bar.h:
+
2008-04-17 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #526739
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 0ef3ba21f7..81eae05193 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -1207,6 +1207,27 @@ e_attachment_bar_add_attachment (EAttachmentBar *bar, EAttachment *attachment)
add_common (bar, attachment);
}
+void
+e_attachment_bar_add_attachment_silent (EAttachmentBar *bar, EAttachment *attachment)
+{
+ g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
+ g_return_if_fail (attachment != NULL);
+
+ g_ptr_array_add (bar->priv->attachments, attachment);
+ g_object_weak_ref ((GObject *) attachment, (GWeakNotify) attachment_destroy, bar);
+ g_signal_connect (attachment, "changed", G_CALLBACK (attachment_changed_cb), bar);
+
+
+ g_signal_emit (bar, signals[CHANGED], 0);
+}
+
+void
+e_attachment_bar_refresh (EAttachmentBar *bar)
+{
+ update (bar);
+
+}
+
int
e_attachment_bar_get_download_count (EAttachmentBar *bar)
{
diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h
index ec9e9cc6e4..d975b24633 100644
--- a/widgets/misc/e-attachment-bar.h
+++ b/widgets/misc/e-attachment-bar.h
@@ -94,6 +94,10 @@ GtkAction *
e_attachment_bar_recent_action_new (EAttachmentBar *bar,
const gchar *action_name,
const gchar *action_label);
+void
+e_attachment_bar_add_attachment_silent (EAttachmentBar *bar, EAttachment *attachment);
+void
+e_attachment_bar_refresh (EAttachmentBar *bar);
#ifdef __cplusplus
}
'>| | Apparently MessageList eats the CamelFolderChangeInfo it gets from the CamelFolder::changed signal. My confidence in this patch is shaky. The logic is pretty messy and we could easily be leaking memory here. Could use some hot valgrind action. * Use upstream gettext instead the glib oneJavier Jardón2010-10-012-2/+6 | * Remove MailAsyncEvent.Matthew Barnes2010-10-015-289/+30 | | | | | | | As of commit 7fa0dd78305677d14839a480fc379ebba3a6d55c, all CamelFolder and CamelStore signals are emitted from idle callbacks. That means we don't have to propagate events to the main loop thread anymore, which eliminates all remaining uses of MailAsyncEvent. * MailFolderCache: Use an idle callback instead of MailAsyncEvent.Matthew Barnes2010-10-011-11/+15 | * EAttachmentPaned: Use gtk_expander_set_label_fill()Matthew Barnes2010-10-011-17/+1 | | | | | Use the new GtkExpander:label-fill property in GTK+ 2.22, which was added specifically to get rid of my evil hack in EAttachmentPaned. * Remove "type" parameter from mail_async_event_emit().Matthew Barnes2010-10-015-26/+14 | | | | | All remaining cases use MAIL_ASYNC_GUI, so remove mail_async_event_t altogether. * Remove MailAsyncEvent from mail-session.c.Matthew Barnes2010-10-011-37/+19 | | | | Just use an idle callback to play a sound while filtering. * Remove MailAsyncEvent from e-mail-store.c.Matthew Barnes2010-10-011-33/+12 | | | | Functions in e-mail-store.c are always called from the main thread. * Kill em_utils_temp_save_part().Matthew Barnes2010-10-015-181/+109 | | | | | | | | | Rewrite the last usage of it in itip-formatter.c to use EAttachments instead. This also allowed me to kill mail_save_part() in mail-ops.c. I may need to reevaluate the EAttachment API at some point for all these fringe EAttachment uses we're accumulating. Having to asynchronously "load" an EAttachment whose content is already in memory kinda sucks. * Fix typo in Japanese translationTakayuki KUSANO2010-09-301-1/+1 | * EShellBackend: Start tracking activitiesMatthew Barnes2010-09-301-0/+25 | | | | | | | | | EShellBackend now keeps an internal queue of live EActivity objects passed to it via e_shell_backend_add_activity(). This will eventually replace "mail_msg_active_table" in mail-mt.c and be used to coordinate shutdown for all shell backends. But first I have to eliminate mail_msg_wait(). * Remove some unused bits from mail-mt.c.Matthew Barnes2010-09-303-54/+7 | * Messin around with EAlerts.Matthew Barnes2010-09-3013-377/+648 | | | | | | | | | | | | | | | | | | | Trying out a new interface called EAlertSink. The idea is to centralize how errors are shown to the user. A GtkWindow subclass would implement the EAlertSink interface, which consists of a single method: void (*submit_alert) (EAlertSink *alert_sink, EAlert *alert); The subclass has complete control over what to do with the EAlert, although I imagine we'll wind up implementing various alert-handling policies as standalone widgets such as EAlertDialog. I'd like to try an EAlertInfoBar. Code that would otherwise display an error dialog itself would instead pass the EAlert to an appropriate EAlertSink and be done with it. Nothing is final yet. Still hacking on EAlert trying to find an API that feels right for these use cases. * EAlert cleanups.Matthew Barnes2010-09-293-109/+57 | | | | Clean up the header, drop some unused cruft. * camel_operation_new() now returns a GCancellable pointer.Matthew Barnes2010-09-2912-53/+61 | * Bug #629462 - Tasks 'Due' filters don't work properlyMilan Crha2010-09-294-15/+34 | * Bug #629799 - Crash importing a mail with an ics attachmentMilan Crha2010-09-292-16/+21 | * Bug #630294 - Shouldn't send invitation reply when has no organizerMilan Crha2010-09-291-1/+1 | * Bug #630700 - Crash on message sendMilan Crha2010-09-291-2/+3 | * Bug #629266 - Crash on search in Current AccountMilan Crha2010-09-291-7/+54 | * Bug #604080 - Predefined account SSL not propagated to UIMilan Crha2010-09-291-2/+2 | * Bug #629934 - Month view defaults to Monday as start of weekMilan Crha2010-09-291-0/+3 | * Bug #629636 - Doesn't recognize local ESource-sMilan Crha2010-09-294-6/+25 | * Bug #629480 - calendar-gui-WARNING: Couldn't find event windowMilan Crha2010-09-291-3/+0 | * Bug #629150 - Empty calendar viewMilan Crha2010-09-295-23/+106 | * Bug #629972 - [backup-restore] Problems restoring old dataMilan Crha2010-09-291-40/+255 | * Bump gtk+-2.0 requirement to 2.22.0.Matthew Barnes2010-09-294-192/+1 | | | | Remove backward-compatibility hacks for older GTK+ versions. * Adapt to Camel API changes.Matthew Barnes2010-09-2856-637/+725 | * Pass GCancellable to Camel.Matthew Barnes2010-09-2848-546/+1102 | * [l10n] Updated Estonian translationIvar Smolin2010-09-281-162/+202 | * Update Czech translation by Marek CernockyPetr Kovar2010-09-271-6124/+6578 | * Updated Dutch translation by Wouter BolsterleeWouter Bolsterlee2010-09-251-71/+8 | * Fixed Italian translationLuca Ferretti2010-09-241-2/+2 | * [i18n] Updated Dutch translationHannie Dumoleyn2010-09-24