aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-20 21:26:50 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-05-20 21:47:21 +0800
commit584931b9c50f9390ba19d8609ac9917b570d6562 (patch)
tree51623c834860d9e51e9b4e1ce10633ab409c04a2
parent12c7f7de95068377ff60b23bdc5d80367d554c2b (diff)
downloadgsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar.gz
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar.bz2
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar.lz
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar.xz
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.tar.zst
gsoc2013-empathy-584931b9c50f9390ba19d8609ac9917b570d6562.zip
factor out fire_key_navigation_sig()
-rw-r--r--libempathy-gtk/empathy-live-search.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-live-search.c b/libempathy-gtk/empathy-live-search.c
index 3cb25a084..7296eb7c6 100644
--- a/libempathy-gtk/empathy-live-search.c
+++ b/libempathy-gtk/empathy-live-search.c
@@ -247,12 +247,21 @@ live_search_match_words (const gchar *string,
}
static gboolean
+fire_key_navigation_sig (EmpathyLiveSearch *self,
+ GdkEventKey *event)
+{
+ gboolean ret;
+
+ g_signal_emit (self, signals[KEYNAV], 0, event, &ret);
+ return ret;
+}
+
+static gboolean
live_search_entry_key_pressed_cb (GtkEntry *entry,
GdkEventKey *event,
gpointer user_data)
{
EmpathyLiveSearch *self = EMPATHY_LIVE_SEARCH (user_data);
- gboolean ret;
/* if esc key pressed, hide the search */
if (event->keyval == GDK_KEY_Escape)
@@ -264,8 +273,7 @@ live_search_entry_key_pressed_cb (GtkEntry *entry,
/* emit key navigation signal, so other widgets can respond to it properly */
if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down)
{
- g_signal_emit (self, signals[KEYNAV], 0, event, &ret);
- return ret;
+ return fire_key_navigation_sig (self, event);
}
return FALSE;