[PC-BSD Commits] r7921 - pcbsd/current/src-qt4/pc-systemupdatertray

svn at pcbsd.org svn at pcbsd.org
Wed Oct 27 14:52:14 PDT 2010


Author: kris
Date: 2010-10-27 14:52:14 -0700 (Wed, 27 Oct 2010)
New Revision: 7921

Modified:
   pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
Log:

Fixed file locations for icons / sysupdate.conf



Modified: pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2010-10-27 20:09:23 UTC (rev 7920)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2010-10-27 21:52:14 UTC (rev 7921)
@@ -103,7 +103,7 @@
 
   // Setup our Context Menu
   QIcon contextIcon;
-  contextIcon.addFile("/PCBSD/SystemUpdater/images/updated.png");
+  contextIcon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/updated.png");
 
 
   trayIconMenu = new QMenu(this);
@@ -124,7 +124,7 @@
 
   // Set the tray icon that we are checking for updates
   QIcon Icon;
-  Icon.addFile("/PCBSD/SystemUpdater/images/working.png");
+  Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/working.png");
   trayIcon->setIcon(Icon);
 
   connect( trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(slotTrayActivated(QSystemTrayIcon::ActivationReason) ) );
@@ -167,7 +167,7 @@
 
   // Watch our trigger file, to see if any automated updates are being downloaded
   fileWatcherSys = new QFileSystemWatcher();
-  fileWatcherSys->addPath("/PCBSD/SystemUpdater/conf/sysupdate.conf");
+  fileWatcherSys->addPath(PREFIX + "/share/pcbsd/pc-sysmanager/conf/sysupdate.conf");
   connect(fileWatcherSys, SIGNAL(fileChanged(const QString&)), this, SLOT(slotScheduledSystemCheck() ));
 }
 
@@ -312,7 +312,7 @@
 
   // Set the tray icon that we are checking for updates
   QIcon Icon;
-  Icon.addFile("/PCBSD/SystemUpdater/images/working.png");
+  Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/working.png");
   trayIcon->setIcon(Icon);
 
   // Set the status to checking for system updates
@@ -322,7 +322,7 @@
   displayTooltip();
 
   // First, get some variables to figure out the full patch URL
-  QFile file( "/PCBSD/SystemUpdater/conf/sysupdate.conf" );
+  QFile file( PREFIX + "/share/pcbsd/pc-sysmanager/conf/sysupdate.conf" );
   if ( file.open( QIODevice::ReadOnly ) ) {
       QTextStream stream( &file );
       while ( !stream.atEnd() ) {
@@ -414,7 +414,7 @@
     // Now traverse the directory, see if we have updates.
     QString prog = "sh";
     QStringList args;
-    args << "/PCBSD/SystemUpdater/bin/readSysUpdatesUser.sh" << Version << sysPatchsetTmpFile << username;
+    args << PREFIX + "/share/pcbsd/pc-sysmanager/bin/readSysUpdatesUser.sh" << Version << sysPatchsetTmpFile << username;
 
     //qDebug() << "System Fetch Finished:" << sysPatchsetTmpFile;
     qDebug() << "Finished System Update Check";
@@ -440,7 +440,7 @@
     programstatus = SYSTEM_UPDATE_AVAIL;
 
     newMsg = "<font color=\"#ff0000\">" + tr("Update available") + "</font>";
-    QPixmap PixmapIcon2("/PCBSD/SystemUpdater/images/sysupdates.png");
+    QPixmap PixmapIcon2(PREFIX + "/share/pcbsd/pc-sysmanager/images/sysupdates.png");
 
  
     contextMenuRefresh();
@@ -470,19 +470,19 @@
   // If the program is completely updated!
   if ( programstatus == SYSTEM_UP2DATE ) 
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/updated.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/updated.png");
   }
 
   // If the program couldn't get a list of updates from the server
   if ( programstatus == CHECK_FAILED ) 
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/connecterror.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/connecterror.png");
   }
 
   // If the program has a PBI update
   if ( pbistatus == PBI_UPDATES_AVAIL ) 
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/pbiupdates.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/pbiupdates.png");
   }
 
   /* Start checking the system - updater status now, which superceedes the PBI stuff */
@@ -490,36 +490,36 @@
   // If the program is checking updates right now
   if ( programstatus == SYSTEM_CHECKING4UPDATES ) 
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/working.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/working.png");
   }
 
   // If the program shows system updates available
   if ( programstatus == SYSTEM_UPDATE_AVAIL ) 
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/sysupdates.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/sysupdates.png");
   }
   
   if ( programstatus == SYSTEM_UPDATING)
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/updating.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/updating.png");
   }
 
   // Check if we are downloading a system update in the background
   if ( autoStatus == AUTODOWNLOAD)
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/go-down.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/go-down.png");
   }
 
   // Set the status that we are installing updates
   if ( autoStatus == AUTOINSTALLING)
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/updating.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/updating.png");
   }
 
   // Check if we are downloading a system update in the background
   if ( autoStatus == AUTOFAILED)
   {
-     Icon.addFile("/PCBSD/SystemUpdater/images/connecterror.png");
+     Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/connecterror.png");
   }
 
   trayIcon->setIcon(Icon);



More information about the Commits mailing list