From 39fac9425182ca80a51d74f985b8446292841cd0 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 4 Mar 2010 10:38:13 +0530 Subject: In express mode, give the accounts first place than on this computer. --- mail/em-folder-tree-model.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'mail/em-folder-tree-model.c') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index c79b4b4707..cedd234cb1 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -53,6 +53,7 @@ #include #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"))) -- cgit