diff options
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r-- | mail/mail-accounts.c | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 03eb142cc4..c258c28167 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -214,8 +214,25 @@ mail_delete (GtkButton *button, gpointer data) { MailAccountsDialog *dialog = data; MailConfigAccount *account; - - if (dialog->accounts_row >= 0) { + GnomeDialog *confirm; + GtkWidget *label; + int ans; + + if (dialog->accounts_row < 0) + return; + + confirm = GNOME_DIALOG (gnome_dialog_new (_("Are you sure you want to delete this account?"), + GNOME_STOCK_BUTTON_YES, GNOME_STOCK_BUTTON_NO, NULL)); + gtk_window_set_policy (GTK_WINDOW (confirm), TRUE, TRUE, TRUE); + gtk_window_set_modal (GTK_WINDOW (confirm), TRUE); + label = gtk_label_new (_("Are you sure you want to delete this account?")); + gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); + gtk_box_pack_start (GTK_BOX (confirm->vbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + gnome_dialog_set_parent (confirm, GTK_WINDOW (dialog)); + ans = gnome_dialog_run_and_close (confirm); + + if (ans == 0) { int sel, row, len; sel = dialog->accounts_row; @@ -307,8 +324,25 @@ news_delete (GtkButton *button, gpointer data) { MailAccountsDialog *dialog = data; MailConfigService *server; - - if (dialog->news_row >= 0) { + GnomeDialog *confirm; + GtkWidget *label; + int ans; + + if (dialog->news_row < 0) + return; + + confirm = GNOME_DIALOG (gnome_dialog_new (_("Are you sure you want to delete this news account?"), + GNOME_STOCK_BUTTON_YES, GNOME_STOCK_BUTTON_NO, NULL)); + gtk_window_set_policy (GTK_WINDOW (confirm), TRUE, TRUE, TRUE); + gtk_window_set_modal (GTK_WINDOW (confirm), TRUE); + label = gtk_label_new (_("Are you sure you want to delete this news account?")); + gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); + gtk_box_pack_start (GTK_BOX (confirm->vbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + gnome_dialog_set_parent (confirm, GTK_WINDOW (dialog)); + ans = gnome_dialog_run_and_close (confirm); + + if (ans == 0) { int row, len; server = gtk_clist_get_row_data (dialog->news_accounts, dialog->news_row); |