[PC-BSD Commits] r19984 - pcbsd/current/src-qt4/pc-systemupdatertray
svn at pcbsd.org
svn at pcbsd.org
Fri Oct 26 10:59:37 PDT 2012
Author: kris
Date: 2012-10-26 17:59:36 +0000 (Fri, 26 Oct 2012)
New Revision: 19984
Modified:
pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.h
Log:
Add boolean to watch if update check is being done, and prevent a 2nd
instance from running at same time
Modified: pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp 2012-10-26 17:32:18 UTC (rev 19983)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp 2012-10-26 17:59:36 UTC (rev 19984)
@@ -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/current/src-qt4/pc-systemupdatertray/UpdaterTray.h
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.h 2012-10-26 17:32:18 UTC (rev 19983)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.h 2012-10-26 17:59:36 UTC (rev 19984)
@@ -80,4 +80,5 @@
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
bool shownPopup;
+ bool doingCheck;
};
More information about the Commits
mailing list