aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-debug-window.c
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2009-10-17 20:13:54 +0800
committerJonny Lamb <jonnylamb@gnome.org>2009-10-17 20:13:54 +0800
commit4e360483d0a8dedc613faee420b8ace496243b05 (patch)
treeb1c5c13a6ebc8dfd0ec967b70d64e739529ca7e6 /src/empathy-debug-window.c
parent5c1565562c5d71d7b4d2fa1a2b7aca040e0eb0ce (diff)
downloadgsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar.gz
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar.bz2
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar.lz
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar.xz
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.tar.zst
gsoc2013-empathy-4e360483d0a8dedc613faee420b8ace496243b05.zip
debug-window: add C-w keybinding to close the window
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'src/empathy-debug-window.c')
-rw-r--r--src/empathy-debug-window.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index 39280d820..373da3320 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -24,6 +24,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
+#include <gdk/gdkkeysyms.h>
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
@@ -1068,6 +1069,20 @@ debug_window_copy_clicked_cb (GtkToolButton *tool_button,
g_free (text);
}
+static gboolean
+debug_window_key_press_event_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data)
+{
+ if (event->state & GDK_CONTROL_MASK && event->keyval == GDK_w)
+ {
+ gtk_widget_destroy (widget);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static GObject *
debug_window_constructor (GType type,
guint n_construct_params,
@@ -1091,6 +1106,9 @@ debug_window_constructor (GType type,
gtk_window_set_title (GTK_WINDOW (object), _("Debug Window"));
gtk_window_set_default_size (GTK_WINDOW (object), 800, 400);
+ g_signal_connect (object, "key-press-event",
+ G_CALLBACK (debug_window_key_press_event_cb), NULL);
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (object), vbox);
gtk_widget_show (vbox);