aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucian Langa <cooly@gnome.eu.org>2009-10-04 11:00:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-04 11:00:58 +0800
commit25ac75586b728ba8f23882e30b2b938f7cb4e78f (patch)
tree2452ca7ff34098f024df3b7d88a1f48ca3ee0b03
parent2d1c7da5ffb5d45c86145053d32594257b1f7c2a (diff)
downloadgsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar.gz
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar.bz2
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar.lz
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar.xz
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.tar.zst
gsoc2013-evolution-25ac75586b728ba8f23882e30b2b938f7cb4e78f.zip
Bug 597224 - Cannot close preferences window with escape key
-rw-r--r--widgets/misc/e-preferences-window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 52bda8eeac..f40dee180b 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -22,6 +22,7 @@
#include "e-preferences-window.h"
#include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
#include <e-util/e-util.h>
#define SWITCH_PAGE_INTERVAL 250
@@ -199,6 +200,7 @@ preferences_window_init (EPreferencesWindow *window)
GtkWidget *widget;
GHashTable *index;
const gchar *title;
+ GtkAccelGroup *accel_group;
index = g_hash_table_new_full (
g_str_hash, g_str_equal,
@@ -287,6 +289,12 @@ preferences_window_init (EPreferencesWindow *window)
G_CALLBACK (gtk_widget_hide), window);
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+ accel_group = gtk_accel_group_new ();
+ gtk_widget_add_accelerator (
+ widget, "activate", accel_group,
+ GDK_Escape, (GdkModifierType) 0,
+ GTK_ACCEL_VISIBLE);
+ gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
gtk_widget_grab_default (widget);
gtk_widget_show (widget);
}