/* 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,
static void
show_wrong_password_dialog (TnyAccount *account)
{
-<<<<<<< .working
- /* This is easier than using a struct for the user_data: */
- ModestTnyAccountStore *self = modest_runtime_get_account_store();
- GtkWidget *dialog = NULL;
-
-=======
->>>>>>> .merge-right.r5668
if (g_object_get_data (G_OBJECT (account), "connection_specific") != NULL) {
modest_ui_actions_on_smtp_servers (NULL, NULL);
} else {
if (proto && MODEST_IS_ACCOUNT_PROTOCOL (proto)) {
ModestAccountSettingsDialog *dialog =
modest_account_protocol_get_account_settings_dialog (proto, modest_account_name);
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog), NULL);
gtk_widget_show (GTK_WIDGET (dialog));
}
}
GError *error)
{
ModestProtocolType protocol_type = MODEST_PROTOCOL_REGISTRY_TYPE_INVALID;
- ModestProtocol *protocol;
+ ModestProtocol *protocol = NULL;
const gchar* server_name = "";
gchar *prompt = NULL;
gboolean retval = TRUE;
case TNY_SERVICE_ERROR_UNAVAILABLE:
/* You must be working online for this operation */
case TNY_SERVICE_ERROR_CONNECT:
- prompt = modest_protocol_get_translation (protocol, MODEST_PROTOCOL_TRANSLATION_CONNECT_ERROR, server_name);
+ if (protocol) {
+ prompt = modest_protocol_get_translation (protocol, MODEST_PROTOCOL_TRANSLATION_CONNECT_ERROR, server_name);
+ }
if (!prompt) {
g_return_val_if_reached (FALSE);
}
/* It seems that there's no better error to show with
* POP and IMAP because TNY_SERVICE_ERROR_AUTHENTICATE
* may appear if there's a timeout during auth */
- prompt = modest_protocol_get_translation (protocol, MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR, server_name);
+ if (protocol) {
+ prompt = modest_protocol_get_translation (protocol, MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR, server_name);
+ }
if (!prompt) {
g_return_val_if_reached (FALSE);
}
info = g_slice_new0 (AddOutboxInfo);
info->account_store = self;
info->transport_account = g_object_ref (transport_account);
- tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account_outbox), folders, NULL,
+ tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account_outbox), folders, NULL, FALSE,
add_outbox_from_transport_account_to_global_outbox_get_folders_cb, NULL, (gpointer) info);
g_object_unref (account_outbox);
}
TnyAccount *account = TNY_ACCOUNT (tny_iterator_get_current (acc_iter));
TnyIterator *folders_iter = NULL;
- tny_folder_store_get_folders (TNY_FOLDER_STORE (account), folders, NULL, NULL);
+ tny_folder_store_get_folders (TNY_FOLDER_STORE (account), folders, NULL, FALSE, NULL);
folders_iter = tny_list_create_iterator (folders);
while (msg == NULL && !tny_iterator_is_done (folders_iter)) {
g_free (op_data);
}
}
+
+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;
+}