X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-account-store.c;h=5ed3484765de111e5c927a60923254dea7136495;hp=5344694401d12aa4d68c57dbef0b67e100a62567;hb=6f7aa1b5e15f3024db75ccfe3138f520c607dc5d;hpb=79acfb0d9e8e1ade6eedcc636cba74f7e9cfd939 diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 5344694..5ed3484 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -145,6 +145,9 @@ struct _ModestTnyAccountStorePrivate { /* 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), \ @@ -266,6 +269,7 @@ modest_tny_account_store_instance_init (ModestTnyAccountStore *obj) 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, @@ -509,6 +513,7 @@ show_wrong_password_dialog (TnyAccount *account) 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)); } } @@ -1645,7 +1650,7 @@ add_outbox_from_transport_account_to_global_outbox (ModestTnyAccountStore *self, 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); } @@ -2063,7 +2068,7 @@ modest_tny_account_store_find_msg_in_outboxes (ModestTnyAccountStore *self, 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)) { @@ -2205,3 +2210,24 @@ modest_tny_account_store_shutdown (ModestTnyAccountStore *self, 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; +}