From 5f1f5fcffd81e6debe57ae252d84132f50a6d87a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 5 Jan 2004 19:32:52 +0000 Subject: Check that the folder isn't NULL (ie. no folder is selected). Fixes bug 2004-01-05 Jeffrey Stedfast * 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 --- mail/message-list.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mail/message-list.c') 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); -- cgit v1.2.3