[yast-commit] r41660 - /branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc
Author: gs Date: Wed Oct 31 11:20:34 2007 New Revision: 41660 URL: http://svn.opensuse.org/viewcvs/yast?rev=41660&view=rev Log: setSendKeyEvents( true ) for file/dirlist Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.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=41660&r1=41659&r2=41660&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc Wed Oct 31 11:20:34 2007 @@ -132,9 +132,6 @@ const string & headline, bool edit ) { - // FIXME - check all option settings - - YWidgetOpt opt; string startDir; startDir = checkIniDir( iniDir ); @@ -142,24 +139,12 @@ // the vertical split is the (only) child of the dialog NCLayoutBox * split = new NCLayoutBox( this, YD_VERT ); - // addChild() id obsolete (handled by new libyui) - - opt.notifyMode.setValue( false ); - - //the headline - //opt.isHeading.setValue( true ); - new NCLabel( split, headline, true, false ); // isHeading = true new NCSpacing( split, YD_VERT, false, 0.4 ); - opt.isHStretchable.setValue( true ); - NCFrame * frame = new NCFrame( split, "" ); - //NCLayoutBox * vSplit = new NCLayoutBox( frame, YD_VERT ); - opt.isEditable.setValue( false ); - opt.notifyMode.setValue( true ); // label for text field showing the selected dir dirName = new NCComboBox( frame, _( "Selected Directory:" ), false ); // editable = false; dirName->setNotify( true ); @@ -168,8 +153,6 @@ YStringWidgetID * dirID = new YStringWidgetID( idDirName ); dirName->setId( dirID ); - //new NCSpacing( vSplit, YD_VERT, false, 0.6 ); - // add the checkBox detailed NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ ); @@ -188,12 +171,12 @@ dirHeader->addColumn( _("Directory name") ); // add the list of directories - opt.keyEvents.setValue( true ); dirList = new NCDirectoryTable( hSplit1, dirHeader, NCFileSelection::T_Overview, YCPString(startDir) ); - + dirList->setSendKeyEvents( true ); + YStringWidgetID * dirListID = new YStringWidgetID( idDirList ); dirList->setId( dirListID ); @@ -209,27 +192,24 @@ filter, YCPString(startDir) ); + fileList->setSendKeyEvents( true ); YStringWidgetID * dirFileID = new YStringWidgetID( idFileList ); fileList->setId( dirFileID ); - - opt.notifyMode.setValue( false ); - opt.keyEvents.setValue( false ); - NCLayoutBox * hSplit2 = new NCLayoutBox( split, YD_HORIZ ); + // opt.isEditable.setValue( edit ); + // the NCInputField doesn't support mode editable/not editable any longer + // FIXME or let it like it is ???? + // add the text entry for the file name - opt.isEditable.setValue( edit ); // FIXME fileName = new NCInputField( hSplit2, // label for text field showing the filename _( "&File name:" ), - false, + false, // passWordMode = false 100, - 50 ); // passWordMode = false + 50 ); fileName->setValue( iniFileName ); - fileName->setInputMaxLength( 100 ); - // FIXME - // fileName->setMaxFld( 50); // label for text field showing the filter (e.g. *.bak) NCComboBox * extension = new NCComboBox( hSplit2, _( "Filter:" ), edit ); // editable as set in edit @@ -237,32 +217,27 @@ extension->addItem( filter, true ); // selected - //split->addChild( new NCSpacing( split, opt, 0.8, false, true ) ); new NCSpacing( split, YD_VERT, false, 0.8 ); // HBox for the buttons NCLayoutBox * hSplit3 = new NCLayoutBox( split, YD_HORIZ ); - opt.isHStretchable.setValue( true ); - //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) ); new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ); - opt.key_Fxx.setValue( 10 ); // see okButton - // add the OK button okButton = new NCPushButton( hSplit3, _( "&OK" ) ); okButton->setFunctionKey( 10 ); + okButton->setStretchable( YD_HORIZ, true ); YStringWidgetID * okID = new YStringWidgetID( idOk ); okButton->setId( okID ); new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 ); - opt.key_Fxx.setValue( 9 ); // see cancelButton - // add the Cancel button cancelButton = new NCPushButton( hSplit3, _( "&Cancel" ) ); cancelButton->setFunctionKey( 9 ); + cancelButton->setStretchable( YD_HORIZ, true ); YStringWidgetID * cancelID = new YStringWidgetID( idCancel ); cancelButton->setId( cancelID ); -- 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