Author: tgoettlicher Date: Fri Nov 23 14:21:16 2007 New Revision: 7901 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7901&view=rev Log: fixed confusing wording update v upgrades (#335566) Modified: trunk/updater-kde/updater/MainWindow.cpp trunk/updater-kde/updater/simpleview.cpp trunk/updater-kde/updater/simpleview.h Modified: trunk/updater-kde/updater/MainWindow.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/MainWindow.cpp?rev=7901&r1=7900&r2=7901&view=diff ============================================================================== --- trunk/updater-kde/updater/MainWindow.cpp (original) +++ trunk/updater-kde/updater/MainWindow.cpp Fri Nov 23 14:21:16 2007 @@ -333,7 +333,8 @@ applet->setState(APPLET_PROBLEM, desc); _simple->setRecommendedCount(0); - _simple->setTotalCount(0); + _simple->setPatchCount(0); + _simple->setPackageCount(0); _simple->setSecurityCount(0); _simple->setState(APPLET_PROBLEM, desc); @@ -348,7 +349,8 @@ applet->setState(APPLET_PROBLEM, desc); _simple->setRecommendedCount(0); - _simple->setTotalCount(0); + _simple->setPatchCount(0); + _simple->setPackageCount(0); _simple->setSecurityCount(0); _simple->setState(APPLET_PROBLEM, desc); @@ -369,7 +371,8 @@ _simple->setRestartCount(patchCountRestart()); if (_caps.canProvidePackages && UpdaterSettings::self()->showPackages()) { - _simple->setTotalCount(patches + packages); + _simple->setPatchCount(patches); + _simple->setPackageCount(packages); if ( patchCountRecommended(false) + patchCountSecurity(false) == 0) { @@ -384,7 +387,8 @@ } else { - _simple->setTotalCount(patches); + _simple->setPatchCount(patches); + _simple->setPackageCount(0); if ( patchCountRecommended(false) + patchCountSecurity(false) == 0 && patches > 0) { Modified: trunk/updater-kde/updater/simpleview.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/simpleview.cpp?rev=7901&r1=7900&r2=7901&view=diff ============================================================================== --- trunk/updater-kde/updater/simpleview.cpp (original) +++ trunk/updater-kde/updater/simpleview.cpp Fri Nov 23 14:21:16 2007 @@ -279,8 +279,19 @@ if(securityCount == 0 && recommendedCount == 0 ) { install->setEnabled(false); - title->setText(i18n("%n optional update is available.<br>You can select optional updates in the detailed dialog.", - "%n optional updates are available.<br>You can select optional updates in the detailed dialog.", totalCount)); + + if (patchCount > 0 && packageCount == 0) + title->setText(i18n("%n optional update is available.<br>You can select optional updates in the detailed dialog.", + "%n optional updates are available.<br>You can select optional updates in the detailed dialog.", patchCount)); + + if (packageCount > 0 && patchCount == 0) + title->setText(i18n("%n optional upgrade is available.<br>You can select optional upgrades in the detailed dialog.", + "%n optional upgrades are available.<br>You can select optional upgrades in the detailed dialog.", packageCount)); + + if (packageCount > 0 && patchCount > 0) + title->setText(i18n("%n optional update and upgrade is available.<br>You can select optional updates and upgrades in the detailed dialog.", + "%n optional updates and upgrades are available.<br>You can select optional updates and upgrades in the detailed dialog.", patchCount+packageCount)); + } break; @@ -330,9 +341,14 @@ adjustSize(); } -void SimpleView::setTotalCount(int count) +void SimpleView::setPatchCount(int count) +{ + patchCount=count; +} + +void SimpleView::setPackageCount(int count) { - totalCount=count; + packageCount=count; } void SimpleView::setRecommendedCount(int count) Modified: trunk/updater-kde/updater/simpleview.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/simpleview.h?rev=7901&r1=7900&r2=7901&view=diff ============================================================================== --- trunk/updater-kde/updater/simpleview.h (original) +++ trunk/updater-kde/updater/simpleview.h Fri Nov 23 14:21:16 2007 @@ -36,7 +36,8 @@ int recommendedCount; int securityCount; int restartCount; - int totalCount; + int patchCount; + int packageCount; int recommendedCountSelected; int securityCountSelected; @@ -46,7 +47,8 @@ public slots: void setState(int state, const QString &description = QString() ); void setRecommendedCount(int count); - void setTotalCount(int count); + void setPatchCount(int count); + void setPackageCount(int count); void setSecurityCount(int count); void setRestartCount(int count); void setProgress(int step); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org