Hello community,

here is the log from the commit of package libyui-ncurses-pkg for 
openSUSE:Leap:15.2 checked in at 2020-02-10 16:41:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/libyui-ncurses-pkg (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.libyui-ncurses-pkg.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui-ncurses-pkg"

Mon Feb 10 16:41:22 2020 rev:17 rq:772189 version:2.50.5

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/libyui-ncurses-pkg/libyui-ncurses-pkg.changes  
2020-02-04 17:54:52.812765959 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.libyui-ncurses-pkg.new.26092/libyui-ncurses-pkg.changes
       2020-02-10 16:41:30.227705460 +0100
@@ -1,0 +2,6 @@
+Thu Feb  6 15:24:40 UTC 2020 - Stefan Hundhammer <shundham...@suse.com>
+
+- Ask user for confirmation for retracted packages (bsc#1162145)
+- 2.50.5
+
+-------------------------------------------------------------------

Old:
----
  libyui-ncurses-pkg-2.50.4.tar.bz2

New:
----
  libyui-ncurses-pkg-2.50.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libyui-ncurses-pkg-doc.spec ++++++
--- /var/tmp/diff_new_pack.9lJfVb/_old  2020-02-10 16:41:30.539705679 +0100
+++ /var/tmp/diff_new_pack.9lJfVb/_new  2020-02-10 16:41:30.543705682 +0100
@@ -20,7 +20,7 @@
 %define so_version 11
 
 Name:           %{parent}-doc
-Version:        2.50.4
+Version:        2.50.5
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 

++++++ libyui-ncurses-pkg.spec ++++++
--- /var/tmp/diff_new_pack.9lJfVb/_old  2020-02-10 16:41:30.555705691 +0100
+++ /var/tmp/diff_new_pack.9lJfVb/_new  2020-02-10 16:41:30.555705691 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           libyui-ncurses-pkg
-Version:        2.50.4
+Version:        2.50.5
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 

++++++ libyui-ncurses-pkg-2.50.4.tar.bz2 -> libyui-ncurses-pkg-2.50.5.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/VERSION.cmake 
new/libyui-ncurses-pkg-2.50.5/VERSION.cmake
--- old/libyui-ncurses-pkg-2.50.4/VERSION.cmake 2020-01-24 07:40:20.000000000 
+0100
+++ new/libyui-ncurses-pkg-2.50.5/VERSION.cmake 2020-02-06 16:48:26.000000000 
+0100
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "2" )
 SET( VERSION_MINOR "50" )
-SET( VERSION_PATCH "4" )
+SET( VERSION_PATCH "5" )
 SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
 
 ##### This is need for the libyui core, ONLY.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg-doc.spec 
new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg-doc.spec
--- old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg-doc.spec   
2020-01-24 07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg-doc.spec   
2020-02-06 16:48:26.000000000 +0100
@@ -19,7 +19,7 @@
 %define so_version 11
 
 Name:           %{parent}-doc
-Version:        2.50.4
+Version:        2.50.5
 Release:        0
 Source:         %{parent}-%{version}.tar.bz2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg.changes 
new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg.changes
--- old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg.changes    
2020-01-24 07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg.changes    
2020-02-06 16:48:26.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Feb  6 15:24:40 UTC 2020 - Stefan Hundhammer <shundham...@suse.com>
+
+- Ask user for confirmation for retracted packages (bsc#1162145)
+- 2.50.5
+
+-------------------------------------------------------------------
 Thu Jan 23 09:23:11 UTC 2020 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
 
 - Add an option to include a "Search Online" option in the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg.spec 
new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg.spec
--- old/libyui-ncurses-pkg-2.50.4/package/libyui-ncurses-pkg.spec       
2020-01-24 07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/package/libyui-ncurses-pkg.spec       
2020-02-06 16:48:26.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           libyui-ncurses-pkg
-Version:        2.50.4
+Version:        2.50.5
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPackageSelector.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPackageSelector.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPackageSelector.cc      2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPackageSelector.cc      2020-02-06 
16:48:26.000000000 +0100
@@ -474,7 +474,7 @@
     if ( event == NCursesEvent::handled )
        return false;
 
-    yuiMilestone() << "widget event: " << event << endl;
+    // yuiMilestone() << "widget event: " << event << endl;
     // Call the appropriate handler
     if ( event == NCursesEvent::button )
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-ncurses-pkg-2.50.4/src/NCPackageSelectorPluginImpl.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPackageSelectorPluginImpl.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPackageSelectorPluginImpl.cc    
2020-01-24 07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPackageSelectorPluginImpl.cc    
2020-02-06 16:48:26.000000000 +0100
@@ -177,7 +177,7 @@
                result = ncSelector->handleEvent( event );
                 // reset to function keys of the main dialog
                 ncd->setStatusLine();
-               yuiMilestone() << "Result of handleEvent: " << 
(result?"true":"false") << endl;
+               // yuiMilestone() << "Result of handleEvent: " << 
(result?"true":"false") << endl;
            }
            while ( event != NCursesEvent::cancel && result == true );
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgFilterLocale.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgFilterLocale.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgFilterLocale.cc      2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgFilterLocale.cc      2020-02-06 
16:48:26.000000000 +0100
@@ -58,6 +58,7 @@
 
 }
 
+
 NCPkgLocaleTable::NCPkgLocaleTable( YWidget *parent, YTableHeader 
*tableHeader, NCPackageSelector *pkg )
     :NCTable( parent, tableHeader )
     , packager(pkg)
@@ -66,6 +67,7 @@
    fillLocaleList();
 }
 
+
 void NCPkgLocaleTable::fillHeader()
 {
     std::vector <std::string> header;
@@ -78,6 +80,7 @@
     setHeader( header);
 }
 
+
 void NCPkgLocaleTable::addLine ( zypp::sat::LocaleSupport l,  const 
std::vector <std::string> & cols, std::string status )
 {
     // use default ctor, add cell in the next step
@@ -96,6 +99,7 @@
 
 }
 
