Folders draft, sent and outbox cannot have children
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 22 Dec 2008 11:34:13 +0000 (11:34 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 22 Dec 2008 11:34:13 +0000 (11:34 +0000)
pmo-trunk-r6976

src/widgets/modest-folder-view.c

index ff51e30..12514f6 100644 (file)
@@ -1667,6 +1667,12 @@ filter_row (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
 
                        capabilities = tny_folder_get_caps (TNY_FOLDER (instance));
                        retval = !(capabilities & TNY_FOLDER_CAPS_NOCHILDREN);
+
+                       if (retval) {
+                               retval = ((type != TNY_FOLDER_TYPE_DRAFTS) &&
+                                         (type != TNY_FOLDER_TYPE_OUTBOX) &&
+                                         (type != TNY_FOLDER_TYPE_SENT));
+                       }
                } else if (TNY_IS_ACCOUNT (instance)) {
                        retval = FALSE;
                }