aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2008-06-20 18:45:46 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-06-20 18:45:46 +0800
commit3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781 (patch)
treec1182e0f94ca1ea787ac67aa9fa2060704005c46
parentfff94b888b4a28cf757b94732a1909973abc165e (diff)
downloadgsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar.gz
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar.bz2
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar.lz
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar.xz
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.tar.zst
gsoc2013-evolution-3f7fbeb14aa0ca80c692b6cf8a544878fd2ea781.zip
Multiple open dialogs is an usability issue and a potential HIG violation.
2008-06-20 Sankar P <psankar@novell.com> * mail-retract.c (retract_mail_settings): Multiple open dialogs is an usability issue and a potential HIG violation. Thanks to Akhil for pointing out. svn path=/trunk/; revision=35657
-rw-r--r--plugins/groupwise-features/ChangeLog7
-rw-r--r--plugins/groupwise-features/mail-retract.c13
2 files changed, 15 insertions, 5 deletions
diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog
index a88c62d7c5..f0587b07df 100644
--- a/plugins/groupwise-features/ChangeLog
+++ b/plugins/groupwise-features/ChangeLog
@@ -1,6 +1,13 @@
2008-06-20 Sankar P <psankar@novell.com>
* mail-retract.c (retract_mail_settings):
+ Multiple open dialogs is an usability issue
+ and a potential HIG violation.
+ Thanks to Akhil for pointing out.
+
+2008-06-20 Sankar P <psankar@novell.com>
+
+ * mail-retract.c (retract_mail_settings):
Check if cnc is valid before using it.
Fixes a crash.
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index 0ac6862916..65e187b8c7 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -43,6 +43,7 @@ static void retract_mail_settings (EPopup *ep, EPopupItem *item, void *data)
CamelStore *store = folder->parent_store;
char *id;
GtkWidget *confirm_dialog, *confirm_warning;
+ int n;
cnc = get_cnc (store);
@@ -62,7 +63,12 @@ static void retract_mail_settings (EPopup *ep, EPopupItem *item, void *data)
gtk_widget_set_size_request (confirm_dialog, 400, 100);
gtk_widget_show_all (confirm_dialog);
- if (gtk_dialog_run (GTK_DIALOG (confirm_dialog)) == GTK_RESPONSE_YES) {
+ n =gtk_dialog_run (GTK_DIALOG (confirm_dialog));
+
+ gtk_widget_destroy (confirm_warning);
+ gtk_widget_destroy (confirm_dialog);
+
+ if (n == GTK_RESPONSE_YES) {
if (e_gw_connection_retract_request (cnc, id, NULL, FALSE, FALSE) != E_GW_CONNECTION_STATUS_OK )
e_error_run (NULL, "org.gnome.evolution.message.retract:retract-failure", NULL);
@@ -72,10 +78,7 @@ static void retract_mail_settings (EPopup *ep, EPopupItem *item, void *data)
gtk_dialog_run (GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
}
- }
-
- gtk_widget_destroy (confirm_warning);
- gtk_widget_destroy (confirm_dialog);
+ }
}
}