[evolution] In express mode, give the accounts first place than on this computer.



commit 39fac9425182ca80a51d74f985b8446292841cd0
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Thu Mar 4 10:38:13 2010 +0530

    In express mode, give the accounts first place than on this computer.

 mail/em-folder-tree-model.c |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index c79b4b4..cedd234 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -53,6 +53,7 @@
 #include <camel/camel-vee-store.h>
 
 #include "e-mail-local.h"
+#include "shell/e-shell.h"
 
 #define d(x)
 
@@ -141,14 +142,31 @@ folder_tree_model_sort (GtkTreeModel *model,
 	if (is_store) {
 		/* On This Computer is always first, and Search Folders
 		 * is always last. */
-		if (!strcmp (aname, _("On This Computer")))
-			rv = -1;
-		else if (!strcmp (bname, _("On This Computer")))
-			rv = 1;
-		else if (!strcmp (aname, _("Search Folders")))
-			rv = 1;
-		else if (!strcmp (bname, _("Search Folders")))
-			rv = -1;
+		if (e_shell_get_express_mode (NULL)) {
+			if (!strcmp (aname, _("On This Computer")) &&
+				!strcmp (bname, _("Search Folders")))
+				rv = -1;
+			else if (!strcmp (bname, _("On This Computer")) &&
+				!strcmp (aname, _("Search Folders")))
+				rv = 1;
+			else if (!strcmp (aname, _("On This Computer")))
+				rv = 1;
+			else if (!strcmp (bname, _("On This Computer")))
+				rv = -1;
+				else if (!strcmp (aname, _("Search Folders")))
+				rv = 1;
+			else if (!strcmp (bname, _("Search Folders")))
+				rv = -1;
+		} else {
+			if (!strcmp (aname, _("On This Computer")))
+				rv = -1;
+			else if (!strcmp (bname, _("On This Computer")))
+				rv = 1;
+			else if (!strcmp (aname, _("Search Folders")))
+				rv = 1;
+			else if (!strcmp (bname, _("Search Folders")))
+				rv = -1;
+		}
 	} else if (store == vfolder_store) {
 		/* UNMATCHED is always last. */
 		if (aname && !strcmp (aname, _("UNMATCHED")))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]