+gboolean
+modest_account_mgr_set_first_account_as_default (ModestAccountMgr *self)
+{
+ gboolean result = FALSE;
+
+ gchar* account_name = modest_account_mgr_get_first_account_name(self);
+ if (account_name) {
+ result = modest_account_mgr_set_default_account (self, account_name);
+ g_free (account_name);
+ }
+ else
+ result = TRUE; /* If there are no accounts then it's not a failure. */
+
+ return result;
+}
+