After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326795 - "Esc" can't close the message window properly.
"Esc" can't close the message window properly.
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.6.x (obsolete)
Other All
: Normal minor
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-01-13 06:55 UTC by Cai Nan
Modified: 2013-09-13 00:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Pressing Esc key lets u close the window (2.12 KB, patch)
2006-01-20 11:45 UTC, Ranjan Somani
none Details | Review
I have made the suggested changes (2.03 KB, patch)
2006-01-23 06:39 UTC, Ranjan Somani
committed Details | Review

Description Cai Nan 2006-01-13 06:55:34 UTC
"Esc" should close the active message window.

Other information:
Double click a message in the message list , then it will be show in a new
window.We expect the window to be closed by "Esc", but it doesn't work.
Comment 1 Karsten Bräckelmann 2006-01-15 00:04:42 UTC
Confirming.

(Personal preference, I'm not sure how strict the HIG is WRT this, cause it's not a dialog, AFAIK.)
Comment 2 Srinivasa Ragavan 2006-01-17 17:18:21 UTC
hmm, when composer can, why not mail window..? 
Comment 3 Karsten Bräckelmann 2006-01-18 00:13:28 UTC
Well, I didn't say we can't. Actually, my preference is to enable Esc to close the mail window and implement this.

All I said is, that it likely wouldn't be correct according to HIG. I didn't read all of the HIG, though. And yes, I believe Esc clasing the Composer would be just as unwanted by the HIG as closing mail windows... If at all.

So I'll leave the decision up to you.
Comment 4 Srinivasa Ragavan 2006-01-18 03:57:54 UTC
I guess we'll do this. Its pretty handy to use (Enter and Escape) than Alt+F4. 
Comment 5 Ranjan Somani 2006-01-20 11:45:37 UTC
Created attachment 57719 [details] [review]
Pressing Esc key lets u close the window

Please review it...
Comment 6 Jeffrey Stedfast 2006-01-20 15:04:43 UTC
+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");

remove thsi printf, it's not even correct :)

+		gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
+		g_signal_stop_emission_by_name (emmb, "key-press-event"); //implemented later

don't use c++ style comments in code that must compile as c89

+		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);

put a SPACE after each comma. it just makes the code easier to read :)

 	/* cleanup? */
Comment 7 Ranjan Somani 2006-01-23 06:39:00 UTC
Created attachment 57895 [details] [review]
I have made the suggested changes
Comment 8 Srinivasa Ragavan 2006-01-23 08:21:13 UTC
Fixed to head.