Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41504 - /branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc
  • From: gs@xxxxxxxxxxxxxxxx
  • Date: Mon, 22 Oct 2007 09:40:40 -0000
  • Message-id: <20071022094040.CFE09250B7@xxxxxxxxxxxxxxxx>
Author: gs
Date: Mon Oct 22 11:40:40 2007
New Revision: 41504

URL: http://svn.opensuse.org/viewcvs/yast?rev=41504&view=rev
Log:
handle KEX_RIGHT correctly

Modified:
    branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc

Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc?rev=41504&r1=41503&r2=41504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPopupMenu.cc Mon Oct 22 11:40:40 2007
@@ -45,7 +45,6 @@
   {
     YMenuItem * item = dynamic_cast<YMenuItem *> (*it);
     YUI_CHECK_PTR( item );
-
     row[0] = item->label();
     row[1] = item->hasChildren() ? "..." : "";
     YItem *tableItem = new YTableItem( row[0], row[1] );
@@ -79,9 +78,13 @@
   NCursesEvent ret;
   switch ( ch ) {
   case KEY_RIGHT:
-      if ( menu->findItem(getCurrentItem()+1 )->hasChildren() )
-       ret = NCursesEvent::button;
-    break;
+      {
+         YMenuItem * item =  menu->findItem( startIndex + getCurrentItem() );
+         YUI_CHECK_PTR( item );
+         if ( item->hasChildren() )
+             ret = NCursesEvent::button;
+         break;
+      }
   case KEY_LEFT:
     ret = NCursesEvent::cancel;
     ret.detail = NCursesEvent::CONTINUE;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages