aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-15 15:21:14 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-15 15:21:14 +0800
commit9479a616f6b2de401b9f32db4ac568ebe0cede53 (patch)
treed6c11e24331c3f887ab37c5735bf4706698b3502
parent351cfd0065505d0dbce938a3838c55be9048deda (diff)
downloadgsoc2013-evolution-9479a616f6b2de401b9f32db4ac568ebe0cede53.tar.gz
gsoc2013-evolution-9479a616f6b2de401b9f32db4ac568ebe0cede53.tar.zst
gsoc2013-evolution-9479a616f6b2de401b9f32db4ac568ebe0cede53.zip
** See bug #52878.
2004-01-15 Not Zed <NotZed@Ximian.com> ** See bug #52878. * em-folder-view.c (emfv_finalise): unhook message_changed too. (emfv_set_folder): hook/unhook message_changed too. (emfv_message_changed): implement, proxy to folder_changed. svn path=/trunk/; revision=24235
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-view.c18
2 files changed, 23 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 27f5d574a0..b1b8932f2f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2004-01-15 Not Zed <NotZed@Ximian.com>
+ ** See bug #52878.
+
+ * em-folder-view.c (emfv_finalise): unhook message_changed too.
+ (emfv_set_folder): hook/unhook message_changed too.
+ (emfv_message_changed): implement, proxy to folder_changed.
+
+2004-01-15 Not Zed <NotZed@Ximian.com>
+
** See bugs #51609 and #43515.
* em-format-html-display.c (efhd_format_prefix): output flag for
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index ed4b444a8e..fd2801f904 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -82,6 +82,7 @@
#include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
static void emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv);
+static void emfv_message_changed(CamelFolder *folder, const char *uid, EMFolderView *emfv);
static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv);
static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
@@ -115,7 +116,7 @@ struct _EMFolderViewPrivate {
char *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
- CamelObjectHookID folder_changed_id;
+ CamelObjectHookID folder_changed_id, message_changed_id;
GtkWidget *invisible;
char *selection_uri;
@@ -188,6 +189,8 @@ emfv_finalise(GObject *o)
if (emfv->folder) {
if (p->folder_changed_id)
camel_object_remove_event(emfv->folder, p->folder_changed_id);
+ if (p->message_changed_id)
+ camel_object_remove_event(emfv->folder, p->message_changed_id);
camel_object_unref(emfv->folder);
g_free(emfv->folder_uri);
}
@@ -359,14 +362,16 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
if (folder != emfv->folder) {
if (emfv->folder) {
mail_sync_folder (emfv->folder, NULL, NULL);
- if (emfv->priv->folder_changed_id)
- camel_object_remove_event(emfv->folder, emfv->priv->folder_changed_id);
+ camel_object_remove_event(emfv->folder, emfv->priv->folder_changed_id);
+ camel_object_remove_event(emfv->folder, emfv->priv->message_changed_id);
camel_object_unref(emfv->folder);
}
emfv->folder = folder;
if (folder) {
emfv->priv->folder_changed_id = camel_object_hook_event(folder, "folder_changed",
(CamelObjectEventHookFunc)emfv_folder_changed, emfv);
+ emfv->priv->message_changed_id = camel_object_hook_event(folder, "message_changed",
+ (CamelObjectEventHookFunc)emfv_message_changed, emfv);
camel_object_ref(folder);
}
}
@@ -1929,6 +1934,13 @@ emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolde
mail_async_event_emit(emfv->async, MAIL_ASYNC_GUI, (MailAsyncFunc)emfv_gui_folder_changed, folder, NULL, emfv);
}
+static void
+emfv_message_changed(CamelFolder *folder, const char *uid, EMFolderView *emfv)
+{
+ g_object_ref(emfv);
+ mail_async_event_emit(emfv->async, MAIL_ASYNC_GUI, (MailAsyncFunc)emfv_gui_folder_changed, folder, NULL, emfv);
+}
+
/* keep these two tables in sync */
enum {
EMFV_ANIMATE_IMAGES = 1,