+
 std::string NCPkgLocaleTable::status( zypp::Locale lang )
 {
     ZyppStatus status;
@@ -117,6 +121,7 @@
     }
 }
 
+
 void NCPkgLocaleTable::fillLocaleList()
 {
     std::vector <std::string> oneLine;
@@ -134,6 +139,7 @@
     myPad()->setOrder(1);
 }
 
+
 NCPkgLocaleTag* NCPkgLocaleTable::getTag (const int & index )
 {
    NCTableLine *line = myPad()->ModifyLine( index );
@@ -150,6 +156,7 @@
    return tag;
 }
 
+
 zypp::sat::LocaleSupport NCPkgLocaleTable::getLocale( int index )
 {
     NCPkgLocaleTag *t = getTag( index );
@@ -157,6 +164,7 @@
         return t->getLocale();
 }
 
+
 void NCPkgLocaleTable::showLocalePackages()
 {
     int index = getCurrentItem();
@@ -182,7 +190,8 @@
     packageList->showInformation();
 }
 
-void NCPkgLocaleTable::toggleStatus()
+
+void NCPkgLocaleTable::cycleStatus()
 {
     int index = getCurrentItem();
     zypp::sat::LocaleSupport myLocale = getLocale( index );
@@ -207,6 +216,7 @@
     cellChanged( index, 0,  status( myLocale.locale() ) );
 }
 
+
 NCursesEvent NCPkgLocaleTable::wHandleInput( wint_t ch )
 {
     NCursesEvent ret = NCursesEvent::none;
@@ -227,7 +237,7 @@
        case KEY_SPACE:
        case KEY_RETURN:
            ret = NCursesEvent::handled;
-           toggleStatus();
+           cycleStatus();
            showLocalePackages();
            break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgFilterLocale.h 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgFilterLocale.h
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgFilterLocale.h       2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgFilterLocale.h       2020-02-06 
16:48:26.000000000 +0100
@@ -87,7 +87,7 @@
     NCPkgLocaleTag* getTag (const int & index );
     zypp::sat::LocaleSupport getLocale( int index );
     std::string status( zypp::Locale lang );
-    void toggleStatus();
+    void cycleStatus();
     NCursesEvent wHandleInput( wint_t ch );
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgMenuAction.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgMenuAction.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgMenuAction.cc        2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgMenuAction.cc        2020-02-06 
16:48:26.000000000 +0100
@@ -68,7 +68,7 @@
     {
        // Please note: add an appropriate number of whitespaces to get a well
        // formated menu (the [ ]s should be in one column) and use unique 
hotkeys until end:
-       // begin: Actions menu, toggle the status of a package, e.g. change 
from installed to delete
+       // begin: Actions menu, cycle the status of a package, e.g. change from 
installed to delete
        toggleItem =  new YMenuItem( _( "&Toggle    [SPACE]" ) );
        installItem = new YMenuItem( _( "&Install     [+]" ) );
        deleteItem =  new YMenuItem( _( "&Delete      [-]" ) );
@@ -128,7 +128,7 @@
 
     if (event.selection == toggleItem)
     {
-       pkgList->toggleObjStatus();
+       pkgList->cycleObjStatus();
     }
     else if (event.selection ==  installItem)
     {
@@ -171,7 +171,9 @@
        pkgList->changeListObjStatus( NCPkgTable::A_Update );
     }
     else
-       yuiError() << "zatim nic" << endl;
+    {
+       yuiError() << "No action performed." << endl;
+    }
 
     if ( pkg->VersionsList() )
         pkg->VersionsList()->updateTable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgStatusStrategy.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgStatusStrategy.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgStatusStrategy.cc    2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgStatusStrategy.cc    2020-02-06 
16:48:26.000000000 +0100
@@ -53,6 +53,7 @@
 
 using std::endl;
 
+
 //------------------------------------------------------------
 // Base class for strategies to handle status
 //------------------------------------------------------------
@@ -71,6 +72,7 @@
 {
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // NCPkgStatusStrategy::getPackageStatus()
@@ -78,7 +80,7 @@
 // Gets status from package manager
 //
 ZyppStatus NCPkgStatusStrategy::getPackageStatus( ZyppSel slbPtr,
-                                                ZyppObj objPtr )
+                                                  ZyppObj objPtr )
 {
     if ( slbPtr )
     {
@@ -91,6 +93,7 @@
     }
 }
 
+
 /////////////////////////////////////////////////////////////////
 //
 // NCPkgStatusStrategy::setObjectStatus()
@@ -110,11 +113,12 @@
     ok = slbPtr->setStatus( newstatus );
 
     yuiMilestone() << "Set status of: " <<  slbPtr->name() << " to: "
-         << newstatus << " returns: " << (ok?"true":"false") << endl;
+                   << newstatus << " returns: " << ( ok ? "true" : "false" ) 
<< endl;
 
     return ok;
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // NCPkgStatusStrategy::keyToStatus()
@@ -122,9 +126,9 @@
 // Returns the corresponding status
 //
 bool NCPkgStatusStrategy::keyToStatus( const int & key,
-                                     ZyppSel slbPtr,
-                                     ZyppObj objPtr,
-                                     ZyppStatus & newStat )
+                                       ZyppSel slbPtr,
+                                       ZyppObj objPtr,
+                                       ZyppStatus & newStat )
 {
     if ( !slbPtr )
        return false;
@@ -148,6 +152,7 @@
                retStat = S_NoInst;
            }
            break;
+
        case '+':
            if ( oldStatus == S_NoInst
                 || oldStatus == S_AutoInstall )
@@ -169,6 +174,7 @@
                valid = false;
            }
            break;
+
        case '>':
            if ( oldStatus == S_KeepInstalled
                 ||  oldStatus == S_Del
@@ -184,8 +190,9 @@
                valid = false;
            }
            break;
-       // 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
+
+            // 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
                 || oldStatus == S_AutoInstall )
