X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-folder.c;h=62149cbc896fbe6215cc8301cd6bbf115d836d50;hp=01763ec48da396cffd07b8b034e72c28664705e3;hb=81bb7fae864f7a1c81d2bccc082e11eaee1a7bd6;hpb=b70734073cfc2ac74c63fa8e299d97cab7df7962 diff --git a/src/modest-tny-folder.c b/src/modest-tny-folder.c index 01763ec..62149cb 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 @@ -104,7 +104,7 @@ modest_tny_folder_guess_folder_type (TnyFolder *folder) const gchar* -modest_tny_folder_get_help_id (const TnyFolder *folder) +modest_tny_folder_get_help_id (TnyFolder *folder) { TnyFolderType type; const gchar* help_id = NULL; @@ -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, ... */ @@ -415,7 +418,7 @@ modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent, /* Get direct subfolders */ subfolders = tny_simple_list_new (); - tny_folder_store_get_folders (parent, subfolders, NULL, &err); + tny_folder_store_get_folders (parent, subfolders, NULL, FALSE, &err); /* Check names */ iter = tny_list_create_iterator (subfolders);