aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2010-07-29 22:53:28 +0800
committerFelix Kaser <f.kaser@gmx.net>2010-07-29 22:53:28 +0800
commitdf5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34 (patch)
tree8c4a83faca6522e980cf72b65c57ef4957509e14 /libempathy-gtk/empathy-individual-view.c
parentf42a546df394424e9ca71e123e2482bcc021ed82 (diff)
downloadgsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar.gz
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar.bz2
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar.lz
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar.xz
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.tar.zst
gsoc2013-empathy-df5cfb43b2c1bb9d0cd5f55b7397cfd327aedd34.zip
added return value for the keynav signal
now the hook widget can decide if it wants to handle the event or not. in case of the treeview this allows us to navigate in the search entry with left and right and navigate in the treeview with up and down since those are catched by the treeview
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 92bdeacf5..a479268a0 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1283,23 +1283,27 @@ individual_view_search_activate_cb (GtkWidget *search,
}
}
-static void
+static gboolean
individual_view_search_key_navigation_cb (GtkWidget *search,
GdkEvent *event,
EmpathyIndividualView *view)
{
GdkEventKey *eventkey = ((GdkEventKey *) event);
+ gboolean ret = FALSE;
+
if (eventkey->keyval == GDK_Up || eventkey->keyval == GDK_Down)
{
GdkEvent *new_event;
new_event = gdk_event_copy (event);
gtk_widget_grab_focus (GTK_WIDGET (view));
- gtk_widget_event (GTK_WIDGET (view), new_event);
+ ret = gtk_widget_event (GTK_WIDGET (view), new_event);
gtk_widget_grab_focus (search);
gdk_event_free (new_event);
}
+
+ return ret;
}
static void