/* Matches transport accounts and outbox folder */
GHashTable *outbox_of_transport;
+
+ /* is sending mail blocked? */
+ gboolean send_mail_blocked;
};
#define MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
priv->session = NULL;
priv->device = NULL;
priv->sighandlers = NULL;
+ priv->send_mail_blocked = FALSE;
priv->outbox_of_transport = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
/* Get a reference to myself */
self = MODEST_TNY_ACCOUNT_STORE (g_object_get_data (G_OBJECT(account), "account_store"));
priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
-
+
/* Ensure that we still have this account. It could happen
that a set_online was requested *before* removing an
account, and due to tinymail emits the get_password
MODEST_PROTOCOL_TRANSPORT_STORE_UNKNOWN;
const gchar* server_name = "";
gchar *prompt = NULL;
- gboolean retval;
+ gboolean retval = TRUE;
/* NOTE: account may be NULL in some cases */
g_return_val_if_fail (error, FALSE);
if (error->code == TNY_SERVICE_ERROR_CERTIFICATE)
retval = modest_platform_run_certificate_confirmation_dialog (server_name,
error->message);
- else {
+ else if (error->code == TNY_SERVICE_ERROR_AUTHENTICATE) {
modest_platform_run_information_dialog (NULL, prompt, TRUE);
/* Show the account dialog if it was wrong */
retval = TRUE;
}
+ g_debug ("%s: error code %d (%s", __FUNCTION__, error->code, error->message);
if (prompt)
g_free (prompt);
GtkWidget *
modest_tny_account_store_show_account_settings_dialog (ModestTnyAccountStore *self,
- const gchar *account_name)
+ const gchar *account_name)
{
ModestTnyAccountStorePrivate *priv;
gpointer dialog_as_gpointer = NULL;
GtkWidget *dialog;
dialog = (GtkWidget *) modest_account_settings_dialog_new ();
settings = modest_account_mgr_load_account_settings (priv->account_mgr, account_name);
- modest_account_settings_dialog_save_password (MODEST_ACCOUNT_SETTINGS_DIALOG (dialog));
modest_account_settings_dialog_set_account (MODEST_ACCOUNT_SETTINGS_DIALOG (dialog), settings);
g_object_unref (settings);
modest_account_settings_dialog_switch_to_user_info (MODEST_ACCOUNT_SETTINGS_DIALOG (dialog));
}
}
+
+gboolean
+modest_tny_account_store_is_send_mail_blocked (ModestTnyAccountStore *self)
+{
+ ModestTnyAccountStorePrivate *priv;
+
+ priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
+
+ return priv->send_mail_blocked;
+}
+
+void
+modest_tny_account_store_set_send_mail_blocked (ModestTnyAccountStore *self,
+ gboolean blocked)
+{
+ ModestTnyAccountStorePrivate *priv;
+
+ priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
+
+ priv->send_mail_blocked = blocked;
+}