[empathy] roster-window: start live search on Ctrl+f



commit 0914fcf221a2d17f5c5042f4c3e69754b2f2bec4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Jan 4 14:17:51 2013 +0100

    roster-window: start live search on Ctrl+f

 src/empathy-roster-window.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index d2f6d54..a92b945 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -1047,13 +1047,17 @@ empathy_roster_window_finalize (GObject *window)
 static gboolean
 roster_window_key_press_event_cb  (GtkWidget *window,
     GdkEventKey *event,
-    gpointer user_data)
+    EmpathyRosterWindow *self)
 {
   if (event->keyval == GDK_KEY_T
       && event->state & GDK_SHIFT_MASK
       && event->state & GDK_CONTROL_MASK)
     empathy_chat_manager_call_undo_closed_chat ();
 
+  if (event->keyval == GDK_KEY_f
+      && event->state & GDK_CONTROL_MASK)
+    gtk_widget_show (self->priv->search_bar);
+
   return FALSE;
 }
 
@@ -2265,7 +2269,7 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
   gtk_widget_show (self->priv->main_vbox);
 
   g_signal_connect (self, "key-press-event",
-      G_CALLBACK (roster_window_key_press_event_cb), NULL);
+      G_CALLBACK (roster_window_key_press_event_cb), self);
 
   g_object_unref (gui);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]