summary refs log tree commit diff stats
path: root/src/fe-gtk/rawlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk/rawlog.c')
-rw-r--r--src/fe-gtk/rawlog.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c
index 6764034f..651ca1ec 100644
--- a/src/fe-gtk/rawlog.c
+++ b/src/fe-gtk/rawlog.c
@@ -86,7 +86,7 @@ rawlog_savebutton (GtkWidget * wid, server *serv)
 	return FALSE;
 }
 
-static void
+static gboolean
 rawlog_key_cb (GtkWidget * wid, GdkEventKey * key, gpointer userdata)
 {
 	/* Copy rawlog selection to clipboard when Ctrl+Shift+C is pressed,
@@ -99,13 +99,7 @@ rawlog_key_cb (GtkWidget * wid, GdkEventKey * key, gpointer userdata)
 	{
 		gtk_xtext_copy_selection (userdata);
 	}
-	/* close_rawlog is given to mg_create_generic_tab as
-	 * close_callback, it should take care of the rest.
-	 */
-	else if (key->keyval == GDK_Escape)
-	{
-		gtk_widget_destroy (wid);
-	}
+	return FALSE;
 }
 
 void
@@ -124,6 +118,7 @@ open_rawlog (struct server *serv)
 	serv->gui->rawlog_window =
 		mg_create_generic_tab ("RawLog", tbuf, FALSE, TRUE, close_rawlog, serv,
 							 640, 320, &vbox, serv);
+	gtkutil_destroy_on_esc (serv->gui->rawlog_window);
 
 	hbox = gtk_hbox_new (FALSE, 2);
 	gtk_container_add (GTK_CONTAINER (vbox), hbox);