*/
#include <modest-platform.h>
+#include <modest-defs.h>
#include <modest-tny-platform-factory.h>
#include <modest-tny-account.h>
#include <modest-tny-account-store.h>
* 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;
}
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);
TNY_ACCOUNT (account), TNY_ALERT_TYPE_ERROR, FALSE,
err);
}
- g_warning ("err: %s", err->message);
+ g_debug ("err: %s", err->message);
}
}
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);
void modest_tny_account_get_mmc_account_name (TnyStoreAccount* self, ModestTnyAccountGetMmcAccountNameCallback callback, gpointer user_data)
{
#ifndef MODEST_TOOLKIT_GTK
- /* Just use the hard-coded path for the single memory card,
+ /* Just use the path for the single memory card,
* rather than try to figure out the path to the specific card by
* looking at the maildir URI:
*/
- const gchar *uri_real = MODEST_MCC1_VOLUMEPATH_URI;
+ gchar *uri_real = g_strconcat (MODEST_MMC1_VOLUMEPATH_URI_PREFIX,
+ g_getenv (MODEST_MMC1_VOLUMEPATH_ENV),
+ NULL);
/*
gchar* uri = tny_account_get_url_string (TNY_ACCOUNT (self));
hildon_file_system_info_async_new(uri_real,
on_modest_file_system_info, callback_data /* user_data */);
- /* g_free (uri_real); */
+ g_free (uri_real);
}
/* g_free (uri); */
* via a derived TnyCamelStoreAccount ? */
const gboolean is_mmc =
location_filepath &&
- (strcmp (location_filepath, MODEST_MCC1_VOLUMEPATH) == 0);
+ (strcmp (location_filepath, g_getenv (MODEST_MMC1_VOLUMEPATH_ENV)) == 0);
/* The name of memory card locations will be updated asynchronously.
* This is just a default: */
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 {