[PC-BSD Commits] r19985 - pcbsd/branches/9.1/src-qt4/pc-systemupdatertray

svn at pcbsd.org svn at pcbsd.org
Fri Oct 26 11:00:36 PDT 2012


Author: kris
Date: 2012-10-26 18:00:36 +0000 (Fri, 26 Oct 2012)
New Revision: 19985

Modified:
   pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
   pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.h
Log:

MFC fix to watch for multiple update checks



Modified: pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
===================================================================
--- pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2012-10-26 17:59:36 UTC (rev 19984)
+++ pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2012-10-26 18:00:36 UTC (rev 19985)
@@ -86,6 +86,7 @@
 {
   QString tmp, command;
   autoStatus = AUTOINACTIVE;
+  doingCheck=false;
   shownPopup=false;
 
   // Use built-in frequency until we load another
@@ -308,6 +309,11 @@
   QString Version;
   QString Arch, line;
 
+  // Block here if check already taking place
+  if ( doingCheck )
+     return;
+  doingCheck=true;
+
   // Check if the system is doing updates right now, if it is, ignore the request
   if ( programstatus == SYSTEM_CHECKING4UPDATES)
     return;
@@ -425,6 +431,9 @@
   contextMenuRefresh();
   displayTooltip();
 
+  // Ready to check again later
+  doingCheck=false;
+
 }
 
 /* This function is called to repaint the context menu based on program status */

Modified: pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.h
===================================================================
--- pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.h	2012-10-26 17:59:36 UTC (rev 19984)
+++ pcbsd/branches/9.1/src-qt4/pc-systemupdatertray/UpdaterTray.h	2012-10-26 18:00:36 UTC (rev 19985)
@@ -80,4 +80,5 @@
    QSystemTrayIcon *trayIcon;
    QMenu *trayIconMenu;
    bool shownPopup;
+   bool doingCheck;
 };



More information about the Commits mailing list