aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-accounts.c42
2 files changed, 42 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9fcd07aa77..a294c45ba4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-accounts.c (mail_delete): Confirm thatt he user REALLY
+ wants to delete this account.
+ (news_delete): Same.
+
* mail-ops.c (mail_send_message): Changed the product string -
will change it to use User-Agent once I get the RFC/DRUMS draft or
whatever. Until then I'll stick with User-Agent.
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);