[PC-BSD Commits] r17573 - pcbsd/current/src-qt4/pc-updategui
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 2 11:37:15 PDT 2012
Author: kris
Date: 2012-07-02 18:37:13 +0000 (Mon, 02 Jul 2012)
New Revision: 17573
Modified:
pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
Log:
On the update GUI, display if a system upgrade is waiting to prompt user to reboot.
Modified: pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-updategui/mainWin.cpp 2012-07-02 18:28:57 UTC (rev 17572)
+++ pcbsd/current/src-qt4/pc-updategui/mainWin.cpp 2012-07-02 18:37:13 UTC (rev 17573)
@@ -9,11 +9,12 @@
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
-#include <QTextStream>
+#include <QDebug>
+#include <QDir>
#include <QProcess>
#include <QProgressDialog>
#include <QString>
-#include <QDebug>
+#include <QTextStream>
#include <pcbsd-utils.h>
#include "mainWin.h"
#include "../config.h"
@@ -371,6 +372,16 @@
{
groupUpdates->setEnabled(true);
listViewUpdates->clear();
+
+ // Check if the system has an upgrade available
+ QDir chk;
+ chk.setPath("/usr/local/tmp/update-stagedir");
+ if ( chk.exists() ) {
+ textLabel->setText(tr("A system upgrade is waiting to be installed. Please reboot to begin!"));
+ return;
+ }
+
+ // Are we fully updated?
if ( listUpdates.isEmpty() ) {
textLabel->setText(tr("Your system is fully updated!"));
return;
More information about the Commits
mailing list