Author: gs Date: Sat Nov 10 08:23:21 2007 New Revision: 41952 URL: http://svn.opensuse.org/viewcvs/yast?rev=41952&view=rev Log: use YMenuItem to store menu selection, create YMeuEvent(YMenuItem) to propagate the menu event Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc branches/tmp/sh/mod-ui/ncurses/src/NCurses.h branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc?rev=41952&r1=41951&r2=41952&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc Sat Nov 10 08:23:21 2007 @@ -197,9 +197,11 @@ NCursesEvent ret = NCursesEvent::menu; // FIXME - check this - YStringWidgetID * selectionID = new YStringWidgetID( findMenuItem( selection )->label() ); - ret.selection = selectionID; + // YStringWidgetID * selectionID = new YStringWidgetID( findMenuItem( selection )->label() ); + // ret.selection = selectionID; + ret.selection = findMenuItem( selection ); + YDialog::deleteTopmostDialog(); return ret; Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc?rev=41952&r1=41951&r2=41952&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc Sat Nov 10 08:23:21 2007 @@ -317,7 +317,7 @@ NCMIL << "LINK: " << ycpstr << endl; YStringWidgetID * selectionID = new YStringWidgetID( ycpstr ); //ret.selection = YCPString( ycpstr ); - ret.selection = selectionID; + //ret.selection = selectionID; } break; } Modified: branches/tmp/sh/mod-ui/ncurses/src/NCurses.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCurses.h?rev=41952&r1=41951&r2=41952&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCurses.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCurses.h Sat Nov 10 08:23:21 2007 @@ -88,7 +88,7 @@ Type type; NCWidget * widget; - YWidgetID * selection; // used for MenuEvent (the menu selection) + YMenuItem * selection; // used for MenuEvent (the menu selection) //YCPValue selection; YCPValue result; // can be used for any result Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc?rev=41952&r1=41951&r2=41952&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Sat Nov 10 08:23:21 2007 @@ -182,7 +182,8 @@ } else { - STREAM << "(" << OBJ.selection->toString() << ")"; // FIXME valuetype()??? + // FIXME: check this - was valuetype() see above + STREAM << "(" << OBJ.selection->label() << ")"; } return STREAM << " for " << OBJ.widget; } @@ -213,7 +214,7 @@ case menu: if ( selection ) - return new YMenuEvent( selection->toString() ); + return new YMenuEvent( selection ); else return 0; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org