Patch to compile Modest with the most recent changes
[modest] / src / modest-tny-local-folders-account.c
index 2e33871..6b2b6a8 100644 (file)
@@ -39,6 +39,7 @@
 #include <tny-camel-folder.h>
 #include <tny-merge-folder.h>
 #include <tny-simple-list.h>
+#include <tny-gtk-lockable.h>
 
 G_DEFINE_TYPE (ModestTnyLocalFoldersAccount, 
        modest_tny_local_folders_account, 
@@ -174,8 +175,8 @@ create_folder (TnyFolderStore *self,
 
        /* If the folder name is been used by our extra folders */
        if (modest_tny_local_folders_account_folder_name_in_use (MODEST_TNY_LOCAL_FOLDERS_ACCOUNT (self), name)) {
-               g_set_error (err, TNY_FOLDER_STORE_ERROR, 
-                            TNY_FOLDER_STORE_ERROR_CREATE_FOLDER,
+               g_set_error (err, TNY_SERVICE_ERROR, 
+                            TNY_SERVICE_ERROR_FOLDER_CREATE,
                             "Folder name already in use");
                return NULL;
        }
@@ -231,15 +232,11 @@ modest_tny_local_folders_account_add_folder_to_outbox (ModestTnyLocalFoldersAcco
        g_return_if_fail (MODEST_IS_TNY_LOCAL_FOLDERS_ACCOUNT (self));
        g_return_if_fail (TNY_IS_FOLDER (per_account_outbox));
 
-       /* We can not test it yet, because there is no API to set the
-          type of a folder */
-/*     g_return_if_fail (tny_folder_get_folder_type (per_account_outbox) == TNY_FOLDER_TYPE_OUTBOX); */
-
        priv = TNY_LOCAL_FOLDERS_ACCOUNT_GET_PRIVATE (self);
 
        /* Create on-demand */
        if (!priv->outbox_folder) {
-               priv->outbox_folder = TNY_MERGE_FOLDER (tny_merge_folder_new (_("mcen_me_folder_outbox")));
+               priv->outbox_folder = TNY_MERGE_FOLDER (tny_merge_folder_new_with_ui_locker (_("mcen_me_folder_outbox"), tny_gtk_lockable_new ()));
        
                /* Set type to outbox */
                tny_merge_folder_set_folder_type (priv->outbox_folder, TNY_FOLDER_TYPE_OUTBOX);