/* list my signals */
enum {
PASSWORD_REQUESTED_SIGNAL,
- UPDATE_ACCOUNTS_SIGNAL,
+ ACCOUNT_UPDATE_SIGNAL,
LAST_SIGNAL
};
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
- signals[UPDATE_ACCOUNTS_SIGNAL] =
- g_signal_new ("update_accounts",
+ signals[ACCOUNT_UPDATE_SIGNAL] =
+ g_signal_new ("account_update",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET(ModestTnyAccountStoreClass, update_accounts),
+ G_STRUCT_OFFSET(ModestTnyAccountStoreClass, account_update),
NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
{
ModestTnyAccountStore *self = MODEST_TNY_ACCOUNT_STORE(user_data);
- g_signal_emit (G_OBJECT(self), signals[UPDATE_ACCOUNTS_SIGNAL], 0,
+ g_signal_emit (G_OBJECT(self), signals[ACCOUNT_UPDATE_SIGNAL], 0,
account);
}
{
ModestTnyAccountStore *self = MODEST_TNY_ACCOUNT_STORE(user_data);
- g_signal_emit (G_OBJECT(self), signals[UPDATE_ACCOUNTS_SIGNAL], 0,
+ g_signal_emit (G_OBJECT(self), signals[ACCOUNT_UPDATE_SIGNAL], 0,
account);
}
TnyAccountIface *account_iface;
account_name = (gchar*)cursor->data;
+
+ if (!modest_account_mgr_account_get_enabled (priv->account_mgr, account_name)) {
+ g_free (account_name);
+ cursor = cursor->next;
+ continue;
+ }
if (modest_type == MODEST_PROTO_TYPE_TRANSPORT || MODEST_PROTO_TYPE_ANY) {
server_account = get_server_account_for_account (self, account_name,
#include <tny-account-store.h>
#include <tny-session-camel.h>
#include <tny-shared.h>
+#include <modest-account-mgr.h>
/* other include files */
gchar* (*password_requested) (ModestTnyAccountStore *self,
const gchar *account_name,
gpointer user_data);
- void (*update_accounts) (ModestTnyAccountStore *self,
- const gchar *account_name,
- gpointer user_data);
+ void (*account_update) (ModestTnyAccountStore *self,
+ const gchar *account_name,
+ gpointer user_data);
};
/* member functions */
*
* Returns: newly created account store or NULL in case of error
*/
-ModestTnyAccountStore* modest_tny_account_store_new (ModestAccountMgr *modest_acc_mgr);
+ModestTnyAccountStore* modest_tny_account_store_new (ModestAccountMgr *account_mgr);
/**