aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-message-browser.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-23 16:18:09 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-23 16:18:09 +0800
commit7eb6adbed960267ef2f240a7f268b97aa2c29984 (patch)
tree4c539bc216d90869aab4e42b4d571077d85b627e /mail/em-message-browser.c
parent977171ff51243dd2df800f9f1977902a704665d9 (diff)
downloadgsoc2013-evolution-7eb6adbed960267ef2f240a7f268b97aa2c29984.tar.gz
gsoc2013-evolution-7eb6adbed960267ef2f240a7f268b97aa2c29984.tar.zst
gsoc2013-evolution-7eb6adbed960267ef2f240a7f268b97aa2c29984.zip
Committing ChangeLog em-account-prefs.c em-format-html-display.c em-message-browser.c
svn path=/trunk/; revision=31272
Diffstat (limited to 'mail/em-message-browser.c')
-rw-r--r--mail/em-message-browser.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index f8e2d5bdd1..fb6369608e 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -37,6 +37,8 @@
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkbutton.h>
+#include <gdk/gdkkeysyms.h>
+
#include <gconf/gconf-client.h>
#include <camel/camel-folder.h>
@@ -214,6 +216,18 @@ GtkWidget *em_message_browser_new(void)
return (GtkWidget *)emmb;
}
+static int
+messagebrowser_key_pressed (EMMessageBrowser *emmb, GdkEventKey *event, void *user_data)
+{
+ if (event->keyval == GDK_Escape) {
+ gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
+ g_signal_stop_emission_by_name (emmb, "key-press-event");
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
GtkWidget *em_message_browser_window_new(void)
{
EMMessageBrowser *emmb;
@@ -257,6 +271,7 @@ GtkWidget *em_message_browser_window_new(void)
gtk_window_set_default_size ((GtkWindow *) emmb->window, window_size.width, window_size.height);
g_signal_connect (emmb->window, "size-allocate", G_CALLBACK (window_size_allocate), NULL);
g_signal_connect (((EMFolderView *) emmb)->list, "message_selected", G_CALLBACK (emmb_list_message_selected), emmb);
+ g_signal_connect (emmb, "key-press-event" , G_CALLBACK (messagebrowser_key_pressed), NULL);
/* cleanup? */