[Xfce4-commits] [xfce/xfce4-appfinder] 04/05: UX enh.: Focus text entry on key up press if first item is selected
noreply at xfce.org
noreply at xfce.org
Sat Aug 18 20:32:52 CEST 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-appfinder.
commit 31147b420e791421a4160be69cbae82102907e22
Author: Andre Miranda <andreldm at xfce.org>
Date: Sat Aug 18 14:54:20 2018 -0300
UX enh.: Focus text entry on key up press if first item is selected
Icon view not supported
---
src/appfinder-window.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 6524f09..88a3bf5 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -1441,6 +1441,7 @@ xfce_appfinder_window_treeview_key_press_event (GtkWidget *widget,
XfceAppfinderWindow *window)
{
GdkEvent ev;
+ GtkTreePath *path;
if (widget == window->view)
{
@@ -1451,8 +1452,19 @@ xfce_appfinder_window_treeview_key_press_event (GtkWidget *widget,
return TRUE;
}
+ if (event->keyval == GDK_KEY_Up)
+ {
+ if (xfce_appfinder_window_view_get_selected_path (window, &path))
+ {
+ if (!gtk_tree_path_prev (path))
+ gtk_widget_grab_focus (window->entry);
+ gtk_tree_path_free (path);
+ }
+
+ return FALSE;
+ }
+
if (event->keyval == GDK_KEY_Right ||
- event->keyval == GDK_KEY_Up ||
event->keyval == GDK_KEY_Down)
{
return FALSE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list