2007-06-12 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Tue, 12 Jun 2007 16:19:29 +0000 (16:19 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 12 Jun 2007 16:19:29 +0000 (16:19 +0000)
* src/modest-tny-account-store.c: (get_server_accounts):
        Call modest_tny_local_folders_account_add_merged_outbox_folders()
        even when there are no accounts, so that the Outbox folder is always
        visible. This fixes projects.maemo.org bug NB#60158.

pmo-trunk-r2188

ChangeLog2
src/modest-tny-account-store.c
src/modest-tny-local-folders-account.c

index 1db25b7..a9b5088 100644 (file)
@@ -1,3 +1,10 @@
+2007-06-12  Murray Cumming  <murrayc@murrayc.com>
+
+       * src/modest-tny-account-store.c: (get_server_accounts):
+       Call modest_tny_local_folders_account_add_merged_outbox_folders() 
+       even when there are no accounts, so that the Outbox folder is always 
+       visible. This fixes projects.maemo.org bug NB#60158.
+
 2007-06-12   Murray Cumming  <murrayc@murrayc.com>
 
        * src/maemo/modest-main-window.c: (create_details_widget):
index 6d18963..0bc71a9 100644 (file)
@@ -806,11 +806,13 @@ get_server_accounts  (TnyAccountStore *self, TnyList *list, TnyAccountType type)
                                g_object_ref (outbox_account);
                                accounts = g_slist_append (accounts, outbox_account);
                        }
+               }
+               
+               /* Add a merged folder, merging all the per-account outbox folders: */
+               modest_tny_local_folders_account_add_merged_outbox_folders (
+                       MODEST_TNY_LOCAL_FOLDERS_ACCOUNT (tny_account), priv->store_accounts_outboxes);
                        
-                       /* Add a merged folder, merging all the per-account outbox folders: */
-                       modest_tny_local_folders_account_add_merged_outbox_folders (
-                               MODEST_TNY_LOCAL_FOLDERS_ACCOUNT (tny_account), priv->store_accounts_outboxes);
-       
+               if (priv->store_accounts_outboxes) {
                        /* We have finished with this temporary list, so free it: */
                        account_list_free (priv->store_accounts_outboxes);
                        priv->store_accounts_outboxes = NULL;
index 7dd2c0d..1ef8ef0 100644 (file)
@@ -245,6 +245,7 @@ void modest_tny_local_folders_account_add_merged_outbox_folders (ModestTnyLocalF
        }
        
        /* Add the merged outbox folder to the virtual local-folders store: */
+       printf ("Debug: %s: adding merged outbox.\n", __FUNCTION__);
        modest_tny_local_folders_account_add_extra_folder (self, TNY_FOLDER(merged_outbox));
        g_object_unref (merged_outbox);
        merged_outbox = NULL;