X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-folder.c;h=57e865aca0c7cea4aef4420b50f8dc66c17802b6;hp=01763ec48da396cffd07b8b034e72c28664705e3;hb=94bf2a181e8b2644f037246b2fc3a70c865c22e2;hpb=b70734073cfc2ac74c63fa8e299d97cab7df7962 diff --git a/src/modest-tny-folder.c b/src/modest-tny-folder.c index 01763ec..57e865a 100644 --- a/src/modest-tny-folder.c +++ b/src/modest-tny-folder.c @@ -31,11 +31,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -168,17 +168,20 @@ modest_tny_folder_get_rules (TnyFolder *folder) break; } } else { - ModestTransportStoreProtocol proto; + ModestProtocolRegistry *protocol_registry; + ModestProtocolType protocol_type; TnyFolderType folder_type; TnyAccount *account; + protocol_registry = modest_runtime_get_protocol_registry (); + account = modest_tny_folder_get_account ((TnyFolder*)folder); if (!account) return -1; /* no account: nothing is allowed */ - proto = modest_protocol_info_get_transport_store_protocol (tny_account_get_proto (account)); + protocol_type = modest_tny_account_get_protocol_type (account); - if (proto == MODEST_PROTOCOL_STORE_IMAP) { + if (modest_protocol_registry_protocol_type_has_tag (protocol_registry, protocol_type, MODEST_PROTOCOL_REGISTRY_STORE_HAS_FOLDERS)) { rules = 0; } else { /* pop, nntp, ... */