X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-account-view-window.c;h=3279549cdbfe12865e6965004756a91c50deb3ed;hb=dc6f85efbd256ef1e02449f075dd94b462dee791;hp=498cd64ea95385185a7925b5851e1be83d162761;hpb=fd382dbc5face5a3cf26d4e9b3fa2f78b3afce4c;p=modest diff --git a/src/maemo/modest-account-view-window.c b/src/maemo/modest-account-view-window.c index 498cd64..3279549 100644 --- a/src/maemo/modest-account-view-window.c +++ b/src/maemo/modest-account-view-window.c @@ -196,12 +196,6 @@ on_delete_button_clicked (GtkWidget *button, ModestAccountViewWindow *self) account_name, FALSE); - if (removed && is_default) { - /* Set a different account as the default, so there is always at least one default: - * This is not specified, and might be the wrong behaviour. murrayc. */ - modest_account_mgr_set_first_account_as_default (account_mgr); - } - if (removed) { /* Show confirmation dialog ??? */ } else { @@ -225,17 +219,17 @@ on_edit_button_clicked (GtkWidget *button, ModestAccountViewWindow *self) /* Check whether any connections are active, and cancel them if * the user wishes. - * TODO: Check only for connections with this account, instead of all. - * Maybe we need a queue per account. */ - ModestMailOperationQueue* queue = modest_runtime_get_mail_operation_queue (); - if (modest_mail_operation_queue_num_elements(queue)) { + ModestAccountMgr* mgr = modest_runtime_get_account_mgr (); + ModestMailOperationQueue* queue = modest_runtime_get_mail_operation_queue(); + if (modest_account_mgr_account_is_busy(mgr, account_name)) { GtkWidget *note = hildon_note_new_confirmation (GTK_WINDOW (self), _("emev_nc_disconnect_account")); const int response = gtk_dialog_run (GTK_DIALOG(note)); gtk_widget_destroy (note); if (response == GTK_RESPONSE_OK) { - modest_mail_operation_queue_cancel_all(queue);; + /* FIXME: We should only cancel those of this account */ + modest_mail_operation_queue_cancel_all(queue); } else return;