[PC-BSD Commits] r4100 - pcbsd/trunk/SystemUpdaterTray

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


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

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

Changed the system updater tray, to not issue annoying popup if teh update check fails, and
instead only change the icon in the taskbar and the tooltip to reflect the failure. 



Modified: pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp
===================================================================
--- pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp	2009-06-13 13:48:53 UTC (rev 4099)
+++ pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp	2009-06-13 13:57:07 UTC (rev 4100)
@@ -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