summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-08-29 14:53:23 (GMT)
committerrathnor <rathnor>2004-08-29 14:53:23 (GMT)
commit680128f286d990549ea99eadbb4a6094f65cc461 (patch)
treeb8f31aee8b20c8e3f08831036bc0520de9b361c4
parente41bc330b402508541ec812dfe797cceae255f7f (diff)
downloadfluxbox_lack-680128f286d990549ea99eadbb4a6094f65cc461.zip
fluxbox_lack-680128f286d990549ea99eadbb4a6094f65cc461.tar.bz2
fix wrapping upwards in menu
-rw-r--r--ChangeLog2
-rw-r--r--src/FbTk/Menu.cc10
2 files changed, 5 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 81b70ce..1c221e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.10: 2Changes 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;