@@ -198,21 +205,25 @@
                retStat = S_KeepInstalled;
            }
            break;
+
        case '!':       // set S_Taboo
            if ( !installed )
            {
                retStat = S_Taboo;
            }
            break;
+
        case '*':       // set S_Protected
            if ( installed )
            {
                retStat = S_Protected;
            }
            break;
+
        default:
            yuiDebug() <<  "Key not valid" << endl;
            valid = false;
+            break;
     }
 
     if ( valid )
@@ -222,15 +233,15 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
 //
-// NCPkgStatusStrategy::toggleStatus()
+// Cycle the status patch to a new one and return the new status in
+// newStat_ret.
 //
-// Returns the new status
+// The function return value is 'true' if ok, 'false' if not.
 //
-bool NCPkgStatusStrategy::toggleStatus( ZyppSel slbPtr,
-                                      ZyppObj objPtr,
-                                      ZyppStatus & newStat )
+bool NCPkgStatusStrategy::cycleStatus( ZyppSel slbPtr,
+                                       ZyppObj objPtr,
+                                       ZyppStatus & newStat_ret )
 {
     if ( !slbPtr )
        return false;
@@ -246,12 +257,15 @@
        case S_Del:
            newStatus = S_KeepInstalled;
            break;
+
        case S_Install:
            newStatus =S_NoInst;
            break;
+
        case S_Update:
            newStatus = S_Del;
            break;
+
        case S_KeepInstalled:
            if ( patPtr )
                newStatus = S_Install;
@@ -265,6 +279,7 @@
                newStatus = S_Del;
            }
            break;
+
        case S_NoInst:
            if ( slbPtr->hasCandidateObj() || patPtr )
             {
@@ -276,31 +291,37 @@
                newStatus = S_NoInst;
             }
            break;
+
        case S_AutoInstall:
            // this used to be taboo before, but now ZYpp supports
            // saving weak locks (unselected packages)
            newStatus = S_NoInst;
            break;
+
        case S_AutoDel:
            newStatus = S_KeepInstalled;
            break;
+
        case S_AutoUpdate:
            newStatus = S_KeepInstalled;
            break;
+
        case S_Taboo:
            newStatus = S_NoInst;
            break;
+
        case S_Protected:
            newStatus = S_KeepInstalled;
            break;
     }
 
     yuiMilestone() << "Status toogled: old " << oldStatus << ", new " << 
newStatus << endl;
-    newStat = newStatus;
+    newStat_ret = newStatus;
 
     return ok;
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // NCPkgStatusStrategy::solveResolvableCollections()
@@ -364,7 +385,7 @@
     bool isRelevant = slbPtr->candidateObj().isRelevant();
     bool isBroken = slbPtr->candidateObj().isBroken();
 
-    yuiMilestone() << slbPtr->name() << ": " << (toBeInst?"to be 
installed":"not to be installed,")
+    yuiMilestone() << slbPtr->name() << ": " << (toBeInst?"to be installed" : 
"not to be installed,")
                    << " old status: " << oldStatus << endl;
 
     // get the new status
@@ -428,15 +449,16 @@
     return valid;
 }
 
-///////////////////////////////////////////////////////////////////
+
 //
-// PatchStatStrategy::toggleStatus()
+// Cycle the status patch to a new one and return the new status in
+// newStat_ret.
 //
-// Returns the new status
+// The function return value is 'true' if ok, 'false' if not.
 //
-bool PatchStatStrategy::toggleStatus( ZyppSel slbPtr,
-                                     ZyppObj objPtr,
-                                     ZyppStatus & newStat )
+bool PatchStatStrategy::cycleStatus( ZyppSel slbPtr,
+                                     ZyppObj objPtr,
+                                     ZyppStatus & newStat_ret )
 {
     if ( !slbPtr || !slbPtr->hasCandidateObj() )
        return false;
@@ -453,12 +475,15 @@
        case S_AutoInstall:
            newStatus = S_NoInst;
            break;
+
        case S_KeepInstalled:
             newStatus = S_Install;
            break;
+
        case S_NoInst:
            newStatus = S_Install;
            break;
+
        case S_Taboo:
             if ( isBroken )
             {
@@ -469,12 +494,14 @@
                 newStatus = S_NoInst;
             }
            break;
+
        default:
            newStatus = oldStatus;
+            break;
     }
-    yuiMilestone() << "Status toogled: old " << oldStatus << ", new " << 
newStatus << endl;
 
-    newStat = newStatus;
+    yuiMilestone() << "Status toogled: old " << oldStatus << ", new " << 
newStatus << endl;
+    newStat_ret = newStatus;
 
     return ok;
 }
@@ -499,7 +526,7 @@
 
     ok = slbPtr->setStatus( newstatus );
     yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
-         << newstatus << " returns: " << (ok?"true":"false") << endl;
+                   << newstatus << " returns: " << ( ok ? "true" : "false" ) 
<< endl;
 
     // do a solver run
     solveResolvableCollections();
@@ -507,6 +534,7 @@
     return ok;
 }
 
+
 //------------------------------------------------------------
 // Class for strategies for selections
 //------------------------------------------------------------
@@ -519,6 +547,7 @@
 {
 }
 
+
 /////////////////////////////////////////////////////////////////
 //
 // SelectionStatStrategy::setObjectStatus()
@@ -538,7 +567,7 @@
 
     ok = slbPtr->setStatus( newstatus );
     yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
-         << newstatus << " returns: " << (ok?"true":"false") << endl;
+                   << newstatus << " returns: " << ( ok ? "true" : "false" ) 
<< endl;
 
     // do a solver run -> solver runs in NCPkgTable::changeStatus()
     // solveResolvableCollections();
@@ -546,6 +575,7 @@
     return ok;
 }
 
+
 //------------------------------------------------------------
 // Class for strategies for depndencies
 //------------------------------------------------------------
@@ -558,6 +588,7 @@
 {
 }
 
+
 //------------------------------------------------------------
 // Class for strategies to get status for available packages
 //------------------------------------------------------------
@@ -570,6 +601,7 @@
 {
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // AvailableStatStrategy::setObjectStatus
@@ -577,7 +609,8 @@
 // Informs the package manager about the new status (sets the candidate)
 //
 bool AvailableStatStrategy::setObjectStatus( ZyppStatus newstatus,
-                                             ZyppSel slbPtr, ZyppObj objPtr )
+                                             ZyppSel slbPtr,
+                                             ZyppObj objPtr )
 {
     bool ok = false;
 
@@ -597,8 +630,7 @@
 
         if ( slbPtr->installedObj() &&
              slbPtr->installedObj()->edition() == newCandidate->edition() &&
-             slbPtr->installedObj()->vendor() == newCandidate->vendor()
-             )
+             slbPtr->installedObj()->vendor()  == newCandidate->vendor() )
         {
             yuiMilestone() << "Identical package installed" << endl;
             // Switch back to the original instance -
@@ -630,13 +662,13 @@
 
         // Set candidate
         ok = bool( slbPtr->setCandidate( newCandidate ) );
-        yuiMilestone() << "Set user candidate returns: " <<  
(ok?"true":"false") << endl;
+        yuiMilestone() << "Set user candidate returns: " <<  ( ok ? "true" : 
"false" ) << endl;
         if ( ok )
         {
             // Set status
             ok = slbPtr->setStatus( status );
             yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
-                           << status << " returns: " << (ok?"true":"false") << 
endl;
+                           << status << " returns: " << ( ok ? "true" : 
"false" ) << endl;
         }
     }
 
@@ -656,6 +688,7 @@
 {
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // MultiVersionStatStrategy::getPackageStatus()
@@ -675,6 +708,7 @@
     return slbPtr->pickStatus( itemPtr );
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // MultiVersionStatStrategy::setObjectStatus
@@ -683,7 +717,8 @@
 // informs the package manager about the new status.
 //
 bool MultiVersionStatStrategy::setObjectStatus( ZyppStatus newstatus,
-                                                ZyppSel slbPtr, ZyppObj objPtr 
)
+                                                ZyppSel slbPtr,
+                                                ZyppObj objPtr )
 {
     bool ok = false;
 
@@ -706,7 +741,7 @@
        {
            ok = slbPtr->setPickStatus( itemPtr, newstatus );
            yuiMilestone() << "Set new status of: "<< slbPtr->name() << ", " << 
objPtr->edition()
-                          << " to: " << newstatus << " returns: " <<  
(ok?"true":"false") << endl;
+                          << " to: " << newstatus << " returns: " <<  ( ok ? 
"true" : "false" ) << endl;
         }
        else
        {
@@ -717,15 +752,13 @@
     {
         ok = slbPtr->setPickStatus( itemPtr, newstatus );
         yuiMilestone() << "Set new status of: "<< slbPtr->name() << ", " << 
objPtr->edition()
-                       << " to: " << newstatus << " returns: " <<  
(ok?"true":"false") << endl;
+                       << " to: " << newstatus << " returns: " <<  ( ok ? 
"true" : "false" ) << endl;
     }
 
     return ok;
 }
 
-///////////////////////////////////////////////////////////////////
-//
-// MultiVersionStatStrategy::anyMultiVersionToInstall
+
 //
 // Check if any package version is marked for installation where its
 // 'multiversion' flag is set to 'multiversion'.
@@ -765,6 +798,7 @@
     return false;
 }
 
+
 ///////////////////////////////////////////////////////////////////
 //
 // MultiVersionStatStrategy::mixedMultiVersionPopup
@@ -801,8 +835,6 @@
 }
 
 
-
-
 //------------------------------------------------------------
 // Class for strategies to get status for update packages
 //------------------------------------------------------------
@@ -828,8 +860,10 @@
 {
 }
 
+
 bool PatchPkgStatStrategy::setObjectStatus( ZyppStatus newstatus,
-                                            ZyppSel slbPtr, ZyppObj objPtr )
+                                            ZyppSel slbPtr,
+                                            ZyppObj objPtr )
 {
     // it is not possible to set the status of the packages belonging to a 
certain patch
     return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgStatusStrategy.h 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgStatusStrategy.h
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgStatusStrategy.h     2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgStatusStrategy.h     2020-02-06 
16:48:26.000000000 +0100
@@ -91,22 +91,20 @@
                              ZyppStatus & newStat );
 
     /**
-     * Toggles the package status (e.g. from installed to delete)
-     * @param The object pointer
-     * @return bool
+     * Cyle the package status (e.g. from installed to delete)
      */
-    virtual bool toggleStatus( ZyppSel slbPtr,
-                              ZyppObj objPtr,
-                               ZyppStatus & newStat );
-     /**
-    * Do a "small" solver run for all "resolvable collections", i.e., for
-    * selections, patterns, languages, patches.
-    **/
-    void       solveResolvableCollections();
-
+    virtual bool cycleStatus( ZyppSel slbPtr,
+                              ZyppObj objPtr,
+                              ZyppStatus & newStat_ret );
+    /**
+     * Do a "small" solver run for all "resolvable collections", i.e., for
+     * selections, patterns, languages, patches.
+     **/
+    void solveResolvableCollections();
 
 };
 
+
 //------------------------------------------------------------
 // Class for strategies to handle status of packages
 //------------------------------------------------------------
@@ -218,13 +216,11 @@
                              ZyppStatus & newStat );
 
     /**
-     * Toggles the patch status (e.g. from selected to unselected)
-     * @param The object pointer
-     * @return bool
+     * Cycle the patch status (e.g. from selected to unselected)
      */
