diff options
author | Not Zed <NotZed@Ximian.com> | 2005-02-23 14:08:47 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-02-23 14:08:47 +0800 |
commit | cef26eb8ca03c38050110d3f43623ed79076c5de (patch) | |
tree | 8fc2bc7b6c4a8293aef2854b2b0774756b8d2367 | |
parent | 549c62d68b7c7130855425f4db48bffedeb2a937 (diff) | |
download | gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar.gz gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar.bz2 gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar.lz gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar.xz gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.tar.zst gsoc2013-evolution-cef26eb8ca03c38050110d3f43623ed79076c5de.zip |
** See bug #70718
2005-02-21 Not Zed <NotZed@Ximian.com>
** See bug #70718
* em-folder-view.c (emfv_list_built): handle list_built events -
whenever the list changes.
(emfv_gui_folder_changed, emfv_folder_changed): removed, we want
to run off the viewed list, not the physical folder.
svn path=/trunk/; revision=28854
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-folder-view.c | 37 |
2 files changed, 20 insertions, 26 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 7da34d8aff..f4bc803a16 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2005-02-21 Not Zed <NotZed@Ximian.com> + + ** See bug #70718 + + * em-folder-view.c (emfv_list_built): handle list_built events - + whenever the list changes. + (emfv_gui_folder_changed, emfv_folder_changed): removed, we want + to run off the viewed list, not the physical folder. + 2005-02-22 Rodney Dawes <dobey@novell.com> * em-account-editor.c (emae_security_page): The GladeXML object is diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 029065952a..9ceb6fee25 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -99,9 +99,8 @@ #include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */ -static void emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv); - static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv); +static void emfv_list_built(MessageList *ml, EMFolderView *emfv); static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv); static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv); static int emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv); @@ -136,8 +135,6 @@ struct _EMFolderViewPrivate { int nomarkseen:1; int destroyed:1; - CamelObjectHookID folder_changed_id; - GtkWidget *invisible; char *selection_uri; @@ -180,6 +177,7 @@ emfv_init(GObject *o) emfv->list = (MessageList *)message_list_new(); g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv); + g_signal_connect(emfv->list, "message_list_built", G_CALLBACK(emfv_list_built), emfv); /* FIXME: should this hang off message-list instead? */ g_signal_connect(emfv->list->tree, "right_click", G_CALLBACK(emfv_list_right_click), emfv); @@ -241,8 +239,6 @@ emfv_destroy (GtkObject *o) } if (emfv->folder) { - if (p->folder_changed_id) - camel_object_remove_event(emfv->folder, p->folder_changed_id); camel_object_unref(emfv->folder); g_free(emfv->folder_uri); emfv->folder = NULL; @@ -571,14 +567,11 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) if (emfv->folder) { emfv->hide_deleted = emfv->list->hidedeleted; /* <- a bit nasty but makes it track the display better */ mail_sync_folder (emfv->folder, NULL, NULL); - camel_object_remove_event(emfv->folder, emfv->priv->folder_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); camel_object_ref(folder); mail_refresh_folder(folder, NULL, NULL); /* We need to set this up to get the right view options for the message-list, even if we're not showing it */ @@ -2170,6 +2163,15 @@ emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv) } static void +emfv_list_built(MessageList *ml, EMFolderView *emfv) +{ + if (!emfv->priv->destroyed) { + emfv_enable_menus(emfv); + g_signal_emit(emfv, signals[EMFV_LOADED], 0); + } +} + +static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv) { /* Ignore double-clicks on columns that handle thier own state */ @@ -2378,23 +2380,6 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const return TRUE; } -static void -emfv_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderView *emfv) -{ - if (!emfv->priv->destroyed) { - emfv_enable_menus(emfv); - g_signal_emit(emfv, signals[EMFV_LOADED], 0); - } - g_object_unref(emfv); -} - -static void -emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, 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, |