[PC-BSD Commits] r21706 - pcbsd/current/src-qt4/pc-updategui

svn at pcbsd.org svn at pcbsd.org
Wed Mar 6 09:13:05 PST 2013


Author: kris
Date: 2013-03-06 17:13:05 +0000 (Wed, 06 Mar 2013)
New Revision: 21706

Modified:
   pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
Log:

Show status of updates on system tray



Modified: pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-03-06 14:39:51 UTC (rev 21705)
+++ pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-03-06 17:13:05 UTC (rev 21706)
@@ -10,6 +10,7 @@
 ** destructor.
 *****************************************************************************/
 #include <fcntl.h>
+#include <QDateTime>
 #include <QDebug>
 #include <QDir>
 #include <QProcess>
@@ -184,6 +185,12 @@
       if ( listUpdates.at(z).at(1) == "PATCH" )
         tag = listUpdates.at(z).at(3);
 
+      // Show tray that we are doing a download
+      QFile sysTrig( SYSTRIGGER );
+      if ( sysTrig.open( QIODevice::WriteOnly ) ) {
+        QTextStream streamTrig( &sysTrig );
+        streamTrig << "DOWNLOADING: ";
+      }
 
       // Setup the upgrade process
       uProc = new QProcess();
@@ -281,6 +288,13 @@
 void mainWin::slotUpdateFinished()
 {
   qDebug() << "Updates all Finished";
+  QFile sysTrig( SYSTRIGGER );
+  if ( sysTrig.open( QIODevice::WriteOnly ) ) {
+    QTextStream streamTrig( &sysTrig );
+     streamTrig << "INSTALLFINISHED: ";
+  }
+  sysTrig.close();
+
   progressUpdate->setHidden(true);
   slotRescanUpdates();
 }
@@ -726,5 +740,10 @@
 
 void mainWin::slotUpdatePkgDone() {
   progressUpdate->setHidden(true);
+  QFile sysTrig( SYSTRIGGER );
+  if ( sysTrig.open( QIODevice::WriteOnly ) ) {
+    QTextStream streamTrig( &sysTrig );
+     streamTrig << "INSTALLFINISHED: ";
+  }
   checkMPKGUpdates();
 }



More information about the Commits mailing list