aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-06 03:32:52 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-06 03:32:52 +0800
commit5f1f5fcffd81e6debe57ae252d84132f50a6d87a (patch)
treeb6c99cd2efc0259244511d9b6e2ca6415d9ae01b /mail
parentf1d87c869e057adb510465dbaae4d2624020f9f4 (diff)
downloadgsoc2013-evolution-5f1f5fcffd81e6debe57ae252d84132f50a6d87a.tar.gz
gsoc2013-evolution-5f1f5fcffd81e6debe57ae252d84132f50a6d87a.tar.zst
gsoc2013-evolution-5f1f5fcffd81e6debe57ae252d84132f50a6d87a.zip
Check that the folder isn't NULL (ie. no folder is selected). Fixes bug
2004-01-05 Jeffrey Stedfast <fejj@ximian.com> * em-folder-browser.c (emfb_list_message_selected): Check that the folder isn't NULL (ie. no folder is selected). Fixes bug #52207. * message-list.c (message_list_set_folder): Remove the cursor-activated idle callback. svn path=/trunk/; revision=24054
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/em-folder-browser.c3
-rw-r--r--mail/message-list.c8
3 files changed, 16 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 549257c922..6d87c0fd40 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2004-01-05 Jeffrey Stedfast <fejj@ximian.com>
+ * em-folder-browser.c (emfb_list_message_selected): Check that the
+ folder isn't NULL (ie. no folder is selected). Fixes bug #52207.
+
+ * message-list.c (message_list_set_folder): Remove the
+ cursor-activated idle callback.
+
* mail-send-recv.c (build_dialog): Set the send/recv dialog to
non-modal. Fixes bug #50127.
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 50ea24749c..23abdc7d93 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -450,6 +450,9 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
{
EMFolderView *emfv = (EMFolderView *) emfb;
+ if (emfv->folder == NULL)
+ return;
+
camel_object_meta_set (emfv->folder, "evolution:selected_uid", uid);
camel_object_state_write (emfv->folder);
}
diff --git a/mail/message-list.c b/mail/message-list.c
index 02ebc4a853..a1960d9293 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2526,6 +2526,12 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
camel_exception_init (&ex);
+ /* remove the cursor activate idle handler */
+ if (message_list->idle_id != 0) {
+ g_source_remove (message_list->idle_id);
+ message_list->idle_id = 0;
+ }
+
/* cancel any outstanding regeneration requests */
if (message_list->regen) {
GList *l = message_list->regen;
@@ -2616,7 +2622,7 @@ on_cursor_activated_idle (gpointer data)
MessageList *message_list = data;
ESelectionModel *esm = e_tree_get_selection_model (message_list->tree);
int selected = e_selection_model_selected_count (esm);
-
+
if (selected == 1 && message_list->cursor_uid) {
d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid));
g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, message_list->cursor_uid);