Changeset 6ed8c50


Ignore:
Timestamp:
Jul 26, 2013 4:25:05 AM (9 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
10ace4d
Parents:
ac4f6e9
Message:

Rework system update tray app: use icons from resources but not from file system. Please remove icons installing rule from project file if noone else uses them

Location:
src-qt4/pc-systemupdatertray
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-systemupdatertray/SystemUpdaterTray.qrc

    rac4f6e9 r6ed8c50  
    88        <file>images/appcafe.png</file> 
    99        <file>images/view-refresh.png</file> 
     10        <file>images/connecterror.png</file> 
     11        <file>images/sysupdates.png</file> 
     12        <file>images/autoupdateinstalling.png</file> 
     13        <file>images/autoupdateready.png</file> 
     14        <file>images/go-down.png</file> 
     15        <file>images/pbiupdates.png</file> 
     16        <file>images/restart.png</file> 
     17        <file>images/sysupdater.png</file> 
     18        <file>images/updated.png</file> 
     19        <file>images/updating.png</file> 
     20        <file>images/working.png</file> 
    1021    </qresource> 
    1122</RCC> 
  • src-qt4/pc-systemupdatertray/UpdaterTray.cpp

    rac4f6e9 r6ed8c50  
    105105  // Setup our Context Menu 
    106106  QIcon contextIcon; 
    107   contextIcon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/updated.png"); 
     107  contextIcon.addFile(":/images/updated.png"); 
    108108 
    109109 
     
    111111  trayIconMenu->setIcon(contextIcon); 
    112112  trayIconMenu->addSeparator(); 
    113   trayIconMenu->addAction( QIcon(":/sysupdater.png"), tr("Start the Update Manager"),  this, SLOT(slotOpenUpdateManager())); 
     113  trayIconMenu->addAction( QIcon(":/images/sysupdater.png"), tr("Start the Update Manager"),  this, SLOT(slotOpenUpdateManager())); 
    114114  trayIconMenu->addAction( QIcon(":/images/pkgmanager.png"), tr("Start the Package Manager"), this, SLOT(slotOpenPackageManager())); 
    115115  trayIconMenu->addSeparator(); 
     
    131131  trayIcon = new QSystemTrayIcon(this); 
    132132  trayIcon->setContextMenu(trayIconMenu); 
    133   QIcon Icon; 
    134   Icon.addFile(PREFIX + "/share/pcbsd/pc-sysmanager/images/working.png"); 
     133  QIcon Icon(":/images/working.png"); 
    135134  trayIcon->setIcon(Icon); 
    136135  trayIcon->show(); 
     
    324323  // Set the tray icon that we are checking for updates 
    325324  QIcon Icon; 
    326   Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/working.png"); 
     325  Icon.addFile(":/images/working.png"); 
    327326  trayIcon->setIcon(Icon); 
    328327 
     
    450449  // If the program is completely updated! 
    451450  if ( programstatus == SYSTEM_UP2DATE )  
    452      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/updated.png"); 
     451     Icon.addFile(":/images/updated.png"); 
    453452 
    454453  // If the program couldn't get a list of updates from the server 
    455454  if ( programstatus == CHECK_FAILED )  
    456      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/connecterror.png"); 
     455     Icon.addFile(":/images/connecterror.png"); 
    457456 
    458457  // If the program has a PBI update 
    459458  if ( pbistatus == PBI_UPDATES_AVAIL )  
    460      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/pbiupdates.png"); 
     459     Icon.addFile(":/images/pbiupdates.png"); 
    461460 
    462461  /* Start checking the system - updater status now, which superceedes the PBI stuff */ 
     
    464463  // If the program is checking updates right now 
    465464  if ( programstatus == SYSTEM_CHECKING4UPDATES )  
    466      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/working.png"); 
     465     Icon.addFile(":/images/working.png"); 
    467466 
    468467  if ( programstatus == PACKAGE_UPDATE_AVAIL )  
    469      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/pkgupdates.png"); 
     468     Icon.addFile(":/images/pkgupdates.png"); 
    470469 
    471470  // If the program shows system updates available 
    472471  if ( programstatus == SYSTEM_UPDATE_AVAIL || wardenstatus == WARDEN_UPDATE_AVAIL )  
    473      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/sysupdates.png"); 
     472     Icon.addFile(":/images/sysupdates.png"); 
    474473   
    475474  if ( programstatus == SYSTEM_UPDATING) 
    476      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/updating.png"); 
     475     Icon.addFile(":/images/updating.png"); 
    477476 
    478477  if ( programstatus == SYSTEM_RESTART_NEEDED) 
    479      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/restart.png"); 
     478     Icon.addFile(":/images/restart.png"); 
    480479   
    481480  // Check if we are downloading a system update in the background 
    482481  if ( autoStatus == AUTODOWNLOAD) 
    483      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/go-down.png"); 
     482     Icon.addFile(":/images/go-down.png"); 
    484483 
    485484  // Set the status that we are installing updates 
    486485  if ( autoStatus == AUTOINSTALLING) 
    487      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/updating.png"); 
     486     Icon.addFile(":/images/updating.png"); 
    488487 
    489488  // Check if we are downloading a system update in the background 
    490489  if ( autoStatus == AUTOFAILED) 
    491      Icon.addFile(PREFIX + "/share/pcbsd/pc-systemupdatertray/images/connecterror.png"); 
     490     Icon.addFile(":/images/connecterror.png"); 
    492491 
    493492  trayIcon->setIcon(Icon); 
Note: See TracChangeset for help on using the changeset viewer.