X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-tny-folder.c;h=54f6643ab897bd86e359cdbf3f1c898e623fddaa;hb=0caba6fbcbd5d6dfad79f9c640e23ebe1c9ff851;hp=1b678cb1d3ef3586004fe91dda6fe4272ffc191c;hpb=036bce718e28f72bbcc2b8823773e3fa2f1f3e58;p=modest diff --git a/src/modest-tny-folder.c b/src/modest-tny-folder.c index 1b678cb..54f6643 100644 --- a/src/modest-tny-folder.c +++ b/src/modest-tny-folder.c @@ -147,8 +147,10 @@ modest_tny_folder_get_rules (TnyFolder *folder) } } else { ModestTransportStoreProtocol proto; - TnyAccount *account = - modest_tny_folder_get_account ((TnyFolder*)folder); + TnyFolderType folder_type; + TnyAccount *account; + + account = modest_tny_folder_get_account ((TnyFolder*)folder); if (!account) return -1; /* no account: nothing is allowed */ @@ -166,6 +168,15 @@ modest_tny_folder_get_rules (TnyFolder *folder) } g_object_unref (G_OBJECT(account)); + + /* Neither INBOX not ROOT folders should me moveable */ + folder_type = tny_folder_get_folder_type (folder); + if ((folder_type == TNY_FOLDER_TYPE_INBOX) || + (folder_type == TNY_FOLDER_TYPE_ROOT)) { + rules |= MODEST_FOLDER_RULES_FOLDER_NON_DELETABLE; + rules |= MODEST_FOLDER_RULES_FOLDER_NON_MOVEABLE; + rules |= MODEST_FOLDER_RULES_FOLDER_NON_RENAMEABLE; + } } return rules; }