Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7111 - in /trunk/updater-kde/updater: MainWindow.cpp progresspopup.cpp simpleview.cpp zypp/ZYppUpdater.cpp
  • From: tgoettlicher@xxxxxxxxxxxxxxxx
  • Date: Wed, 05 Sep 2007 15:06:16 -0000
  • Message-id: <20070905150617.1F29B25123@xxxxxxxxxxxxxxxx>
Author: tgoettlicher
Date: Wed Sep  5 17:06:16 2007
New Revision: 7111

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7111&view=rev
Log:
backup

Modified:
    trunk/updater-kde/updater/MainWindow.cpp
    trunk/updater-kde/updater/progresspopup.cpp
    trunk/updater-kde/updater/simpleview.cpp
    trunk/updater-kde/updater/zypp/ZYppUpdater.cpp

Modified: trunk/updater-kde/updater/MainWindow.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/MainWindow.cpp?rev=7111&r1=7110&r2=7111&view=diff
==============================================================================
--- trunk/updater-kde/updater/MainWindow.cpp (original)
+++ trunk/updater-kde/updater/MainWindow.cpp Wed Sep  5 17:06:16 2007
@@ -355,26 +355,55 @@
 // todo
 void MainWindow::slotAppletState(int state, int patches, int packages)
 {
-       // don't show updates tray icon when only optional updates are available
-       if (state == APPLET_UPDATES && patchCountRecommended(false) + patchCountSecurity(false) == 0)
-               applet->setState(APPLET_ONLY_OPTIONAL_UPDATES);
-       else
-               applet->setState(state);
 
-       applet->setUpdates(patches, packages);
 
-       if (_caps.canProvidePackages   && UpdaterSettings::self()->showPackages())
-               _simple->setTotalCount(patches + packages);
-       else
-               _simple->setTotalCount(patches);
 
-       _simple->setRecommendedCount(patchCountRecommended());
-       _simple->setSecurityCount(patchCountSecurity());
-       _simple->setRestartCount(patchCountRestart());
-       _simple->setState(state);
+       if (state == APPLET_UPDATES || state == APPLET_CRITICAL_UPDATES )
+       {
+               _simple->setRecommendedCount(patchCountRecommended());
+               _simple->setSecurityCount(patchCountSecurity());
+               _simple->setRestartCount(patchCountRestart());
+               if (_caps.canProvidePackages   && UpdaterSettings::self()->showPackages())
+               {
+                       _simple->setTotalCount(patches + packages);
 
-       _check_updates_action->setEnabled(true);
-       _edit_sources_action->setEnabled(true);
+                       if ( patchCountRecommended(false) + patchCountSecurity(false) == 0)
+                       {
+                               applet->setState(APPLET_ONLY_OPTIONAL_UPDATES);
+                               _simple->setState(APPLET_ONLY_OPTIONAL_UPDATES);
+                       }
+                       else
+                       {
+                               applet->setState(state);
+                               _simple->setState(state);
+                       }
+               }
+               else
+               {
+                       _simple->setTotalCount(patches);
+
+                       if ( patchCountRecommended(false) + patchCountSecurity(false) == 0 && patches > 0)
+                       {
+                               applet->setState(APPLET_ONLY_OPTIONAL_UPDATES);
+                               _simple->setState(APPLET_ONLY_OPTIONAL_UPDATES);
+                       }
+                       else if (patches > 0)
+                       {
+                               applet->setState(state);
+                               _simple->setState(state);
+                       }
+                       else
+                       {
+                               applet->setState(APPLET_NO_UPDATES);
+                               _simple->setState(APPLET_NO_UPDATES);
+                       }
+               }
+       }
+       else 
+       {
+               _simple->setState(state);
+               applet->setState(state);
+       }
 
        if ( state == APPLET_CHECKING || state == APPLET_INSTALLING || state == APPLET_NO_NETWORK )
                _check_updates_action->setEnabled(false);
@@ -382,6 +411,11 @@
                _check_updates_action->setEnabled(true);
 
 
+
+       _check_updates_action->setEnabled(true);
+       _edit_sources_action->setEnabled(true);
+
+
 }
 
 void MainWindow::slotSetProgress(int step, int totalSteps, QString text)

Modified: trunk/updater-kde/updater/progresspopup.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/progresspopup.cpp?rev=7111&r1=7110&r2=7111&view=diff
==============================================================================
--- trunk/updater-kde/updater/progresspopup.cpp (original)
+++ trunk/updater-kde/updater/progresspopup.cpp Wed Sep  5 17:06:16 2007
@@ -42,6 +42,7 @@
 void ProgressPopup::setText(QString text)
 {
        packageLabel->setText(text);
+       positionSelf();
 }
 
 void ProgressPopup::setTotalSteps(int steps)

Modified: trunk/updater-kde/updater/simpleview.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/simpleview.cpp?rev=7111&r1=7110&r2=7111&view=diff
==============================================================================
--- trunk/updater-kde/updater/simpleview.cpp (original)
+++ trunk/updater-kde/updater/simpleview.cpp Wed Sep  5 17:06:16 2007
@@ -229,6 +229,7 @@
                        bar->hide();
                        break;
 
+    case APPLET_ONLY_OPTIONAL_UPDATES:
     case APPLET_UPDATES:
     case APPLET_CRITICAL_UPDATES:
                        headline->setText(i18n("<b>New software for your system is available</b>"));
@@ -273,7 +274,6 @@
                        else
                                norestart->hide();
 
-
                        if(securityCount == 0 && recommendedCount == 0 )
                        {
                                install->setEnabled(false);
@@ -340,6 +340,7 @@
 
 void SimpleView::setSecurityCount(int count)
 {
+       kdDebug() << count << " == sec" << endl;
        securityCount=count;
 }
 

Modified: trunk/updater-kde/updater/zypp/ZYppUpdater.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/zypp/ZYppUpdater.cpp?rev=7111&r1=7110&r2=7111&view=diff
==============================================================================
--- trunk/updater-kde/updater/zypp/ZYppUpdater.cpp (original)
+++ trunk/updater-kde/updater/zypp/ZYppUpdater.cpp Wed Sep  5 17:06:16 2007
@@ -263,7 +263,7 @@
     emit(updateApplet(APPLET_PKGMGR_UPDATES, _patchList->childCount(), _packageList->childCount()));
   else if (critical_available)
     emit(updateApplet(APPLET_CRITICAL_UPDATES, _patchList->childCount(), _packageList->childCount()));
-  else if ( _patchList->childCount() > 0 )
+  else if ( _patchList->childCount() + _packageList->childCount() > 0 )
     emit(updateApplet(APPLET_UPDATES, _patchList->childCount(), _packageList->childCount()));
   else
     emit(updateApplet(APPLET_NO_UPDATES, 0, 0));

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages