Re: [evolution-patches] Seeking review for bug #47447
- From: Maxx Cao <maxx cao sun com>
- To: Anna Marie Dirks <anna ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, evolution-patches <evolution-patches lists ximian com>, Yiming Cao <maxx cao sun com>
- Subject: Re: [evolution-patches] Seeking review for bug #47447
- Date: Sat, 16 Aug 2003 17:12:30 +0800
Hi Anna and Jeff,
I've just added a warning message before closing the mail-config-druid,
so that the users won't
lose their work easily by mistake. I hope this is better.
Please review. Thanks!
Anna Marie Dirks wrote:
Hi Jeff and Maxx.
Thanks for this patch, Maxx.
I am a bit concerned about this implementation, because if one
accidentally hits the "esc" key while using the druid, then the druid
window disappears, taking all of one's work with it. Since the "esc"
shortcut is not listed anywhere in the druid window or evo menus, the
naive user has really no reason to expect that pressing it could have a
very destructive consequence.
My recommendation is to show a warning message, just as is shown when
one presses "esc" from within the appointment editor, composer, etc,
which alerts the user that all of her data will be lost if she elects to
close the druid at that time.
Does that make sense to you, Maxx?
best wishes,
Anna
On Thu, 2003-08-07 at 11:47, Jeffrey Stedfast wrote:
I'm not sure it is a good idea for a druid to be closed with Escape?
Anna? opinions?
assuming this is something desirable, the patch looks ok to me.
Jeff
On Thu, 2003-08-07 at 02:27, Yiming Cao wrote:
Hi,
This little patch fixes bug #47447
<http://bugzilla.ximian.com/show_bug.cgi?id=47447>, "Add new mail
account window does not close on Esc". Now the "mail config druid" can be
closed when Esc is pressed.
Please review, thanks.
--
Best Regards
Maxx
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2789
diff -u -r1.2789 ChangeLog
--- ChangeLog 14 Aug 2003 21:06:59 -0000 1.2789
+++ ChangeLog 16 Aug 2003 09:07:30 -0000
@@ -1,3 +1,11 @@
+2003-08-16 Maxx Cao <maxx cao sun com>
+
+ ** For bug #47447
+
+ * mail-config-druid.c (druid_key_press): handle Esc key event.
+ (mail_config_druid_new): connect the druid window with
+ "key_press_event".
+
2003-08-13 Suresh Chandrasekharan <suresh chandrasekharan sun com>
* e-searching-tokenizer.c (searcher_next_token): Fix for 45818 (
Index: mail-config-druid.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config-druid.c,v
retrieving revision 1.100
diff -u -r1.100 mail-config-druid.c
--- mail-config-druid.c 16 Apr 2003 17:03:11 -0000 1.100
+++ mail-config-druid.c 16 Aug 2003 09:07:31 -0000
@@ -51,6 +51,8 @@
#include <evolution-wizard.h>
#include <e-util/e-account.h>
+#include <gdk/gdkkeysyms.h>
+
typedef enum {
MAIL_CONFIG_WIZARD_PAGE_NONE = -1,
MAIL_CONFIG_WIZARD_PAGE_IDENTITY,
@@ -620,6 +622,33 @@
return FALSE;
}
+static gboolean
+druid_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data)
+{
+ if (event->keyval == GDK_Escape){
+ MailConfigWizard *mcw = data;
+ GtkWidget *confirm_dialog;
+ GtkWidget *label;
+ int response;
+
+ confirm_dialog = gtk_dialog_new_with_buttons ("Quit?", NULL, GTK_DIALOG_MODAL,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ NULL);
+ label = gtk_label_new ("Are you sure to quit now?");
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (confirm_dialog)->vbox), label);
+ gtk_widget_show_all (confirm_dialog);
+
+ response = gtk_dialog_run (GTK_DIALOG (confirm_dialog));
+ gtk_widget_destroy (confirm_dialog);
+
+ if (response == GTK_RESPONSE_ACCEPT)
+ druid_cancel (mcw->druid, data);
+ return TRUE;
+ }
+ return FALSE;
+}
+
MailConfigDruid *
mail_config_druid_new (void)
@@ -632,6 +661,9 @@
mcw->druid = (GnomeDruid *)glade_xml_get_widget (mcw->gui->xml, "druid");
g_object_set_data (G_OBJECT (mcw->druid), "MailConfigWizard", mcw);
+ g_signal_connect (gtk_widget_get_parent (mcw->druid), "key_press_event",
+ G_CALLBACK (druid_key_press), (gpointer)mcw);
+
mcw->interior_pages = g_ptr_array_new ();
for (i = 0; i < num_wizard_pages; i++) {
page = glade_xml_get_widget (mcw->gui->xml,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]