From 70c074afe84ddbe4058f67a1fce062a769b449fc Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 8 Jan 2010 09:00:00 -0500 Subject: Use submenuShowDelay when navigating menus with the keyboard --- openbox/menuframe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openbox/menuframe.c') diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 076fe6ef..3d2b4302 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1289,7 +1289,7 @@ void menu_frame_select_previous(ObMenuFrame *self) } } } - menu_frame_select(self, it ? it->data : NULL, TRUE); + menu_frame_select(self, it ? it->data : NULL, FALSE); } void menu_frame_select_next(ObMenuFrame *self) @@ -1314,5 +1314,5 @@ void menu_frame_select_next(ObMenuFrame *self) } } } - menu_frame_select(self, it ? it->data : NULL, TRUE); + menu_frame_select(self, it ? it->data : NULL, FALSE); } -- cgit v1.2.3 From bafd9e9edcff0e18a03ef6f4e73d673e12a7c7ed Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 8 Jan 2010 09:04:25 -0500 Subject: make Home and End keys navigate to top/bottom of the active menu --- openbox/menuframe.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'openbox/menuframe.c') diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 3d2b4302..f013bdec 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1316,3 +1316,35 @@ void menu_frame_select_next(ObMenuFrame *self) } menu_frame_select(self, it ? it->data : NULL, FALSE); } + +void menu_frame_select_first(ObMenuFrame *self) +{ + GList *it = NULL; + + if (self->entries) { + for (it = self->entries; it; it = g_list_next(it)) { + ObMenuEntryFrame *e = it->data; + if (e->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) + break; + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) + break; + } + } + menu_frame_select(self, it ? it->data : NULL, FALSE); +} + +void menu_frame_select_last(ObMenuFrame *self) +{ + GList *it = NULL; + + if (self->entries) { + for (it = g_list_last(self->entries); it; it = g_list_previous(it)) { + ObMenuEntryFrame *e = it->data; + if (e->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) + break; + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) + break; + } + } + menu_frame_select(self, it ? it->data : NULL, FALSE); +} -- cgit v1.2.3