aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-accounts.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-27 06:57:35 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-27 06:57:35 +0800
commit5b1ec21060c4157176b0e44e623bc0d1e5f4bc14 (patch)
tree585c9665036f2b9eabfb54b3edfe751a9c0ef8b2 /mail/mail-accounts.c
parentfe8e875972c8cf22a2fa884e25bc1f5bb4ef6046 (diff)
downloadgsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar.gz
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar.bz2
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar.lz
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar.xz
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.tar.zst
gsoc2013-evolution-5b1ec21060c4157176b0e44e623bc0d1e5f4bc14.zip
Confirm thatt he user REALLY wants to delete this account. (news_delete):
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. svn path=/trunk/; revision=8398
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r--mail/mail-accounts.c42
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);