[yast-commit] r41141 - in /branches/tmp/sh/mod-ui/ncurses/src: NCAskForFile.cc NCPopupTextEntry.cc NCPopupTextEntry.h README_mod-ui pkg/NCPkgPopupDeps.cc
Author: gs Date: Thu Sep 27 15:31:52 2007 New Revision: 41141 URL: http://svn.opensuse.org/viewcvs/yast?rev=41141&view=rev Log: use setValue()/value() Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.cc branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.h branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc?rev=41141&r1=41140&r2=41141&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc Thu Sep 27 15:31:52 2007 @@ -209,7 +209,9 @@ fileName = new NCInputField( hSplit2, // label for text field showing the filename _( "&File name:" ), - false ); // passWordMode = false + false, + 100, + 50 ); // passWordMode = false fileName->setValue( iniFileName ); fileName->setInputMaxLength( 100 ); // FIXME @@ -325,7 +327,7 @@ fileList->fillList( ); if ( iniFileName == "" ) // show the currently selected file - fileName->setText( fileList->getCurrentFile() ); + fileName->setValue( fileList->getCurrentFile() ); } /////////////////////////////////////////////////////////////////// @@ -351,7 +353,7 @@ else if ( postevent.keySymbol == "CursorRight" ) { fileList->setKeyboardFocus(); - fileName->setText( fileList->getCurrentFile() ); + fileName->setValue( fileList->getCurrentFile() ); return true; } @@ -415,7 +417,8 @@ { if ( !postevent.result.isNull() ) { - fileName->setText( postevent.result->asString() ); + // FIXME - check this !!! + fileName->setValue( postevent.result->asString()->value() ); } } else @@ -483,10 +486,10 @@ // string NCAskForExistingFile::getFileName() { - if ( fileName->getText()->value() == "" ) + if ( fileName->value() == "" ) return fileList->getCurrentFile(); else - return fileName->getText()->value(); + return fileName->value(); } /////////////////////////////////////////////////////////////////// @@ -519,5 +522,5 @@ // string NCAskForSaveFileName::getFileName() { - return fileName->getText()->value(); + return fileName->value(); } Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.cc?rev=41141&r1=41140&r2=41141&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.cc Thu Sep 27 15:31:52 2007 @@ -28,8 +28,8 @@ // DESCRIPTION : // NCPopupTextEntry::NCPopupTextEntry( const wpos at, - const YCPString & label, - const YCPString & text, + const string & label, + const string & text, unsigned maxInput, unsigned maxFld, NCInputField::FTYPE t ) @@ -39,12 +39,15 @@ YWidgetOpt opt; //opt.notifyMode.setValue( true ); wtext = new NCInputField( this, - label->toString(), - false // passwordMode = false + label, + false, // passwordMode = false + maxInput, + maxFld ); wtext->setFldtype( t ); wtext->setReturnOnReturn( true ); - addChild( wtext ); + wtext->setNotify( true ); + //addChild( wtext ); } /////////////////////////////////////////////////////////////////// Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.h?rev=41141&r1=41140&r2=41141&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCPopupTextEntry.h Thu Sep 27 15:31:52 2007 @@ -45,16 +45,19 @@ public: NCPopupTextEntry( const wpos at, - const YCPString & label, - const YCPString & text, + const string & label, + const string & text, unsigned maxInput = 0, unsigned maxFld = 0, NCInputField::FTYPE t = NCInputField::PLAIN ); virtual ~NCPopupTextEntry(); - void setText( const YCPString & ntext ) { wtext->setText( ntext ); } - YCPString getText() { return wtext->getText(); } + void setValue( const string & ntext ) { wtext->setValue( ntext ); } + string value() { return wtext->value(); } + + //void setText( const YCPString & ntext ) { wtext->setText( ntext ); } + //YCPString getText() { return wtext->getText(); } }; /////////////////////////////////////////////////////////////////// Modified: branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui?rev=41141&r1=41140&r2=41141&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui (original) +++ branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui Thu Sep 27 15:31:52 2007 @@ -21,7 +21,8 @@ selectItem() added TODO: check selectItem() methods ! - YItem::index() is always -1 ??? (see debug in NCTree.cc, line 343) - - are the methods complete (methods from YTree and myPad() methods called correctly) + - are the methods complete and are the methods from YTree and myPad() + called correctly? wHandleInput() TODO: (oldCurrentItem != getCurrentItem()) doesn't return true for different items @@ -30,7 +31,8 @@ EVENTs ------ -remove YCPValue result; from NCursesEvent +TODO: remove YCPValue result; from NCursesEvent (check where 'result' is used, + maybe a string value can be used) RadioButtonGroup @@ -43,12 +45,48 @@ selectItem() added addItem (string, bool ) added -TO DO: test NCPkgPopupDeps which uses addItem +TODO: test NCPkgPopupDeps which uses addItem(string, bool) NCComboBox ---------- -listPopup(): Don't create widget NCPopupList on the stack!!! This leads to segfault when widgets are deleted from YUI at the end! call YDialog::deleteTopmostDialog(); to delete NCPopupList + +NCPopupMenu/NCMenuButton +------------------------- +Don't create NCPopupMenu on the stack - reason see above + +NCMenuButton +------------- +TODO: selection set correctly? + +Don't create NCAskForDirectory/NCAskForExistingFile/NCAskForExistingDirectory +on the stack (->YNCursesUI.cc) + +NCFrame +------- +whether a frame is strechable or not depends on the children, if a children is +stretchable, the frame also is stretchable +-> NCAskForDirectory/NCAskForFile: setStretchable for NCComboBox true + +NCInputField +------------ +TODO: what's the difference between InputMaxLength and maxInputLength ??? + +NCIntField +---------- +Don't create NCPopupTextEntry on the stack !!! + +NCPopupTextEntry +---------------- +YCP... removed + +NCDialog +-------- +TODO: Check whether NCPopupInfo is created/deleted correctly (YDialog::deleteTopmostDialog() missing or not?) + +NCPopupInfo +----------- +check NCPopupInfo (F1) Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc?rev=41141&r1=41140&r2=41141&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Thu Sep 27 15:31:52 2007 @@ -306,7 +306,7 @@ zypp::ResolverProblem_Ptr problem = problems[index].first; zypp::ProblemSolution_Ptr user_solution = problems[index].second; - details->setText( YCPString(problem->details()) ); + details->setValue( problem->details() ); details->setCurPos( 0 ); zypp::ProblemSolutionList solutions = problem->solutions (); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org