-    virtual bool toggleStatus( ZyppSel slbPtr,
-                              ZyppObj objPtr,
-                               ZyppStatus & newStat );
+    virtual bool cycleStatus( ZyppSel slbPtr,
+                              ZyppObj objPtr,
+                              ZyppStatus & newStat_ret );
 
     /**
      * Sets the status of the patch AND the status of the patch packages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgTable.cc 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgTable.cc
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgTable.cc     2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgTable.cc     2020-02-06 
16:48:26.000000000 +0100
@@ -41,6 +41,7 @@
 #define YUILogComponent "ncurses-pkg"
 #include <YUILog.h>
 #include <YDialog.h>
+#include <boost/format.hpp>
 
 #include "NCurses.h"
 #include "NCPkgTable.h"
@@ -53,20 +54,17 @@
 #include <zypp/ui/Selectable.h>
 #include "NCZypp.h"
 
+#define SOURCE_INSTALL_SUPPORTED        0
+
+using std::string;
+using std::vector;
 using std::endl;
 
 /*
   Textdomain "ncurses-pkg"
 */
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTableTag::NCPkgTableTag
-//     METHOD TYPE : Constructor
-//
-//     DESCRIPTION :
-//
+
 NCPkgTableTag::NCPkgTableTag( ZyppObj objPtr, ZyppSel selPtr, ZyppStatus stat )
     : YTableCell( "    " )
     , status ( stat )
@@ -77,31 +75,41 @@
 }
 
 
