Author: mlandres Date: Mon Jul 14 13:49:46 2008 New Revision: 49041 URL: http://svn.opensuse.org/viewcvs/yast?rev=49041&view=rev Log: Remove obsolete references to Script/Meaasge/Atom Modified: trunk/ncurses-pkg/src/NCPackageSelector.cc trunk/ncurses-pkg/src/NCPkgStatusStrategy.cc Modified: trunk/ncurses-pkg/src/NCPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPackageSelector... ============================================================================== --- trunk/ncurses-pkg/src/NCPackageSelector.cc (original) +++ trunk/ncurses-pkg/src/NCPackageSelector.cc Mon Jul 14 13:49:46 2008 @@ -139,7 +139,7 @@ // NCPackageSelectorPlugin::runPkgSelection } -bool NCPackageSelector::checkNow( bool *ok ) +bool NCPackageSelector::checkNow( bool *ok ) { bool ret = false; @@ -149,12 +149,12 @@ return ret; } -bool NCPackageSelector::verifySystem( bool *ok ) +bool NCPackageSelector::verifySystem( bool *ok ) { bool ret = false; depsPopup = new NCPkgPopupDeps( wpos( 3, 8 ), this ); - ret = depsPopup->showDependencies( NCPkgPopupDeps::S_Verify, ok ); + ret = depsPopup->showDependencies( NCPkgPopupDeps::S_Verify, ok ); YDialog::deleteTopmostDialog(); return ret; } @@ -172,9 +172,6 @@ p.saveStatezypp::SrcPackage (); p.saveStatezypp::Patch (); - // some future proofing - p.saveStatezypp::Message (); - p.saveStatezypp::Script (); p.saveStatezypp::Pattern (); //p.saveStatezypp::Language (); @@ -188,9 +185,6 @@ p.restoreStatezypp::SrcPackage (); p.restoreStatezypp::Patch (); - // some future proofing - p.restoreStatezypp::Message (); - p.restoreStatezypp::Script (); p.restoreStatezypp::Pattern (); //p.restoreStatezypp::Language (); @@ -211,11 +205,6 @@ diff = diff || p.diffStatezypp::Patch (); log << diff << endl; - // some future proofing - diff = diff || p.diffStatezypp::Message (); - log << diff << endl; - diff = diff || p.diffStatezypp::Script (); - log << diff << endl; diff = diff || p.diffStatezypp::Pattern (); log << diff << endl; @@ -247,11 +236,11 @@ else if ( event.widget == youHelpButton ) retVal = YouHelpHandler( event ); else if ( event.widget == filterPopup ) - { + { retVal = filterPopup->handleEvent(); } else if ( event.widget == filterMain ) - { + { retVal = filterMain->handleEvent(); } else if ( event.widget == searchField ) @@ -313,11 +302,11 @@ if ( patchPtr ) { string name = patchPtr->name(); - + string::iterator pos = search( name.begin(), name.end(), expr.begin(), expr.end(), ic_compare ); - + if ( pos != name.end() ) { // search sucessful @@ -481,7 +470,7 @@ return false; ZyppPatchContents patchContents( patchPtr->contents() ); - + yuiMilestone() << "Filtering for patch: " << patchPtr->name().c_str() << " number of atoms: " << patchContents.size() << endl ; @@ -577,7 +566,7 @@ { displayPatch = true; break; - } + } case NCPkgMenuFilter::F_Unneeded: // unneeded means not relevant or satisfied { if ( selectable->hasCandidateObj() && @@ -592,10 +581,10 @@ case NCPkgMenuFilter::F_Needed: // needed means relevant patches { // only shows patches relevant to the system - if ( selectable->hasCandidateObj() && + if ( selectable->hasCandidateObj() && selectable->candidateObj().isRelevant() ) { - // and only those that are needed + // and only those that are needed if ( ! selectable->candidateObj().isSatisfied() || // may be it is satisfied because is preselected selectable->candidateObj().status().isToBeInstalled() ) @@ -622,7 +611,7 @@ break; } default: - yuiWarning() << "Unknown patch filter" << endl; + yuiWarning() << "Unknown patch filter" << endl; } if ( displayPatch ) @@ -637,7 +626,7 @@ // // Gets ( and returns ) the current size of the widget at the replace // point and deletes it. -// +// wrect NCPackageSelector::deleteReplacePoint() { // delete current child of the ReplacePoint @@ -655,7 +644,7 @@ patchPkgs = 0; // NCPkgTable - type: T_PatchPkgs patchPkgsVersions = 0; // NCPkgTable - type: T_Availables } - + return oldSize; } @@ -665,12 +654,12 @@ // // Creates an NCPkgPackageDetails (a RichtText widget) which is // used to show the required information (called from NCPkgMenuView) -// -// +// +// void NCPackageSelector::showInformation() { wrect oldSize = deleteReplacePoint(); - + // show the rich text widget infoText = new NCPkgPackageDetails( replacePoint, " ", this); @@ -687,8 +676,8 @@ // // Creates an NCPkgTable (type T_Availables) which is used to show // the list of package versions (called from NCPkgMenuView) -// -// +// +// void NCPackageSelector::showVersionsList() { wrect oldSize = deleteReplacePoint(); @@ -710,12 +699,12 @@ versionsList->setTableType( NCPkgTable::T_Availables, strategy ); versionsList->fillHeader( ); versionsList->setSize( oldSize.Sze.W, oldSize.Sze.H ); - + versionsList->fillAvailableList( packageList->getSelPointer( packageList->getCurrentItem() ) ); versionsList->Redraw(); packageList->setKeyboardFocus(); - } + } } /////////////////////////////////////////////////////////////////// @@ -724,13 +713,13 @@ // // Creates an NCPkgTable (type T_PatchPkgs) which is used to show // the list of all packages belonging to a patch (called from NCPkgMenuView) -// -// +// +// void NCPackageSelector::showPatchPackages() { wrect oldSize = deleteReplacePoint(); NCPkgTable * packageList = PackageList(); - + // show a package table with packages belonging to a patch YTableHeader * tableHeader = new YTableHeader(); patchPkgs = new NCPkgTable( replacePoint, tableHeader ); @@ -749,7 +738,7 @@ patchPkgs->Redraw(); packageList->setKeyboardFocus(); - } + } } /////////////////////////////////////////////////////////////////// @@ -759,13 +748,13 @@ // Creates an NCPkgTable (type T_Availables) which is used to show // a list of all versions of all packages belonging to a patch // (called from NCPkgMenuView) -// -// +// +// void NCPackageSelector::showPatchPkgVersions() { wrect oldSize = deleteReplacePoint(); NCPkgTable * packageList = PackageList(); - + // show a package table with versions of the packages beloning to a patch YTableHeader * tableHeader = new YTableHeader(); patchPkgsVersions = new NCPkgTable( replacePoint, tableHeader ); @@ -842,7 +831,7 @@ } case RPMGroups: { - filterPopup = new NCPkgFilterRPMGroups ( replPoint, " ", this); + filterPopup = new NCPkgFilterRPMGroups ( replPoint, " ", this); filterPopup->setSize( oldSize.Sze.W, oldSize.Sze.H ); filterPopup->Redraw(); @@ -901,7 +890,7 @@ delete replaceChild; filter_desc = 0; searchSet = 0; - } + } if (b) { @@ -909,7 +898,7 @@ searchSet->setSize( oldSize.Sze.W, oldSize.Sze.H ); searchSet->Redraw(); } - else + else { filter_desc = new NCRichText( replPoint2, ""); filter_desc->setSize( oldSize.Sze.W, oldSize.Sze.H ); @@ -1503,7 +1492,7 @@ YAlignment * left1 = YUI::widgetFactory()->createLeft( hSplit ); filterMenu = new NCPkgMenuFilter( left1, NCPkgStrings::Filter(), this ); - + YAlignment * left2 = YUI::widgetFactory()->createLeft( hSplit ); actionMenu = new NCPkgMenuAction( left2, NCPkgStrings::Actions(), this ); @@ -1555,10 +1544,10 @@ youHelpButton = new NCPushButton ( ll, _("&Help")); YUI_CHECK_NEW( youHelpButton ); youHelpButton->setFunctionKey( 1 ); - + YAlignment *r = YUI::widgetFactory()->createRight( bottom_bar ); YLayoutBox * hSplit5 = YUI::widgetFactory()->createHBox( r ); - + // add the Cancel button cancelButton = new NCPushButton( hSplit5, _( "&Cancel" ) ); YUI_CHECK_NEW( cancelButton ); @@ -1568,7 +1557,7 @@ okButton = new NCPushButton( hSplit5, _( "&Accept" ) ); YUI_CHECK_NEW( okButton ); okButton->setFunctionKey( 10 ); - + } // @@ -1605,7 +1594,7 @@ YAlignment *l1 = YUI::widgetFactory()->createLeft( vbox_left ); patternLabel = new NCLabel( l1, " " ); - + // add the package table YTableHeader * tableHeader = new YTableHeader(); @@ -1616,7 +1605,7 @@ YUI_CHECK_NEW( pkgList ); NCPkgStatusStrategy * strategy; - // set table type and status strategy (either 'normal' package list or update list) + // set table type and status strategy (either 'normal' package list or update list) switch ( type ) { case NCPkgTable::T_Packages: @@ -1640,9 +1629,9 @@ packageLabel = YUI::widgetFactory()->createLabel ( hSplit2, "......................" ); new NCSpacing( hSplit2, YD_HORIZ, true, 0.5 ); - + actionMenu = new NCPkgMenuAction ( hSplit2, NCPkgStrings::Actions(), this ); - + replPoint2 = YUI::widgetFactory()->createReplacePoint( hbox_bottom ); replPoint2->setWeight(YD_HORIZ, 1); filter_desc = new NCRichText( replPoint2, " " ); @@ -1656,10 +1645,10 @@ YAlignment *ll = YUI::widgetFactory()->createLeft( bottom_bar ); helpMenu = new NCPkgMenuHelp (ll, _("&Help")); YUI_CHECK_NEW( helpMenu ); - + YAlignment *r = YUI::widgetFactory()->createRight( bottom_bar ); YLayoutBox * hSplit = YUI::widgetFactory()->createHBox( r ); - + // add the Cancel button cancelButton = new NCPushButton( hSplit, _( "&Cancel" ) ); YUI_CHECK_NEW( cancelButton ); Modified: trunk/ncurses-pkg/src/NCPkgStatusStrategy.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgStatusStrate... ============================================================================== --- trunk/ncurses-pkg/src/NCPkgStatusStrategy.cc (original) +++ trunk/ncurses-pkg/src/NCPkgStatusStrategy.cc Mon Jul 14 13:49:46 2008 @@ -68,14 +68,14 @@ ///////////////////////////////////////////////////////////////// // -// NCPkgStatusStrategy::setObjectStatus() +// NCPkgStatusStrategy::setObjectStatus() // // Informs the package manager about the status change // bool NCPkgStatusStrategy::setObjectStatus( ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr ) { bool ok = false; - + if ( !slbPtr ) { yuiError() << "Invalid package object" << endl; @@ -86,7 +86,7 @@ yuiMilestone() << "Set status of: " << slbPtr->name() << " to: " << newstatus << " returns: " << (ok?"true":"false") << endl; - + return ok; } @@ -103,12 +103,12 @@ { if ( !slbPtr ) return false; - + bool valid = true; ZyppStatus retStat = S_NoInst; ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); bool installed = !slbPtr->installedEmpty(); - + // get the new status switch ( key ) { @@ -159,7 +159,7 @@ valid = false; } break; - //this is the case for 'going back' i.e. S_Install -> S_NoInst, S_Update -> S_KeepInstalled + //this is the case for 'going back' i.e. S_Install -> S_NoInst, S_Update -> S_KeepInstalled //not for S_Del, since '+' key does this case '<': if ( oldStatus == S_Install @@ -167,19 +167,19 @@ { retStat = S_NoInst; } - else if ( oldStatus == S_Update + else if ( oldStatus == S_Update || oldStatus == S_AutoUpdate ) { retStat = S_KeepInstalled; } break; - case '!': // set S_Taboo + case '!': // set S_Taboo if ( !installed ) { retStat = S_Taboo; } break; - case '*': // set S_Protected + case '*': // set S_Protected if ( installed ) { retStat = S_Protected; @@ -193,7 +193,7 @@ if ( valid ) newStat = retStat; - + return valid; } @@ -210,10 +210,10 @@ { if ( !slbPtr ) return false; - + bool ok = true; - - ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); + + ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); ZyppStatus newStatus = oldStatus; switch ( oldStatus ) @@ -246,7 +246,7 @@ { yuiWarning() << "No candidate object for " << slbPtr->theObj()->name().c_str() << endl; newStatus = S_NoInst; - } + } break; case S_AutoInstall: //Correct transition is S_Taboo -> #254816 @@ -282,7 +282,7 @@ zypp::Resolver_Ptr resolver = zypp::getZYpp()->resolver(); // transactReskind() is obsolete -> use resolvePool() resolver->resolvePool(); - + #if 0 resolver->transactReset( zypp::ResStatus::APPL_LOW ); @@ -291,7 +291,6 @@ resolver->transactResKind( zypp::ResTraits<zypp::Pattern >::kind ); resolver->transactResKind( zypp::ResTraits<zypp::Language >::kind ); resolver->transactResKind( zypp::ResTraits<zypp::Patch >::kind ); - resolver->transactResKind( zypp::ResTraits<zypp::Atom >::kind ); #endif } @@ -338,12 +337,12 @@ { if ( !slbPtr ) return false; - + bool valid = true; ZyppStatus retStat = S_NoInst; ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); bool installed = !slbPtr->installedEmpty(); - + // get the new status switch ( key ) { @@ -367,12 +366,12 @@ || oldStatus == S_AutoDel) { retStat = S_KeepInstalled; - } + } else { valid = false; } - + break; case '>': if ( oldStatus == S_KeepInstalled @@ -396,7 +395,7 @@ if ( valid ) newStat = retStat; - + return valid; } @@ -414,10 +413,10 @@ { if ( !slbPtr ) return false; - + bool ok = true; - - ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); + + ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr ); ZyppStatus newStatus = oldStatus; switch ( oldStatus ) @@ -451,14 +450,14 @@ } newStat = newStatus; - + return ok; } #endif ///////////////////////////////////////////////////////////////// // -// PatchStatStrategy::setObjectStatus() +// PatchStatStrategy::setObjectStatus() // // Inform the package manager about the status change // of the patch @@ -478,7 +477,7 @@ << newstatus << " returns: " << (ok?"true":"false") << endl; // do a solver run - solveResolvableCollections(); + solveResolvableCollections(); return ok; } @@ -497,7 +496,7 @@ ///////////////////////////////////////////////////////////////// // -// SelectionStatStrategy::setObjectStatus() +// SelectionStatStrategy::setObjectStatus() // // Inform the package manager about the status change // of the selection @@ -606,7 +605,7 @@ ok = slbPtr->setStatus( status ); yuiMilestone() << "Set status of: " << slbPtr->name() << " to: " << status << " returns: " << (ok?"true":"false") << endl; - + // Set candidate ok = slbPtr->setCandidate( newCandidate ); yuiMilestone() << "Set user candidate returns: " << (ok?"true":"false") << endl; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org