diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-03-04 13:08:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-03-14 09:53:17 +0800 |
commit | 39fac9425182ca80a51d74f985b8446292841cd0 (patch) | |
tree | 0a6b67a13ed2857ce48e7739ecdc418d11f812f4 | |
parent | ab6aff8396a7ea87ffcaf215974d4d2fc457373d (diff) | |
download | gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar.gz gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar.bz2 gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar.lz gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar.xz gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.tar.zst gsoc2013-evolution-39fac9425182ca80a51d74f985b8446292841cd0.zip |
In express mode, give the accounts first place than on this computer.
-rw-r--r-- | 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 c79b4b4707..cedd234cb1 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"))) |