[evolution-patches] Fix for bug#326795[Mailer]
- From: Ranjan Somani <sranjan novell com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Fix for bug#326795[Mailer]
- Date: Fri, 20 Jan 2006 17:19:48 +0530
Hi
Attached fix for Bug# 326795 – Pressing Esc key lets u close the window
http://bugzilla.gnome.org/show_bug.cgi?id=326795
Please Review
Thanks,
Ranjan
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3777
diff -u -p -r1.3777 ChangeLog
--- mail/ChangeLog 16 Jan 2006 15:59:03 -0000 1.3777
+++ mail/ChangeLog 20 Jan 2006 07:18:07 -0000
@@ -1,3 +1,10 @@
+2006-01-20 Ranjan Somani <sranjan novell com>
+
+
+ * em-message-browser.c: Pressing Esc key lets u close the window
+
+ Fixes #326795
+
2006-01-16 Harish Krishnaswamy <kharish novell com>
* mail-component.c: (impl__get_userCreatableItems):
Index: mail/em-message-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-message-browser.c,v
retrieving revision 1.23
diff -u -p -r1.23 em-message-browser.c
--- mail/em-message-browser.c 18 Dec 2005 08:24:26 -0000 1.23
+++ mail/em-message-browser.c 20 Jan 2006 07:18:12 -0000
@@ -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,19 @@ 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) {
+ printf("Escape pressed in e-msg-composer.c");
+ gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
+ g_signal_stop_emission_by_name (emmb, "key-press-event"); //implemented later
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
GtkWidget *em_message_browser_window_new(void)
{
EMMessageBrowser *emmb;
@@ -257,7 +272,7 @@ GtkWidget *em_message_browser_window_new
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? */
return (GtkWidget *)emmb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]