|
Thank you, Anna. Then what do you think of this one? In this attachment, I've changed the words and the buttons. Anna Marie Dirks wrote: On Wed, 2003-09-10 at 16:58, Ettore Perazzoli wrote: |
Index: shell/e-shell-startup-wizard.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-startup-wizard.c,v
retrieving revision 1.41.4.2
diff -u -p -r1.41.4.2 e-shell-startup-wizard.c
--- shell/e-shell-startup-wizard.c 22 Jul 2003 09:29:30 -0000 1.41.4.2
+++ shell/e-shell-startup-wizard.c 11 Sep 2003 05:02:06 -0000
@@ -758,6 +758,39 @@ startup_wizard_delete (GnomeDruid *druid
return FALSE;
}
+static gboolean
+key_press_event_callback (GtkWidget *widget,
+ GdkEventKey *keyev,
+ SWData *data)
+{
+ if (keyev->keyval == GDK_Escape) {
+ GtkWidget *confirm_dialog;
+ gint returnvalue;
+
+ confirm_dialog = gtk_message_dialog_new (data->dialog, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ (gchar *)("If you quit the Evolution Setup Assistant now, all of the information "
+ "that you have entered will be forgotten. You will need to run this assistant again "
+ "before using Evolution.\n\nDo you want to quit using the Assistant now?\n"));
+
+ gtk_dialog_add_button (confirm_dialog,
+ (gchar *)("Cancel"),
+ GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button (confirm_dialog,
+ (gchar *)("Quit Assistant"),
+ GTK_RESPONSE_OK);
+
+ returnvalue = gtk_dialog_run ((GtkDialog *) confirm_dialog);
+ gtk_widget_destroy (confirm_dialog);
+
+ if (returnvalue == GTK_RESPONSE_OK) {
+ startup_wizard_cancel (data->druid, data);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
gboolean
e_shell_startup_wizard_create (void)
{
@@ -798,6 +831,9 @@ e_shell_startup_wizard_create (void)
g_signal_connect (data->druid, "cancel",
G_CALLBACK (startup_wizard_cancel), data);
+ g_signal_connect (data->dialog, "key_press_event",
+ G_CALLBACK (key_press_event_callback), data);
+
data->start = glade_xml_get_widget (data->wizard, "start-page");
data->finish = glade_xml_get_widget (data->wizard, "done-page");
g_return_val_if_fail (data->start != NULL, FALSE);
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1286.2.6
diff -u -p -r1.1286.2.6 ChangeLog
--- shell/ChangeLog 30 Jul 2003 13:57:14 -0000 1.1286.2.6
+++ shell/ChangeLog 11 Sep 2003 05:02:07 -0000
@@ -19,6 +19,12 @@
* e-shell-startup-wizard.c (e_shell_startup_wizard_create): connect
to "delete_event" signal with startup_wizard_delete. [#46284]
+2003-09-11 Charles Zhang <charles zhang sun com>
+
+ * e-shell-startup-wizard.c (e_shell_startup_wizard_create): connect
+ to "key_press_event" signal with key_press_event_callback.
+ (key_press_event): Handle `ESC` key press event. [#48145]
+
2003-07-10 Antonio Xu <antonio xu sun com>
* e-shell-importer.c: (show_import_wizard): use