diff options
author | Mengjie Yu <meng-jie.yu@sun.com> | 2005-01-21 14:18:54 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2005-01-21 14:18:54 +0800 |
commit | 5d45c0d9ad123855fbc49b6f3ef3b60db037ba81 (patch) | |
tree | e93f74ef4a8f2b1f486a64b8f09117187adc920a /shell/e-shell-importer.c | |
parent | 17d98c0038927e86ea4f4fcb4f4713ccb2528775 (diff) | |
download | gsoc2013-evolution-5d45c0d9ad123855fbc49b6f3ef3b60db037ba81.tar.gz 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/e-shell-importer.c')
-rw-r--r-- | shell/e-shell-importer.c | 15 |
1 files changed, 15 insertions, 0 deletions
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")); |