diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/FbTk/Menu.cc | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.10: | 2 | Changes for 0.9.10: |
3 | *04/08/29: | 3 | *04/08/29: |
4 | * Fix cycling using keys in menus (didn't wrap upwards) (Simon) | ||
5 | FbTk/Menu.cc | ||
4 | * Fix rendering bug when revisiting >1 column menus (Simon) | 6 | * Fix rendering bug when revisiting >1 column menus (Simon) |
5 | FbTk/Menu.cc | 7 | FbTk/Menu.cc |
6 | * Fix crash when extramenus not attached to windowmenu (Simon) | 8 | * Fix crash when extramenus not attached to windowmenu (Simon) |
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index b4ae45a..7e89016 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.76 2004/08/29 14:37:52 rathnor Exp $ | 25 | // $Id: Menu.cc,v 1.77 2004/08/29 14:53:23 rathnor Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -300,11 +300,9 @@ void Menu::nextItem() { | |||
300 | } | 300 | } |
301 | 301 | ||
302 | // restore old in case we changed which_press | 302 | // restore old in case we changed which_press |
303 | which_press = old_which_press; | 303 | which_press = old_which_press + 1; |
304 | if (!validIndex(which_press)) | 304 | if (!validIndex(which_press)) |
305 | which_press = 0; | 305 | which_press = 0; |
306 | else | ||
307 | which_press++; | ||
308 | 306 | ||
309 | 307 | ||
310 | if (menuitems[which_press] == 0) { | 308 | if (menuitems[which_press] == 0) { |
@@ -340,12 +338,10 @@ void Menu::prevItem() { | |||
340 | true); // transp | 338 | true); // transp |
341 | } | 339 | } |
342 | // restore old in case we changed which_press | 340 | // restore old in case we changed which_press |
343 | which_press = old_which_press; | 341 | which_press = old_which_press - 1; |
344 | 342 | ||
345 | if (!validIndex(which_press)) | 343 | if (!validIndex(which_press)) |
346 | which_press = menuitems.size() - 1; | 344 | which_press = menuitems.size() - 1; |
347 | else if (which_press - 1 >= 0) | ||
348 | which_press--; | ||
349 | 345 | ||
350 | if (menuitems[which_press] == 0) { | 346 | if (menuitems[which_press] == 0) { |
351 | m_active_index = -1; | 347 | m_active_index = -1; |