X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-account.c;h=7128471198111cf35e14bc4c81ecc22917d07fb6;hp=57a58e7c4817cb475808c838c3772fa4af758cc7;hb=5879161f031517a16b4c516e90700b647cb62b1e;hpb=a279e17c3a6251f4e4e87c61c51e7ee20b875507 diff --git a/src/modest-tny-account.c b/src/modest-tny-account.c index 57a58e7..7128471 100644 --- a/src/modest-tny-account.c +++ b/src/modest-tny-account.c @@ -28,6 +28,7 @@ */ #include +#include #include #include #include @@ -119,7 +120,7 @@ modest_tny_account_get_special_folder (TnyAccount *account, * returning an empty list. murrayc. */ tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account), folders, NULL, FALSE, &error); if (error) { - g_warning ("%s: tny_folder_store_get_folders() failed:%s\n", __FUNCTION__, error->message); + g_debug ("%s: tny_folder_store_get_folders() failed:%s\n", __FUNCTION__, error->message); g_error_free (error); goto cleanup; } @@ -361,6 +362,7 @@ modest_tny_account_new_from_server_account_name (ModestAccountMgr *account_mgr, ModestProtocol *protocol; const gchar* proto_name = NULL; tny_account_set_id (tny_account, server_account_name); + tny_account_set_name (tny_account, server_account_name); tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (tny_account), session); protocol = modest_protocol_registry_get_protocol_by_type (protocol_registry, modest_server_account_settings_get_protocol (server_settings)); proto_name = modest_protocol_get_name (protocol); @@ -424,7 +426,7 @@ set_online_callback (TnyCamelAccount *account, gboolean canceled, GError *err, g TNY_ACCOUNT (account), TNY_ALERT_TYPE_ERROR, FALSE, err); } - g_warning ("err: %s", err->message); + g_debug ("err: %s", err->message); } } @@ -605,7 +607,7 @@ on_modest_file_system_info (HildonFileSystemInfoHandle *handle, GetMmcAccountNameData *callback_data = (GetMmcAccountNameData*)data; if (error) { - g_warning ("%s: error=%s", __FUNCTION__, error->message); + g_debug ("%s: error=%s", __FUNCTION__, error->message); } TnyAccount *account = TNY_ACCOUNT (callback_data->account); @@ -1024,12 +1026,20 @@ modest_tny_folder_store_is_remote (TnyFolderStore *folder_store) if (account != NULL) { if (tny_account_get_account_type (account) == TNY_ACCOUNT_TYPE_STORE) { - if (!TNY_IS_CAMEL_POP_STORE_ACCOUNT (account) && - !TNY_IS_CAMEL_IMAP_STORE_ACCOUNT (account)) { - /* This must be a maildir account, which does - * not require a connection: */ - result = FALSE; - } + ModestProtocolType proto_type; + const gchar *tag; + ModestProtocolRegistry *registry; + + proto_type = modest_tny_account_get_protocol_type (account); + registry = modest_runtime_get_protocol_registry (); + tag = MODEST_PROTOCOL_REGISTRY_REMOTE_STORE_PROTOCOLS; + if (modest_protocol_registry_protocol_type_has_tag (registry, + proto_type, + tag)) { + result = TRUE; + } else { + result = FALSE; + } } g_object_unref (account); } else {