aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2008-10-05 20:42:44 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-10-05 20:42:44 +0800
commit40b56885e46dd3a1ff267193d228fa8fedaaffb1 (patch)
tree146dfa55b8b1dd95138456f4af10db7c14d37266
parent340d984943366dcda88de864c42992520e286178 (diff)
downloadgsoc2013-evolution-40b56885e46dd3a1ff267193d228fa8fedaaffb1.tar.gz
gsoc2013-evolution-40b56885e46dd3a1ff267193d228fa8fedaaffb1.tar.zst
gsoc2013-evolution-40b56885e46dd3a1ff267193d228fa8fedaaffb1.zip
** Fix for bug #554349
2008-10-05 Sankar P <psankar@novell.com> ** Fix for bug #554349 * mail/em-folder-browser.c: Expand threads and select messages, if user has given select-all. svn path=/trunk/; revision=36562
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-browser.c30
2 files changed, 35 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d8d68f1a4a..567a5a2f6e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-05 Sankar P <psankar@novell.com>
+
+ ** Fix for bug #554349
+
+ * mail/em-folder-browser.c:
+ Expand threads and select messages,
+ if user has given select-all.
+
2008-10-01 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #554418
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 3ac2f7cead..b7c53268cc 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 },
@@ -1432,13 +1434,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