aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 3c4d234b7..1b44d50ce 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
@@ -440,6 +441,24 @@ contact_list_view_button_press_event_cb (EmpathyContactListView *view,
return FALSE;
}
+static gboolean
+contact_list_view_key_press_event_cb (EmpathyContactListView *view,
+ GdkEventKey *event,
+ gpointer user_data)
+{
+ if (event->keyval == GDK_Menu) {
+ MenuPopupData *data;
+
+ data = g_slice_new (MenuPopupData);
+ data->view = view;
+ data->button = event->keyval;
+ data->time = event->time;
+ g_idle_add (contact_list_view_popup_menu_idle_cb, data);
+ }
+
+ return FALSE;
+}
+
static void
contact_list_view_row_activated_cb (EmpathyContactListView *view,
GtkTreePath *path,
@@ -1031,6 +1050,10 @@ empathy_contact_list_view_init (EmpathyContactListView *view)
G_CALLBACK (contact_list_view_button_press_event_cb),
NULL);
g_signal_connect (view,
+ "key-press-event",
+ G_CALLBACK (contact_list_view_key_press_event_cb),
+ NULL);
+ g_signal_connect (view,
"row-activated",
G_CALLBACK (contact_list_view_row_activated_cb),
NULL);