Changeset 4100

Show
Ignore:
Timestamp:
06/13/09 06:57:07 (9 months ago)
Author:
kris
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp

    r3835 r4100  
    269269  if ( sysFetchJob->error() != 0 ) 
    270270  { 
    271        QImage Icon2; 
    272        Icon2.load("/PCBSD/SystemUpdater/images/sysupdates.png"); 
    273        QPixmap PixmapIcon2; 
    274        PixmapIcon2.convertFromImage(Icon2.scaled(22,22)); 
    275  
    276        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); 
     271       // We couldn't fetch any updates, set the status and update the icon 
     272       programstatus = CHECK_FAILED; 
     273       contextMenuRefresh(); 
     274       displayTooltip(); 
    277275  }  
    278276 
     
    352350  } 
    353351 
     352  // If the program couldn't get a list of updates from the server 
     353  if ( programstatus == CHECK_FAILED )  
     354  { 
     355     Icon.addFile("/PCBSD/SystemUpdater/images/connecterror.png"); 
     356     setIcon(Icon); 
     357  } 
    354358 
    355359  // If the program has a PBI update 
     
    468472   if (programstatus == SYSTEM_UP2DATE ) { 
    469473      tooltipStr += "<br>" + tr("Your system is fully updated!"); 
     474   } 
     475    
     476   if (programstatus == CHECK_FAILED ) { 
     477      tooltipStr += "<br>" + tr("Failed to contact the update server!"); 
    470478   } 
    471479