aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Mueller <tobiasmue@gnome.org>2009-04-04 06:41:56 +0800
committerTobias Mueller <tobiasmue@src.gnome.org>2009-04-04 06:41:56 +0800
commit0ecdda6ca11bc1380f1c9809eb4cd838713edad1 (patch)
treeaed2dc328ee4dac17d94a341e6cb835b1d7c6050
parentc2c46d066fe244e7f9aa688677040b1596925aa5 (diff)
downloadgsoc2013-evolution-0ecdda6ca11bc1380f1c9809eb4cd838713edad1.tar.gz
gsoc2013-evolution-0ecdda6ca11bc1380f1c9809eb4cd838713edad1.tar.zst
gsoc2013-evolution-0ecdda6ca11bc1380f1c9809eb4cd838713edad1.zip
** Fix for bug #569765
2008-04-04 Tobias Mueller <tobiasmue@gnome.org> ** Fix for bug #569765 * message-list.c: Don't keep the selected message in the message list if it is removed from the folder. Patch by Matt McCutchen <matt@mattmccutchen.net> svn path=/trunk/; revision=37493
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/message-list.c22
2 files changed, 22 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8b14efe507..4c81c8e768 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-04 Tobias Mueller <tobiasmue@gnome.org>
+
+ ** Fix for bug #569765
+
+ * message-list.c: Don't keep the selected message in the message
+ list if it is removed from the folder.
+ Patch by Matt McCutchen <matt@mattmccutchen.net>
+
2009-04-02 Milan Crha <mcrha@redhat.com>
* em-folder-tree.c: (em_folder_tree_get_selected_folder):
diff --git a/mail/message-list.c b/mail/message-list.c
index 1b6932cb29..a2a9989bda 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4053,16 +4053,22 @@ regen_list_exec (struct _regen_list_msg *m)
/* cursor_uid has been filtered out */
if (i == uids->len) {
- gboolean was_deleted = (camel_folder_get_message_flags (m->folder, looking_for) & CAMEL_MESSAGE_DELETED) != 0;
+ CamelMessageInfo *looking_info = camel_folder_get_message_info (m->folder, looking_for);
- /* I would really like to check for CAMEL_MESSAGE_FOLDER_FLAGGED on a message,
- so I would know whether it was changed locally, and then just check the changes
- struct whether change came from the server, but with periodical save it doesn't
- matter. So here just check whether the file was deleted and we show it based
- on the flag whether we can view deleted messages or not. */
+ if (looking_info) {
+ gboolean was_deleted = (camel_message_info_flags (looking_info) & CAMEL_MESSAGE_DELETED) != 0;
- if (!was_deleted || (was_deleted && !m->hidedel))
- g_ptr_array_add (uids, (gpointer) camel_pstring_strdup (looking_for));
+ /* I would really like to check for CAMEL_MESSAGE_FOLDER_FLAGGED on a message,
+ so I would know whether it was changed locally, and then just check the changes
+ struct whether change came from the server, but with periodical save it doesn't
+ matter. So here just check whether the file was deleted and we show it based
+ on the flag whether we can view deleted messages or not. */
+
+ if (!was_deleted || (was_deleted && !m->hidedel))
+ g_ptr_array_add (uids, (gpointer) camel_pstring_strdup (looking_for));
+
+ camel_folder_free_message_info (m->folder, looking_info);
+ }
}
}
}