diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:52:05 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-25 07:52:05 +0800 |
commit | 85b2913a380c69f14ae0254ad23b10fabfb33667 (patch) | |
tree | c1cf143e37294dd9dd3667ebbe0a1d0c00b04b56 /mail/em-folder-browser.c | |
parent | e7a31c5035a0afeed6c1675e30487c1e2bdc139f (diff) | |
download | gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.gz gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.tar.zst gsoc2013-evolution-85b2913a380c69f14ae0254ad23b10fabfb33667.zip |
Merge revisions 36534:36684 from trunk.
svn path=/branches/kill-bonobo/; revision=36685
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r-- | mail/em-folder-browser.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 159d77d557..3bfb198c2b 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -149,6 +149,8 @@ static void emfb_search_search_cleared(ESearchBar *esb); static int emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb); static void emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb); +static void emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path); + static const EMFolderViewEnable emfb_enable_map[] = { { "EditInvertSelection", EM_POPUP_SELECT_FOLDER }, { "EditSelectAll", EM_POPUP_SELECT_FOLDER }, @@ -1426,13 +1428,35 @@ emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path) message_list_invert_selection(emfv->list); } +static gboolean +emfb_select_all_daemon (MessageList *ml) +{ + message_list_select_all(ml); + gtk_widget_grab_focus ((GtkWidget *)ml); + return FALSE; +} + static void emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path) { - EMFolderView *emfv = data; + EMFolderView *emfv = data; - message_list_select_all(emfv->list); - gtk_widget_grab_focus ((GtkWidget *)emfv->list); + if (emfv->list->threaded) { + + emfb_expand_all_threads (uid, data, path); + + /* The time out below is added so that the execution thread to + expand all conversations threads would've completed. + + The timeout 505 is just to ensure that the value is a small delta + more than the timeout value in expand_all_threads thread. */ + + g_timeout_add (505, (GSourceFunc) emfb_select_all_daemon, emfv->list); + + } else { + /* If there is no threading, just select-all immediately */ + emfb_select_all_daemon (emfv->list); + } } static void |