-std::string NCPkgTableTag::statusToString( ZyppStatus stat ) const
+string NCPkgTableTag::statusToString( ZyppStatus stat ) const
 {
-     // convert ZyppStatus to std::string
+     // convert ZyppStatus to string
     switch ( stat )
     {
        case S_NoInst:  // Is not installed and will not be installed
            return "    ";
+
        case S_KeepInstalled:   // Is installed - keep this version
            return "  i ";
+
        case S_Install: // Will be installed
            return "  + ";
+
        case S_Del:     // Will be deleted
            return "  - ";
+
        case S_Update:  // Will be updated
            return "  > ";
+
        case S_AutoInstall: // Will be automatically installed
            return " a+ ";
+
        case S_AutoDel: // Will be automatically deleted
            return " a- ";
+
        case S_AutoUpdate: // Will be automatically updated
            return " a> ";
+
        case S_Taboo:   // Never install this
            return " ---";
-       case S_Protected:       // always keep installed version
+
+       case S_Protected: // Always keep installed version
            return " -i-";
+
        default:
            return "####";
     }
@@ -110,14 +118,6 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::NCPkgTable
-//     METHOD TYPE : Constructor
-//
-//     DESCRIPTION :
-//
 NCPkgTable::NCPkgTable( YWidget * parent, YTableHeader * tableHeader )
     : NCTable( parent, tableHeader )
     , packager( 0 )
@@ -130,14 +130,6 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::~NCPkgTable
-//     METHOD TYPE : Destructor
-//
-//     DESCRIPTION :
-//
 NCPkgTable::~NCPkgTable()
 {
     delete statusStrategy;
@@ -145,17 +137,8 @@
 }
 
 
-
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::addLine
-//     METHOD TYPE : void
-//
-//     DESCRIPTION :
-//
 void NCPkgTable::addLine( ZyppStatus stat,
-                         const std::vector<std::string> & elements,
+                         const vector<string> & elements,
                          ZyppObj objPtr,
                          ZyppSel slbPtr )
 {
@@ -164,70 +147,46 @@
     // fill first column (containing the status information and the package 
pointers)
     tabItem->addCell( new NCPkgTableTag( objPtr, slbPtr, stat ));
 
-
-    for ( const std::string& s: elements )
-       tabItem->addCell(s);
+    for ( const string& s: elements )
+       tabItem->addCell( s );
 
     // use all-at-once insertion mode - DrawPad() is called only after the loop
-    addItem(tabItem, true);
+    addItem( tabItem, true );
 
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::deleteAllItems
-//     METHOD TYPE : void
-//
-//     DESCRIPTION :
-//
 void NCPkgTable::itemsCleared()
 {
     return NCTable::deleteAllItems();
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::cellChanged
-//     METHOD TYPE : void
-//
-//     DESCRIPTION :
-//
-void NCPkgTable::cellChanged( int index, int colnum, const std::string & 
newtext )
+void NCPkgTable::cellChanged( int index, int colnum, const string & newtext )
 {
     return NCTable::cellChanged( index, colnum, newtext );
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::changeStatus
-//     METHOD TYPE : bool
 //
-//     DESCRIPTION : sets the new status in first column of the package table
-//                   and informs the package manager
+// Set the new status in the first column of the package table and in libzypp
 //
 bool NCPkgTable::changeStatus( ZyppStatus newstatus,
                               const ZyppSel & slbPtr,
-    // objPtr is candidatePtr or what the user selected instead of it.
-                              ZyppObj objPtr,
+                              ZyppObj objPtr, // this is candidatePtr or what 
the user selected instead of it
                               bool singleChange )
 {
     if ( !packager || !slbPtr )
        return false;
 
-    std::string notify;
-    std::string license;
-    bool license_confirmed = true;
+    yuiMilestone() << "Changing status of " << slbPtr->name() << endl;
+
+    string notify;
+    string license;
+    bool confirmed = true;
     ZyppPkg pkgPtr = NULL;
-    std::string header;
+    string header;
     bool ok = true;
-    int cols = NCurses::cols();
-    int lines = NCurses::lines();
 
     switch ( newstatus )
     {
@@ -257,60 +216,63 @@
        case S_AutoUpdate:
            if ( objPtr )
            {
-               // check license of packages and patches in case of 
S_Install/S_Update/S_AutoInstall/S_AutoUpdate
-               license = objPtr->licenseToConfirm();
-               license_confirmed = slbPtr->hasLicenceConfirmed();
+                if ( objPtr->isRetracted() )
+                    confirmed = confirmRetracted( objPtr, slbPtr );
+
+                if ( confirmed )
+                    license = objPtr->licenseToConfirm();
            }
            break;
 
        default: break;
     }
 
-    std::string pkgName = slbPtr->name();
+    string pkgName = slbPtr->name();
 
-    if ( !license.empty() )
+    if ( ! license.empty() )
     {
-       if ( !license_confirmed )
-       {
-           license_confirmed = packager->showLicensePopup( pkgName, license);
-       }
-
-       if ( !license_confirmed )
-       {
-           // make sure the package won't be installed
-           switch ( newstatus )
-           {
-               case S_Install:
-               case S_AutoInstall:
-                   newstatus = S_Taboo;
-                   break;
-
-               case S_Update:
-               case S_AutoUpdate:
-                   newstatus = S_Protected;
-                   break;
-
-               default:
-                   break;
-           }
+        if ( ! slbPtr->hasLicenceConfirmed() )
+           confirmed = packager->showLicensePopup( pkgName, license);
 
-           ok = false;
-       }
-        else
+        if ( confirmed )
         {
            yuiMilestone() << "User confirmed license agreement for " << 
pkgName << endl;
            slbPtr->setLicenceConfirmed (true);
-       }
+        }
     }
 
-    if ( ok && !notify.empty() )
+    if ( ! confirmed )
     {
-        std::string html_text = packager->InfoText()->createHtmlText( notify );
+        // make sure the package won't be installed
+        switch ( newstatus )
+        {
+            case S_Install:
+            case S_AutoInstall:
+                newstatus = S_Taboo;
+                break;
+
+            case S_Update:
+            case S_AutoUpdate:
+                newstatus = S_Protected;
+                break;
+
+            default:
+                break;
+        }
+
+        ok = false;
+    }
+
+    if ( ok && ! notify.empty() )
+    {
+        int cols  = NCurses::cols();
+        int lines = NCurses::lines();
+
+        string html_text = packager->InfoText()->createHtmlText( notify );
        NCPopupInfo * info = new NCPopupInfo( wpos( (lines * 35)/100, (cols * 
25)/100),
                                              header,
-                                             "<i>" + pkgName + "</i><br><br>" 
+ html_text
-                                             );
-       info->setPreferredSize( (NCurses::cols() * 50)/100, (NCurses::lines() * 
30)/100);
+                                             "<i>" + pkgName + "</i><br><br>" 
+ html_text );
+       info->setPreferredSize( (cols * 50)/100, (lines * 30)/100);
        info->showInfoPopup();
 
        YDialog::deleteTopmostDialog();
@@ -331,11 +293,13 @@
                // show the required diskspace
                packager->showDiskSpace();
                break;
+
            case T_Availables:
                // check/show dependencies of packages
                packager->showPackageDependencies( false );
                // don't show diskspace (type T_Availables is also used in YOU 
mode)
                break;
+
            case T_Selections:
                // check/show dependencies of selections
                packager->showSelectionDependencies();
@@ -351,6 +315,7 @@
            default:
                break;
        }
+
         // update this list to show the status changes
        updateTable();
 
@@ -365,13 +330,8 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
 //
-//     METHOD NAME : NCPkgTable::updateTable
-//     METHOD TYPE : bool
-//
-//     DESCRIPTION : set the new status info if status has changed
+// Set the new status info if status has changed
 //
 bool NCPkgTable::updateTable()
 {
@@ -383,6 +343,7 @@
     {
        // get the table line
        NCTableLine * cl = myPad()->ModifyLine( index );
+
        if ( !cl )
        {
            ret = false;
@@ -408,7 +369,7 @@
        {
            if ( tableType == T_Availables && !slbPtr->multiversionInstall() )
            {
-               std::string isCandidate = "   ";
+               string isCandidate = "   ";
                if ( objPtr == slbPtr->candidateObj() )
                    isCandidate = " x ";
 
@@ -436,27 +397,18 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// slbHasInstalledObj
-//
-// a helper to call a method
-//
 static bool slbHasInstalledObj (const ZyppSel & slb)
 {
     return ! slb->installedEmpty();
 }
 
 
-///////////////////////////////////////////////////////////////////
 //
-// fillHeader
-//
-// Fillup the column headers of the package table
+// Fill the column headers of the package table
 //
 void NCPkgTable::fillHeader()
 {
-    std::vector<std::string> header;
+    vector<string> header;
 
     switch ( tableType )
     {
@@ -470,6 +422,7 @@
            header.push_back( "L" + NCPkgStrings::PkgStatus() );
            header.push_back( "L" + NCPkgStrings::PkgName() );
            header.push_back( "L" + NCPkgStrings::PkgSummary() );
+
            if ( haveInstalledPkgs > 0 )
            {
                header.push_back( "L" + NCPkgStrings::PkgVersionNew() );
@@ -480,9 +433,10 @@
            {
                header.push_back( "L" + NCPkgStrings::PkgVersion() );
            }
+
            header.push_back( "L" + NCPkgStrings::PkgSize() );
-// installation of source rpms is not possible
-#ifdef FIXME
+
+#if SOURCE_INSTALL_SUPPORTED
            header.push_back( "L" + NCPkgStrings::PkgSource() );
 #endif
            break;
@@ -559,14 +513,9 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// createListEntry
-//
-//
-bool NCPkgTable::createListEntry ( ZyppPkg pkgPtr, ZyppSel slbPtr )
+bool NCPkgTable::createListEntry( ZyppPkg pkgPtr, ZyppSel slbPtr )
 {
-    std::vector<std::string> pkgLine;
+    vector<string> pkgLine;
     pkgLine.reserve(6);
 
     if ( !pkgPtr || !slbPtr )
@@ -578,18 +527,20 @@
     // add the package name
     pkgLine.push_back( slbPtr->name() );
 
-    std::string instVersion = "";
-    std::string version = "";
+    string instVersion = "";
+    string version = "";
     ZyppStatus status;
 
     switch ( tableType )
     {
-       case T_PatchPkgs: {
+       case T_PatchPkgs:
+        {
            // if the package is installed, get the installed version
            if ( ! slbPtr->installedEmpty() )
            {
                instVersion = slbPtr->installedObj()->edition().asString();
            }
+
             // if a candidate is available, get the candidate version
            if ( slbPtr->hasCandidateObj() )
            {
@@ -614,9 +565,10 @@
 
            break;
        }
+
        case T_Availables:
         {
-            std::string isCandidate = "   ";
+            string isCandidate = "   ";
             if ( pkgPtr == slbPtr->candidateObj() )
                 isCandidate = " x ";
             pkgLine.push_back( isCandidate );
@@ -651,6 +603,7 @@
 
            break;
        }
+
         case T_MultiVersion:
         {
             version = pkgPtr->edition().asString();
@@ -671,9 +624,12 @@
            pkgLine.push_back( pkgPtr->arch().asString()); // architecture
             break;
         }
-       default: {
+
+       default:
+        {
            // if the package is installed, get the installed version
            pkgLine.push_back( pkgPtr->summary() );     // short description
+
            if ( ! slbPtr->installedEmpty() )
            {
                instVersion = slbPtr->installedObj()->edition().version();
@@ -700,8 +656,7 @@
            FSize size(zypp::ByteCount::SizeType(pkgPtr->installSize()));  // 
installed size
            pkgLine.push_back( size.form( 8 ) );        // format size
 
-// Selectable does not have source_install
-#ifdef FIXME
+#if SOURCE_INSTALL_SUPPORTED
            if ( slbPtr->source_install() )
            {
                pkgLine.push_back( " x " );
@@ -717,41 +672,30 @@
     addLine( status,   // the package status
             pkgLine,   // the package data
             pkgPtr,    // the corresponding package pointer
-            slbPtr
-       );
+            slbPtr );
 
     return true;
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// createInfoEntry
-//
-//
-bool NCPkgTable::createInfoEntry ( std::string text )
+bool NCPkgTable::createInfoEntry ( string text )
 {
-    std::vector<std::string> pkgLine;
+    vector<string> pkgLine;
     pkgLine.reserve(2);
 
     pkgLine.push_back( text );
     addLine( S_NoInst, // use status NoInst
             pkgLine,
             ZyppObj(),
-            ZyppSel());        // null pointer
+            ZyppSel() ); // null pointer
 
     return true;
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// createPatchEntry
-//
-//
 bool NCPkgTable::createPatchEntry ( ZyppPatch patchPtr, ZyppSel        slb )
 {
-    std::vector<std::string> pkgLine;
+    vector<string> pkgLine;
     pkgLine.reserve(5);
 
     if ( !patchPtr || !slb )
@@ -784,11 +728,6 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// showInformation
-//
-//
 bool NCPkgTable::showInformation()
 {
     ZyppObj objPtr = getDataPointer( getCurrentItem() );
@@ -807,10 +746,12 @@
             updateInfo( objPtr, slbPtr, VisibleInfo() );
             packager->PackageLabel()->setLabel( slbPtr->name() );
            break;
+
        case T_Patches:
            // show the patch info
             updateInfo( objPtr, slbPtr, VisibleInfo() );
            break;
+
        default:
            break;
     }
@@ -819,14 +760,6 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-//
-//     METHOD NAME : NCPkgTable::wHandleInput
-//     METHOD TYPE : NCursesEvent
-//
-//     DESCRIPTION :
-//
 NCursesEvent NCPkgTable::wHandleInput( wint_t key )
 {
     NCursesEvent ret = NCursesEvent::none;
@@ -849,17 +782,15 @@
        case KEY_PPAGE:
        case KEY_END:
        case KEY_HOME:
-           // show the corresponding information
            showInformation();
            break;
 
        case KEY_SPACE:
        case KEY_RETURN:
-           // toggle status
-           toggleObjStatus();
+           cycleObjStatus();
            break;
 
-            // from the parent class, to enable sorting
+        // Inherited from the parent class to enable sorting
        case CTRL('o'):
            NCTable::wHandleInput( key);
            break;
@@ -885,15 +816,11 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// NCPkgTable::getStatus()
 //
-// Gets the status of the package of selected line
+// Get the status of the package of the selected line
 //
 ZyppStatus NCPkgTable::getStatus( int index )
 {
-    // get the tag
     NCPkgTableTag * cc = getTag( index);
     if ( !cc )
        return S_NoInst;
@@ -904,7 +831,6 @@
 
 ZyppObj NCPkgTable::getDataPointer( int index )
 {
-    // get the tag
     NCPkgTableTag *cc = getTag( index );
     if ( !cc )
        return ZyppObj();
@@ -915,7 +841,6 @@
 
 ZyppSel NCPkgTable::getSelPointer( int index )
 {
-    // get the tag
     NCPkgTableTag *cc = getTag( index );
     if ( !cc )
        return ZyppSel();
@@ -926,7 +851,6 @@
 
 NCPkgTableTag * NCPkgTable::getTag( const int & index )
 {
-    // get the table line
     NCTableLine * cl = myPad()->ModifyLine( index );
     if ( !cl )
        return 0;
@@ -940,12 +864,8 @@
 }
 
 
-#ifdef FIXME
-///////////////////////////////////////////////////////////////////
-//
-// NCPkgTable::SourceInstall()
-//
-//
+#if SOURCE_INSTALL_SUPPORTED
+
 bool NCPkgTable::SourceInstall( bool install )
 {
     int index =  getCurrentItem();
@@ -971,14 +891,14 @@
     if ( install && selPtr->providesSources() )
     {
        ok = selPtr->set_source_install( true );
-       yuiMilestone() << "Set source install returns: " << (ok?"true":"false") 
<< endl;
+       yuiMilestone() << "Set source install returns: " << ( ok ? "true" : 
"false" ) << endl;
        if ( currentCol )
            currentCol->SetLabel( NClabel( " x " ) );
     }
     else if ( !install && selPtr->source_install() )
     {
        ok = selPtr->set_source_install( false );
-       yuiMilestone() << "ReSet source install returns: " << 
(ok?"true":"false") << endl;
+       yuiMilestone() << "ReSet source install returns: " << ( ok ? "true" : 
"false" ) << endl;
        if ( currentCol )
            currentCol->SetLabel( NClabel( "   " ) );
     }
@@ -988,12 +908,7 @@
 #endif
 
 
-///////////////////////////////////////////////////////////////////
-//
-// NCPkgTable::toggleObjStatus()
-//
-//
-bool NCPkgTable::toggleObjStatus()
+bool NCPkgTable::cycleObjStatus()
 {
     ZyppSel slbPtr = getSelPointer( getCurrentItem() );
     ZyppObj objPtr = getDataPointer( getCurrentItem() );
@@ -1003,7 +918,7 @@
 
     ZyppStatus newStatus;
 
-    bool ok = statusStrategy->toggleStatus( slbPtr, objPtr, newStatus );
+    bool ok = statusStrategy->cycleStatus( slbPtr, objPtr, newStatus );
 
     if ( ok )
     {
@@ -1014,37 +929,25 @@
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// NCPkgTable::changeObjStatus()
-//
-//
 bool NCPkgTable::changeObjStatus( int key )
 {
     ZyppSel slbPtr = getSelPointer( getCurrentItem() );
     ZyppObj objPtr = getDataPointer( getCurrentItem() );
 
     if ( !slbPtr )
-    {
        return false;
-    }
+
     ZyppStatus newStatus;
 
     bool ok = statusStrategy->keyToStatus( key, slbPtr, objPtr, newStatus );
 
     if ( ok )
-    {
        changeStatus( newStatus, slbPtr, objPtr, true );
-    }
+
     return true;
 }
 
 
-///////////////////////////////////////////////////////////////////
-//
-// NCPkgTable::changeListObjStatus()
-//
-//
 bool NCPkgTable::changeListObjStatus( NCPkgTableListAction type )
 {
     ZyppStatus newStatus;
@@ -1068,12 +971,14 @@
                        ok = statusStrategy->keyToStatus( '+', slbPtr, objPtr, 
newStatus );
                    break;
                }
+
                case A_Delete:
                 {
                    if ( slbPtr->installedObj() && slbPtr->status() != 
S_Protected )
                        ok = statusStrategy->keyToStatus( '-', slbPtr, objPtr, 
newStatus );
                    break;
                }
+
                case A_UpdateNewer:
                 {
                     // set status to update respecting "vendor change" settings
@@ -1084,12 +989,14 @@
                     }
                    break;
                }
+
                case A_Update:
                 {
                    if ( slbPtr->installedObj() && slbPtr->status() != 
S_Protected )
                        ok = statusStrategy->keyToStatus( '>', slbPtr, objPtr, 
newStatus );
                    break;
                }
+
                case A_Keep:
                 {
                    if ( slbPtr->status() == S_Install
@@ -1102,6 +1009,7 @@
                        ok = statusStrategy->keyToStatus( '+', slbPtr, objPtr, 
newStatus );
                    break;
                }
+
                default:
                    yuiError() << "Unknown list action" << endl;
                     break;
@@ -1207,7 +1115,7 @@
     for ( listIt = pkgList.begin(); listIt != pkgList.end();  ++listIt )
     {
        ZyppSel selectable = *listIt;
-       ZyppPkg pkg = tryCastToZyppPkg (selectable->theObj());
+       ZyppPkg pkg = tryCastToZyppPkg( selectable->theObj() );
        // show all matching packages
        switch ( type )
        {
@@ -1281,3 +1189,35 @@
        // catch unhandled enum states
     }
 }
+
+
+bool NCPkgTable::confirmRetracted( ZyppObj pkg, ZyppSel sel )
+{
+    yuiMilestone() << "Retracted object " << sel->name() << " " << 
pkg->edition() << endl;
+
+    // Headline of confirmation popup
+    string heading = _( "Please confirm" );
+
+    std::ostringstream msg;
+    //  %s is a package name
+    msg << boost::format( _( "<p>Really install a retracted version of \"%s\" 
?</p>" ) ) % sel->name();
+    int width = msg.str().size() + 2;
+    int height = 7;
+
+    NCPopupInfo * info = new NCPopupInfo( wpos( ( NCurses::lines() - height ) 
/ 2,
+                                                ( NCurses::cols()  - width  ) 
/ 2 ),
+                                          heading,
+                                          msg.str(),
+                                          NCPkgStrings::YesLabel(),
+                                          NCPkgStrings::NoLabel() );
+    info->setPreferredSize( width, height );
+    NCursesEvent event = info->showInfoPopup();
+    YDialog::deleteTopmostDialog();
+    bool confirmed = ( event != NCursesEvent::cancel );
+
+    yuiMilestone() << "User " << ( confirmed ? "confirmed" : "rejected" )
+                   << " retracted object " << sel->name() << " " << 
pkg->edition()
+                   << endl;
+
+    return confirmed;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-ncurses-pkg-2.50.4/src/NCPkgTable.h 
new/libyui-ncurses-pkg-2.50.5/src/NCPkgTable.h
--- old/libyui-ncurses-pkg-2.50.4/src/NCPkgTable.h      2020-01-24 
07:40:20.000000000 +0100
+++ new/libyui-ncurses-pkg-2.50.5/src/NCPkgTable.h      2020-02-06 
16:48:26.000000000 +0100
@@ -350,7 +350,7 @@
 
     bool changeListObjStatus( NCPkgTableListAction key );
 
-    bool toggleObjStatus();
+    bool cycleObjStatus();
 
     /**
      * Set the status information if status has changed
@@ -450,6 +450,12 @@
      */
     bool showInformation();
 
+    /**
+     * Ask the user for confirmation of installing a retracted package.
+     * This returns 'true' if the user confirmed, 'false' if not.
+     **/
+    bool confirmRetracted( ZyppObj pkg, ZyppSel sel );
+
     void setVisibleInfo( NCPkgTableInfoType info) { visibleInfo = info;  }
 
     NCPkgTableInfoType VisibleInfo() { return visibleInfo; }


Reply via email to