[PC-BSD Commits] r4101 - pcbsd/trunk-current/SystemUpdaterTray

svn at pcbsd.org svn at pcbsd.org
Sat Jun 13 06:57:47 PDT 2009


Author: kris
Date: 2009-06-13 06:57:46 -0700 (Sat, 13 Jun 2009)
New Revision: 4101

Modified:
   pcbsd/trunk-current/SystemUpdaterTray/UpdaterTray.cpp
Log:

Apply same fix to trunk-current, fix how we warn of a failure to contact the update server



Modified: pcbsd/trunk-current/SystemUpdaterTray/UpdaterTray.cpp
===================================================================
--- pcbsd/trunk-current/SystemUpdaterTray/UpdaterTray.cpp	2009-06-13 13:57:07 UTC (rev 4100)
+++ pcbsd/trunk-current/SystemUpdaterTray/UpdaterTray.cpp	2009-06-13 13:57:46 UTC (rev 4101)
@@ -268,12 +268,10 @@
   // Check to see if the update download was successful and warn if not
   if ( sysFetchJob->error() != 0 )
   {
-       QImage Icon2;
-       Icon2.load("/PCBSD/SystemUpdater/images/sysupdates.png");
-       QPixmap PixmapIcon2;
-       PixmapIcon2.convertFromImage(Icon2.scaled(22,22));
-
-       KPassivePopup::message(tr("System Update Error"), tr("Could not contact the PC-BSD update server! Please check your internet connection or proxy settings."), PixmapIcon2, this);
+       // We couldn't fetch any updates, set the status and update the icon
+       programstatus = CHECK_FAILED;
+       contextMenuRefresh();
+       displayTooltip();
   } 
 
   // Connect the exited signal and start the process
@@ -351,6 +349,12 @@
      setIcon(Icon);
   }
 
+  // If the program couldn't get a list of updates from the server
+  if ( programstatus == CHECK_FAILED ) 
+  {
+     Icon.addFile("/PCBSD/SystemUpdater/images/connecterror.png");
+     setIcon(Icon);
+  }
 
   // If the program has a PBI update
   if ( pbistatus == PBI_UPDATES_AVAIL ) 
@@ -468,6 +472,10 @@
    if (programstatus == SYSTEM_UP2DATE ) {
       tooltipStr += "<br>" + tr("Your system is fully updated!");
    }
+   
+   if (programstatus == CHECK_FAILED ) {
+      tooltipStr += "<br>" + tr("Failed to contact the update server!");
+   }
 
    if (programstatus == SYSTEM_CHECKING4UPDATES ) {
       tooltipStr += "<br>" + tr("Checking for updates...");



More information about the Commits mailing list