[yast-commit] r42075 - in /branches/tmp/sh/mod-ui/ncurses/src/pkg: NCPackageSelector.cc NCPkgPopupSelection.cc NCPkgPopupSelection.h NCPkgPopupTree.cc
Author: gs Date: Thu Nov 15 13:45:26 2007 New Revision: 42075 URL: http://svn.opensuse.org/viewcvs/yast?rev=42075&view=rev Log: activate selection/pattern/language popup Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc?rev=42075&r1=42074&r2=42075&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc Thu Nov 15 13:45:26 2007 @@ -236,28 +236,29 @@ /////////////////////////////////////////////////////////////////// // -// createPopups +// createPopups() // -// Create all popups needed for the PackageSelector -// Don't create the popups any longer in constructur because the current dialog -// wouldn't be the PackageSelector dialog then but a PopupDialog and -// NCPackageSelectorPlugin:: runPkgSelection wouldn't find the selector widget. -// Call NCPackageSelector::createPopups() instead after the PackageSelector dialog -// is created (see NCPackageSelectorStart::showDefaultList()). +// Create all popups +// +// Don't create the popups any longer in constructur because the current dialog +// wouldn't be the PackageSelector dialog then but a PopupDialog and +// NCPackageSelectorPlugin:: runPkgSelection wouldn't find the selector widget. +// Call NCPackageSelector::createPopups() instead after the PackageSelector dialog +// is created (see NCPackageSelectorStart::showDefaultList()). // void NCPackageSelector::createPopups() { - if ( !youMode ) + if ( !youMode ) { -#if 0 // create the selections popup selectionPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Selection ); + // create the patterns popup patternPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Pattern ); // create language popup languagePopup = new NCPkgPopupSelection( wpos( 1,1 ), this, NCPkgPopupSelection::S_Language ); -#endif + // create the filter popup filterPopup = new NCPkgPopupTree( wpos( 1, 1 ), this ); } @@ -275,11 +276,10 @@ /////////////////////////////////////////////////////////////////// // // -// METHOD NAME : NCPackageSelector::getDefaultRpmGroup -// METHOD TYPE : YStringTreeitem +// getDefaultRpmGroup() // -// DESCRIPTION : returns the default RPM group, the packages of this group -// are displayed on PackageSelector start +// returns the default RPM group, the packages of this group +// are displayed on PackageSelector start // YStringTreeItem * NCPackageSelector::getDefaultRpmGroup() { Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc?rev=42075&r1=42074&r2=42075&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc Thu Nov 15 13:45:26 2007 @@ -93,23 +93,18 @@ // void NCPkgPopupSelection::createLayout( const string & label ) { - - YWidgetOpt opt; - // the vertical split is the (only) child of the dialog NCLayoutBox * split = new NCLayoutBox( this, YD_VERT ); // addChild( ) is obsolete (handled by new libyui) - opt.notifyMode.setValue( false ); - - //NCLabel * head = new NCLabel( split, opt, label ); new NCLabel( split, label, true, false ); // isHeading = true YTableHeader * tableHeader = new YTableHeader(); // add the selection list sel = new NCPkgTable( split, tableHeader ); sel->setPackager( packager ); + // set status strategy NCPkgStatusStrategy * strat = new SelectionStatStrategy(); @@ -131,23 +126,18 @@ sel->fillHeader(); - // FIXME - opt.notifyMode.setValue( true ); - - //NCLabel * help = new NCLabel( split, opt, YCPString(NCPkgNames::DepsHelpLine()) ); - // a help line for the dependency popup + // a help line for the selction/pattern/language popup new NCLabel( split, _( " [+] Select [-] Delete [>] Update " ), false, false ); - //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) ); new NCSpacing( split, YD_VERT, false, 0.4 ); // add an OK button - opt.key_Fxx.setValue( 10 ); okButton = new NCPushButton( split, NCPkgNames::OKLabel() ); YStringWidgetID * okID = new YStringWidgetID("ok"); - okButton->setId( okID ); - //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) ); + okButton->setId( okID ); + okButton->setFunctionKey(10); + new NCSpacing( split, YD_VERT, false, 0.4 ); } @@ -264,23 +254,29 @@ /////////////////////////////////////////////////////////////////// // // -// METHOD NAME : NCPkgPopupSelection::niceSize -// METHOD TYPE : void -// -// DESCRIPTION : +// METHOD NAME : NCPkgPopupSelection::preferredWidth +// METHOD TYPE : int // +int NCPkgPopupSelection::preferredWidth() +{ + return NCurses::cols()*2/3; +} -long NCPkgPopupSelection::nicesize(YUIDimension dim) +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCPkgPopupSelection::preferredHeight +// METHOD TYPE : int +// +int NCPkgPopupSelection::preferredHeight() { - long vdim; if ( NCurses::lines() > 20 ) - vdim = 20; + return 20; else - vdim = NCurses::lines()-4; - - return ( dim == YD_HORIZ ? NCurses::cols()*2/3 : vdim ); + return NCurses::lines()-4; } + /////////////////////////////////////////////////////////////////// // // Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h?rev=42075&r1=42074&r2=42075&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.h Thu Nov 15 13:45:26 2007 @@ -66,8 +66,8 @@ NCPkgPopupSelection( const wpos at, NCPackageSelector * pkg, SelType type ); virtual ~NCPkgPopupSelection(); - virtual long nicesize(YUIDimension dim); - + virtual int preferredWidth(); + virtual int preferredHeight(); void createLayout( const string & label ); Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc?rev=42075&r1=42074&r2=42075&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc Thu Nov 15 13:45:26 2007 @@ -303,7 +303,7 @@ while ( child ) { - NCMIL << "Rpm group (translated): " << child->value().translation() << endl; + NCDBG << "Rpm group (translated): " << child->value().translation() << endl; if ( parentClone ) { @@ -318,6 +318,9 @@ addItem( clone ); + // plain tree is build + clone = parentClone; + cloneTree( child, clone ); child = child->next(); } -- 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