aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-08 05:48:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-08 05:48:36 +0800
commit31c42749c183a53952fd21b25b442cfc93ce9a8f (patch)
treec820a2ec01bbae216c7e9713126a563d5d37451b /mail
parentdf95d7a64d1201e7ad0f3838aa69869be6ee8391 (diff)
downloadgsoc2013-evolution-31c42749c183a53952fd21b25b442cfc93ce9a8f.tar.gz
gsoc2013-evolution-31c42749c183a53952fd21b25b442cfc93ce9a8f.tar.zst
gsoc2013-evolution-31c42749c183a53952fd21b25b442cfc93ce9a8f.zip
Fix for bug #56538
2004-04-07 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #56538 * em-folder-view.c (emfv_set_folder_uri): Don't set the preview empty here. (emfv_set_folder): If the folder is the same as the folder already on the emfv, just return. Otherwise clear the preview and continue setting the folder as normal. svn path=/trunk/; revision=25364
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/em-folder-view.c43
2 files changed, 33 insertions, 20 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3f10acdc65..135cbb614a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,15 @@
2004-04-07 Jeffrey Stedfast <fejj@ximian.com>
+ Fix for bug #56538
+
+ * em-folder-view.c (emfv_set_folder_uri): Don't set the preview
+ empty here.
+ (emfv_set_folder): If the folder is the same as the folder already
+ on the emfv, just return. Otherwise clear the preview and continue
+ setting the folder as normal.
+
+2004-04-07 Jeffrey Stedfast <fejj@ximian.com>
+
* em-account-prefs.c (em_account_prefs_apply): Removed.
* em-mailer-prefs.c (em_mailer_prefs_apply): Removed.
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index b1d1e43396..418d8f0446 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -355,27 +355,33 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
&& (em_utils_folder_is_drafts(folder, uri)
|| em_utils_folder_is_sent(folder, uri)
|| em_utils_folder_is_outbox(folder, uri)));
-
+
+ if (folder == emfv->folder)
+ return;
+
+ if (emfv->preview)
+ em_format_format ((EMFormat *) emfv->preview, NULL, NULL, NULL);
+
message_list_set_folder(emfv->list, folder, uri, isout);
g_free(emfv->folder_uri);
emfv->folder_uri = g_strdup(uri);
- if (folder != emfv->folder) {
- if (emfv->folder) {
- mail_sync_folder (emfv->folder, NULL, NULL);
- 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);
- }
+
+ if (emfv->folder) {
+ mail_sync_folder (emfv->folder, NULL, NULL);
+ 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);
+ }
+
emfv_enable_menus(emfv);
}
@@ -383,16 +389,13 @@ static void
emfv_got_folder(char *uri, CamelFolder *folder, void *data)
{
EMFolderView *emfv = data;
-
+
em_folder_view_set_folder(emfv, folder, uri);
}
static void
emfv_set_folder_uri(EMFolderView *emfv, const char *uri)
{
- if (emfv->preview)
- em_format_format((EMFormat *)emfv->preview, NULL, NULL, NULL);
-
mail_get_folder(uri, 0, emfv_got_folder, emfv, mail_thread_new);
}