Hide accounts in folder view in fremantle and change the order of folders
authorJose Dapena Paz <jdapena@igalia.com>
Thu, 27 Nov 2008 11:01:50 +0000 (11:01 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Thu, 27 Nov 2008 11:01:50 +0000 (11:01 +0000)
pmo-drop-split-view-r6441

src/widgets/modest-folder-view.c

index 91d460a..81f7101 100644 (file)
@@ -1484,6 +1484,10 @@ filter_row (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
                return FALSE;
 
        if (TNY_IS_ACCOUNT (instance)) {
+#ifdef MODEST_TOOLKIT_HILDON2
+               /* In hildon 2.2 we don't show the account rows */
+               return FALSE;
+#else          
                TnyAccount *acc = TNY_ACCOUNT (instance);
                const gchar *account_id = tny_account_get_id (acc);
                
@@ -1506,6 +1510,7 @@ filter_row (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
                 * in the local-folders account instead: */
                if (retval && MODEST_IS_TNY_OUTBOX_ACCOUNT (acc))
                        retval = FALSE;
+#endif
        } else {
                GtkTreeIter parent;
 
@@ -1802,19 +1807,14 @@ get_cmp_pos (TnyFolderType t, TnyFolder *folder_store)
        }
        break;
        case TNY_FOLDER_TYPE_OUTBOX:
-       {
-               account = tny_folder_get_account (folder_store);
-               is_special = (get_cmp_rows_type_pos (G_OBJECT (account)) == 1);
-               g_object_unref (account);
-               return is_special?1:4;
-       }
-       break;
+               return 2;
+               break;
        case TNY_FOLDER_TYPE_DRAFTS:
        {
                account = tny_folder_get_account (folder_store);
                is_special = (get_cmp_rows_type_pos (G_OBJECT (account)) == 1);
                g_object_unref (account);
-               return is_special?2:4;
+               return is_special?1:4;
        }
        break;
        case TNY_FOLDER_TYPE_SENT: