diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-01-11 16:20:53 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-01-11 16:20:53 -0500 |
| commit | 567fd15eebdd44e50cef140419dbf7a336708109 (patch) | |
| tree | 3b3691719c704d6da4454bd78e17ec8b495ee76a /openbox/menuframe.c | |
| parent | 3e9dbc01430193035e3d1f5832c019c3f9623db8 (diff) | |
| parent | e8200ae603f33b70824c125ba6b37bfaec7d89ea (diff) | |
Merge branch 'backport' into work
Conflicts:
configure.ac
data/rc.xml
openbox/client.c
openbox/event.c
openbox/focus_cycle.c
openbox/focus_cycle_popup.c
openbox/openbox.c
openbox/prop.c
openbox/prop.h
openbox/screen.c
parser/parse.c
version.h.in
Diffstat (limited to 'openbox/menuframe.c')
| -rw-r--r-- | openbox/menuframe.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 57f29438..b235f5eb 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1300,7 +1300,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) @@ -1325,5 +1325,37 @@ 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); +} + +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); } |
