aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMengjie Yu <meng-jie.yu@sun.com>2005-01-21 14:18:54 +0800
committerHarry Lu <haip@src.gnome.org>2005-01-21 14:18:54 +0800
commit5d45c0d9ad123855fbc49b6f3ef3b60db037ba81 (patch)
treee93f74ef4a8f2b1f486a64b8f09117187adc920a /shell
parent17d98c0038927e86ea4f4fcb4f4713ccb2528775 (diff)
downloadgsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.gz
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.bz2
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.lz
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.xz
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.zst
gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.zip
Close import wizard on 'ESC'
2005-01-20 Mengjie Yu <meng-jie.yu@sun.com> * e-shell-importer.c: (import_druid_esc), (e_shell_importer_start_import): Close import wizard on 'ESC' svn path=/trunk/; revision=28477
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-importer.c15
2 files changed, 21 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 7f72aa0f65..cb86b14e55 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-20 Mengjie Yu <meng-jie.yu@sun.com>
+
+ * e-shell-importer.c: (import_druid_esc),
+ (e_shell_importer_start_import):
+ Close import wizard on 'ESC'
+
2005-01-09 JP Rosevear <jpr@novell.com>
* e-shell.c (impl_Shell_handleURI): open a new window if we get a
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 2ad0899580..b8f9fd019c 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -31,6 +31,7 @@
#include <string.h>
#include <glib.h>
+#include <gdk/gdkkeysyms.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-druid.h>
#include <libgnomeui/gnome-druid-page-edge.h>
@@ -933,6 +934,18 @@ import_druid_cancel (GnomeDruid *druid,
gtk_widget_destroy (GTK_WIDGET (data->dialog));
}
+static gboolean
+import_druid_esc (GnomeDruid *druid,
+ GdkEventKey *event,
+ ImportData *data)
+{
+ if (event->keyval == GDK_Escape) {
+ gtk_widget_destroy (GTK_WIDGET (data->dialog));
+ return TRUE;
+ } else
+ return FALSE;
+}
+
static void
import_druid_weak_notify (void *blah,
GObject *where_the_object_was)
@@ -1215,6 +1228,8 @@ e_shell_importer_start_import (EShellWindow *shell_window)
data->druid = glade_xml_get_widget (data->wizard, "druid1");
g_signal_connect (data->druid, "cancel",
G_CALLBACK (import_druid_cancel), data);
+ g_signal_connect (data->druid, "key_press_event",
+ G_CALLBACK (import_druid_esc), data);
gtk_button_set_use_underline ((GtkButton *)((GnomeDruid *)data->druid)->finish, TRUE);
gtk_button_set_label((GtkButton *)((GnomeDruid *)data->druid)->finish, _("_Import"));