* Added modest_platform_create_folder_view
[modest] / src / widgets / modest-folder-view.c
index 6107645..e86574f 100644 (file)
@@ -43,6 +43,7 @@
 #include <tny-simple-list.h>
 #include <modest-tny-folder.h>
 #include <modest-tny-local-folders-account.h>
+#include <modest-tny-outbox-account.h>
 #include <modest-marshal.h>
 #include <modest-icon-names.h>
 #include <modest-tny-account-store.h>
@@ -729,6 +730,11 @@ filter_row (GtkTreeModel *model,
                                if (priv->visible_account_id && strcmp (account_id, priv->visible_account_id))
                                        retval = FALSE;
                        }
+                       
+                       /* Never show these to the user. They are merged into one folder 
+                        * in the local-folders account instead: */
+                       if (retval && MODEST_IS_TNY_OUTBOX_ACCOUNT (acc))
+                               retval = FALSE;
                }
        }
        
@@ -1657,8 +1663,6 @@ find_inbox_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *inbox_iter
        return FALSE;
 }
 
-
-
 void 
 modest_folder_view_select_first_inbox_or_local (ModestFolderView *self)
 {
@@ -1666,6 +1670,10 @@ modest_folder_view_select_first_inbox_or_local (ModestFolderView *self)
        GtkTreeIter iter, inbox_iter;
        GtkTreeSelection *sel;
 
+       /* Do not set it if the folder view was not painted */
+       if (!GTK_WIDGET_MAPPED (self))
+               return; 
+
        model = gtk_tree_view_get_model (GTK_TREE_VIEW (self));
        if (!model)
                return;