2007-05-15 Murray Cumming <murrayc@murrayc.com>
+ * src/modest-tny-account-store.c: (get_server_accounts): Renamed from
+ get_accounts(), to make this clearer. Do not check for the enabled gconf
+ key, because we do not use this for server accounts (at least, not yet).
+ This allows us to send email again.
+
+2007-05-15 Murray Cumming <murrayc@murrayc.com>
+
* src/maemo/modest-platform.c:
(on_modest_conf_update_interval_changed), (modest_platform_init):
Only respond to this particular key change. All these strcmp()s cannot be
* for caching purposes
*/
static GSList*
-get_accounts (TnyAccountStore *self, TnyList *list, TnyAccountType type)
+get_server_accounts (TnyAccountStore *self, TnyList *list, TnyAccountType type)
{
ModestTnyAccountStorePrivate *priv = NULL;
GSList *account_names = NULL, *cursor = NULL;
gchar *account_name = (gchar*)cursor->data;
/* only return enabled accounts */
- if (modest_account_mgr_get_enabled(priv->account_mgr, account_name)) {
+ /* BUT server accounts can't be disabled. */
+ if (TRUE)
+ /* modest_account_mgr_get_enabled(priv->account_mgr, account_name)) */ {
TnyAccount *tny_account =
modest_tny_account_new_from_account (priv->account_mgr,
account_name,
if (tny_account) {
g_object_set_data (G_OBJECT(tny_account), "account_store",
(gpointer)self);
- tny_list_prepend (list, G_OBJECT(tny_account));
+ if (list)
+ tny_list_prepend (list, G_OBJECT(tny_account));
accounts = g_slist_append (accounts, tny_account); /* cache it */
} else
g_printerr ("modest: failed to create account for %s\n",
if (type == TNY_ACCOUNT_TYPE_STORE) {
TnyAccount *tny_account =
modest_tny_account_new_for_local_folders (priv->account_mgr, priv->session);
- tny_list_prepend (list, G_OBJECT(tny_account));
+ if (list)
+ tny_list_prepend (list, G_OBJECT(tny_account));
accounts = g_slist_append (accounts, tny_account); /* cache it */
}
return accounts;
if (request_type == TNY_ACCOUNT_STORE_STORE_ACCOUNTS) {
if (!priv->store_accounts)
- priv->store_accounts = get_accounts (self, list, TNY_ACCOUNT_TYPE_STORE);
+ priv->store_accounts = get_server_accounts (self, list, TNY_ACCOUNT_TYPE_STORE);
else
get_cached_accounts (self, list, TNY_ACCOUNT_TYPE_STORE);
} else if (request_type == TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS) {
-
if (!priv->transport_accounts)
priv->transport_accounts =
- get_accounts (self, list, TNY_ACCOUNT_TYPE_TRANSPORT);
+ get_server_accounts (self, list, TNY_ACCOUNT_TYPE_TRANSPORT);
else
get_cached_accounts (self, list, TNY_ACCOUNT_TYPE_TRANSPORT);
} else
break;
}
}
-
+
/* if we already found something, no need to search the transport accounts */
for (cursor = priv->transport_accounts; !account && cursor ; cursor = cursor->next) {
const gchar *acc_id = tny_account_get_id (TNY_ACCOUNT(cursor->data));