Changeset f03134b


Ignore:
Timestamp:
05/01/14 08:47:30 (5 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3
Children:
2e5fb6f
Parents:
1ec90b9
Message:

Goodby to the old pc-pkgmanager, its functionality is now being merged
into the AppCafe?

While here, fix up system-updater-tray only show pkg / pbi updates
via pbing

Location:
src-qt4
Files:
85 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-systemupdatertray/UpdaterTray.cpp

    r1f126ed3 rf03134b  
    1919#define WARDEN_UPDATE_AVAIL 1 
    2020 
    21 #define PBI_UPDATED 0 
    22 #define PBI_UPDATES_AVAIL 1 
    23 #define PBI_CHECKING4UPDATES 2 
    24 #define PBI_UPDATING 3 
    25  
    2621// Public Variables 
    2722QString username; 
    2823int programstatus = SYSTEM_UP2DATE; 
    2924int wardenstatus = WARDEN_UP2DATE; 
    30 int pbistatus = PBI_UPDATED; 
    3125bool checkSysUpdatesFrequently = TRUE; 
    32 bool checkPBIUpdatesFrequently = TRUE; 
    3326int currentSysWorkingItem; 
    3427 
     
    3730QProcess *readSysUpdates; 
    3831QProcess *listingProc; 
    39 QProcess *checkPBIProc; 
    4032QProcess *launchAdminProc; 
    4133   
    4234QTimer *sysTimer; 
    43 QTimer *pbiTimer; 
    44  
    45 QString PBIProgName[900]; 
    46 QString PBIProgVer[900]; 
    47 QString PBIProgNewVer[900]; 
    48 QString PBIProgIcon[900]; 
    49 QString PBIProgURL1[900]; 
    50 QString PBIProgURL2[900]; 
    51 QString PBIProgURL3[900]; 
    52 QString PBIProgMD5[900]; 
    53 QString PBIProgMdate[900]; 
    54 QString PBIProgLoc[900]; 
    55 int     PBIProgUpdate[900]; 
    56 int     PBIProgFailed[900]; 
    57 QString PBIBuffer; 
    58 QString updatePBITextList; 
    5935 
    6036// Updater frequency supplied by user 
     
    7955 
    8056  sysTimer = new QTimer(this); 
    81   pbiTimer = new QTimer(this); 
    8257 
    8358  connect( sysTimer, SIGNAL(timeout()), this, SLOT(slotScheduledSystemCheck()) ); 
    84   connect( pbiTimer, SIGNAL(timeout()), this, SLOT(slotScheduledPBICheck()) ); 
    8559 
    8660  // Get the username of the person running X 
     
    9670  trayIconMenu->addSeparator(); 
    9771  trayIconMenu->addAction( QIcon(":/images/sysupdater.png"), tr("Start the Update Manager"),  this, SLOT(slotOpenUpdateManager())); 
    98   trayIconMenu->addAction( QIcon(":/images/pkgmanager.png"), tr("Start the Package Manager"), this, SLOT(slotOpenPackageManager())); 
    9972  trayIconMenu->addSeparator(); 
    10073  trayIconMenu->addAction( QIcon(":/images/appcafe.png"),    tr("Start the AppCafe"), this, SLOT(slotOpenSoftwareManager())); 
     
    12699  QTimer::singleShot(1000, this, SLOT(slotScheduledSystemCheck())); 
    127100 
    128   // Start the monitor service for PBI updates 
    129   QTimer::singleShot(60000, this, SLOT(slotScheduledPBICheck())); 
    130  
    131101  // Monitor if we need to start any update checks 
    132102  QTimer::singleShot(500, this, SLOT(slotMonitorForChanges())); 
     
    145115  connect(fileWatcherAutoUpdate, SIGNAL(fileChanged(const QString&)), this, SLOT(slotSetTimerReadAutoStatus() )); 
    146116 
    147   // Watch for PBI updates and refresh 
    148   QFile pbiTrig( PBITRIGGER ); 
    149   if ( pbiTrig.open( QIODevice::WriteOnly ) ) { 
    150     QTextStream streamTrig1( &pbiTrig ); 
    151      streamTrig1 << QDateTime::currentDateTime().toString("hhmmss"); 
    152      pbiTrig.close(); 
    153   } 
    154   pbiWatcherAutoUpdate = new QFileSystemWatcher(); 
    155   pbiWatcherAutoUpdate->addPath(PBITRIGGER); 
    156   connect(pbiWatcherAutoUpdate, SIGNAL(fileChanged(const QString&)), this, SLOT(slotScheduledPBICheck() )); 
    157  
    158117  // Watch our trigger file, to see if any automated updates are being downloaded 
    159118  fileWatcherSys = new QFileSystemWatcher(); 
     
    178137 
    179138 
    180   // Check if we need to re-scan for PBI / system updates 
     139  // Check if we need to re-scan for system updates 
    181140  upstamp = settings.value( "/PC-BSD/SystemUpdater/updateStatusTimeStamp", QString() ).toString(); 
    182141  userupstamp = settings.value( "/PC-BSD/SystemUpdater/updateStatusUserTimeStamp", QString() ).toString(); 
     
    188147  if ( needRescan ) { 
    189148    slotScheduledSystemCheck(); 
    190     slotScheduledPBICheck(); 
    191149  } 
    192150 
     
    252210  QTimer::singleShot(300, this, SLOT(slotScheduledSystemCheck())); 
    253211 
    254   // Start the monitor service for PBI updates 
    255   QTimer::singleShot(400, this, SLOT(slotScheduledPBICheck())); 
    256  
    257212} 
    258213 
     
    458413     Icon.addFile(":/images/connecterror.png"); 
    459414 
    460   // If the program has a PBI update 
    461   if ( pbistatus == PBI_UPDATES_AVAIL )  
    462      Icon.addFile(":/images/pbiupdates.png"); 
    463  
    464   /* Start checking the system - updater status now, which superceedes the PBI stuff */ 
    465  
    466415  // If the program is checking updates right now 
    467416  if ( programstatus == SYSTEM_CHECKING4UPDATES )  
     
    469418 
    470419  if ( programstatus == PACKAGE_UPDATE_AVAIL )  
    471      Icon.addFile(":/images/pkgupdates.png"); 
     420     Icon.addFile(":/images/pbiupdates.png"); 
    472421 
    473422  // If the program shows system updates available 
     
    532481 
    533482   if(reason == QSystemTrayIcon::Trigger) { 
    534        if ( (programstatus != SYSTEM_UPDATE_AVAIL && programstatus != PACKAGE_UPDATE_AVAIL) && (pbistatus == PBI_UPDATES_AVAIL) ) 
     483       if ( (programstatus != SYSTEM_UPDATE_AVAIL && programstatus != PACKAGE_UPDATE_AVAIL) ) 
    535484       { 
    536485            slotOpenSoftwareManagerInstalled(); 
     
    564513void UpdaterTray::slotOpenPackageManager(void) 
    565514{    
    566    system ("(pc-su pc-pkgmanager) &");  
     515   system ("(pc-su pc-softwaremanager) &");  
    567516} 
    568517 
     
    642591   } 
    643592 
    644    // If the program has a PBI update 
    645    if ( pbistatus == PBI_UPDATES_AVAIL )  
    646    { 
    647       tooltipStr += "<br><br>" + tr("PBI updates available") + "<br><br>"; 
    648       tooltipStr += updatePBITextList; 
    649       if ( !shownPopup && popAction->isChecked() ) { 
    650         shownPopup=true; 
    651         QTimer::singleShot(15000, this, SLOT(slotShowPBIUpdatePopup())); 
    652       } 
    653    } 
    654     
    655593   trayIcon->setToolTip(tooltipStr); 
    656594 
     
    691629 
    692630 
    693  
    694  
    695 /********************************************************************** 
    696 Code for the PBI update checking functionality of the system updater 
    697 ***********************************************************************/ 
    698  
    699 void UpdaterTray::slotScheduledPBICheck() 
    700 { 
    701    // Set our timer to check again in 24 hours. 
    702    if ( checkPBIUpdatesFrequently == TRUE) 
    703      pbiTimer->start( updateFrequency);  
    704  
    705    slotStartPBIUpdateCheck(); 
    706  
    707 } 
    708  
    709 void UpdaterTray::slotStartPBIUpdateCheck() 
    710 { 
    711  
    712   if ( pbistatus == PBI_CHECKING4UPDATES || pbistatus == PBI_UPDATING ) 
    713      return; 
    714  
    715   qDebug() << "Starting PBI update check..."; 
    716  
    717   slotPBICheckUpdate(); 
    718  
    719 }  
    720  
    721 // Start checking our list of PBIs which may be updatable 
    722 void UpdaterTray::slotPBICheckUpdate() 
    723 { 
    724   // Empty out our PBI buffer 
    725   PBIBuffer=""; 
    726   updatePBITextList = ""; 
    727  
    728   qDebug() << "Checking For PBI Updates..."; 
    729   checkPBIProc = new QProcess(); 
    730   checkPBIProc->setProcessChannelMode(QProcess::MergedChannels); 
    731   connect(checkPBIProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotReadPBIBuffer())); 
    732   connect(checkPBIProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotPopulatePBIList()) ); 
    733   checkPBIProc->start(QString("pbi_update"), QStringList() << "--check-all" ); 
    734 } 
    735  
    736 void UpdaterTray::slotReadPBIBuffer() 
    737 { 
    738     while( checkPBIProc->canReadLine() ) 
    739         PBIBuffer += checkPBIProc->readLine(); 
    740 } 
    741  
    742 // The update checking is finished 
    743 void UpdaterTray::slotPopulatePBIList() 
    744 { 
    745         if ( PBIBuffer.indexOf("- Available:") != -1 ) { 
    746                 updatePBITextList = PBIBuffer; 
    747                 pbistatus = PBI_UPDATES_AVAIL; 
    748         } else { 
    749                 // No PBI updates found right now! 
    750                 pbistatus = PBI_UPDATED; 
    751         } 
    752  
    753         contextMenuRefresh(); 
    754 } 
    755  
    756631void UpdaterTray::slotShowPkgUpdatePopup() 
    757632{ 
     
    776651} 
    777652 
    778 void UpdaterTray::slotShowPBIUpdatePopup() 
    779 { 
    780         disconnect(trayIcon, SIGNAL(messageClicked()), 0, 0 ); 
    781         trayIcon->showMessage(tr("Software Updates Available"), tr("Software updates are available. Click here to install them!"), QSystemTrayIcon::Warning); 
    782         connect( trayIcon, SIGNAL(messageClicked()), this, SLOT(slotOpenSoftwareManagerInstalled()) ); 
    783 } 
    784  
    785653void UpdaterTray::slotSingleInstance() 
    786654{ 
  • src-qt4/pc-systemupdatertray/UpdaterTray.h

    r1f126ed3 rf03134b  
    2929 
    3030#define SYSTRIGGER "/tmp/.sysupdatetraytrigger" 
    31 #define PBITRIGGER "/tmp/.pbiupdatetraytrigger" 
    3231 
    3332class QString; 
     
    6059   void slotOpenSoftwareManager(); 
    6160   void slotOpenSoftwareManagerInstalled(); 
    62    void slotPBICheckUpdate(); 
    63    void slotPopulatePBIList(); 
    6461   void slotQuitTray(); 
    65    void slotReadPBIBuffer(); 
    6662   void slotSaveUpdaterPrefs(); 
    67    void slotScheduledPBICheck(); 
    6863   void slotScheduledSystemCheck(); 
    6964   void slotSetTimerReadAutoStatus(); 
    70    void slotStartPBIUpdateCheck(); 
    7165   void slotStartUpdateCheck(); 
    7266   void slotSysUpdateTimer(); 
     
    7468   void slotShowSysUpdatePopup(); 
    7569   void slotShowJailUpdatePopup(); 
    76    void slotShowPBIUpdatePopup(); 
    7770   void slotChangePopup(); 
    7871   void slotShowPkgUpdatePopup(); 
     
    8477   QString getLineFromCommandOutput( QString command ); 
    8578   void loadUpdaterPrefs(); 
    86    QProcess *checkPBIProc; 
    87    /*QFileSystemWatcher *fileWatcher; 
    88    QFileSystemWatcher *fileWatcherSys; 
    89    QFileSystemWatcher *fileWatcherAutoUpdate; 
    90    QFileSystemWatcher *pbiWatcherAutoUpdate; 
    91    */ 
    9279   QString sysPatchsetTmpFile; 
    9380   bool useCustomTmpDir; 
  • src-qt4/port-files/pkg-plist

    r8fe8bea rf03134b  
    2323bin/runpbi 
    2424bin/pc-pfmanager 
    25 bin/pc-pkgmanager 
    2625bin/pc-servicemanager 
    2726bin/pc-softwaremanager 
     
    8988share/pcbsd/icons/pc-bootconfig.png 
    9089share/pcbsd/icons/sysupdate.png 
    91 share/pcbsd/icons/pkgmanager.png 
    9290share/pcbsd/icons/zmanager.png 
    9391share/pcbsd/doc/handbook_en.pdf 
     
    567565share/pcbsd/pc-controlpanel/items/tools/flash-player-properties.desktop 
    568566share/pcbsd/pc-controlpanel/items/tools/kde-kcmdf.desktop 
    569 share/pcbsd/pc-controlpanel/items/software/pc-updatecenter.desktop 
    570567share/pcbsd/pc-controlpanel/items/software/pc-updategui.desktop 
    571568share/pcbsd/pc-controlpanel/items/software/pbi-winecfg.desktop 
     
    577574share/pcbsd/pc-controlpanel/items/software/pbi-dbsd-tools.desktop 
    578575share/pcbsd/pc-controlpanel/items/software/appcafe.desktop 
    579 share/pcbsd/pc-controlpanel/items/software/pc-pkgmanager.desktop 
    580576share/pcbsd/pc-controlpanel/items/de/xfce-wm-settings.desktop 
    581577share/pcbsd/pc-controlpanel/items/de/xfce-workspaces-settings.desktop 
     
    739735share/pcbsd/i18n/AboutGui_zu.qm 
    740736share/pcbsd/i18n/PCADSLDAP_af.qm 
    741 share/pcbsd/i18n/PackageManager_af.qm 
    742 share/pcbsd/i18n/PackageManager_ar.qm 
    743 share/pcbsd/i18n/PackageManager_az.qm 
    744 share/pcbsd/i18n/PackageManager_bg.qm 
    745 share/pcbsd/i18n/PackageManager_bn.qm 
    746 share/pcbsd/i18n/PackageManager_bs.qm 
    747 share/pcbsd/i18n/PackageManager_ca.qm 
    748 share/pcbsd/i18n/PackageManager_cs.qm 
    749 share/pcbsd/i18n/PackageManager_cy.qm 
    750 share/pcbsd/i18n/PackageManager_da.qm 
    751 share/pcbsd/i18n/PackageManager_de.qm 
    752 share/pcbsd/i18n/PackageManager_el.qm 
    753 share/pcbsd/i18n/PackageManager_en_GB.qm 
    754 share/pcbsd/i18n/PackageManager_en_ZA.qm 
    755 share/pcbsd/i18n/PackageManager_es.qm 
    756 share/pcbsd/i18n/PackageManager_et.qm 
    757 share/pcbsd/i18n/PackageManager_eu.qm 
    758 share/pcbsd/i18n/PackageManager_fa.qm 
    759 share/pcbsd/i18n/PackageManager_fi.qm 
    760 share/pcbsd/i18n/PackageManager_fr.qm 
    761 share/pcbsd/i18n/PackageManager_fr_CA.qm 
    762 share/pcbsd/i18n/PackageManager_gl.qm 
    763 share/pcbsd/i18n/PackageManager_he.qm 
    764 share/pcbsd/i18n/PackageManager_hi.qm 
    765 share/pcbsd/i18n/PackageManager_hr.qm 
    766 share/pcbsd/i18n/PackageManager_hu.qm 
    767 share/pcbsd/i18n/PackageManager_id.qm 
    768 share/pcbsd/i18n/PackageManager_is.qm 
    769 share/pcbsd/i18n/PackageManager_it.qm 
    770 share/pcbsd/i18n/PackageManager_ja.qm 
    771 share/pcbsd/i18n/PackageManager_ka.qm 
    772 share/pcbsd/i18n/PackageManager_ko.qm 
    773 share/pcbsd/i18n/PackageManager_lt.qm 
    774 share/pcbsd/i18n/PackageManager_lv.qm 
    775 share/pcbsd/i18n/PackageManager_mk.qm 
    776 share/pcbsd/i18n/PackageManager_mn.qm 
    777 share/pcbsd/i18n/PackageManager_ms.qm 
    778 share/pcbsd/i18n/PackageManager_mt.qm 
    779 share/pcbsd/i18n/PackageManager_nb.qm 
    780 share/pcbsd/i18n/PackageManager_nl.qm 
    781 share/pcbsd/i18n/PackageManager_pa.qm 
    782 share/pcbsd/i18n/PackageManager_pl.qm 
    783 share/pcbsd/i18n/PackageManager_pt.qm 
    784 share/pcbsd/i18n/PackageManager_pt_BR.qm 
    785 share/pcbsd/i18n/PackageManager_ro.qm 
    786 share/pcbsd/i18n/PackageManager_ru.qm 
    787 share/pcbsd/i18n/PackageManager_sa.qm 
    788 share/pcbsd/i18n/PackageManager_sk.qm 
    789 share/pcbsd/i18n/PackageManager_sl.qm 
    790 share/pcbsd/i18n/PackageManager_sr.qm 
    791 share/pcbsd/i18n/PackageManager_sv.qm 
    792 share/pcbsd/i18n/PackageManager_sw.qm 
    793 share/pcbsd/i18n/PackageManager_ta.qm 
    794 share/pcbsd/i18n/PackageManager_tg.qm 
    795 share/pcbsd/i18n/PackageManager_th.qm 
    796 share/pcbsd/i18n/PackageManager_tr.qm 
    797 share/pcbsd/i18n/PackageManager_uk.qm 
    798 share/pcbsd/i18n/PackageManager_uz.qm 
    799 share/pcbsd/i18n/PackageManager_vi.qm 
    800 share/pcbsd/i18n/PackageManager_zh_CN.qm 
    801 share/pcbsd/i18n/PackageManager_zh_HK.qm 
    802 share/pcbsd/i18n/PackageManager_zh_TW.qm 
    803 share/pcbsd/i18n/PackageManager_zu.qm 
    804737share/pcbsd/i18n/PCADSLDAP_zh_TW.qm 
    805738share/pcbsd/i18n/PCADSLDAP_zh_HK.qm 
     
    28772810share/applications/softmanager.desktop 
    28782811share/applications/pcbsdpbu.desktop 
    2879 share/applications/pc-pkgmanager.desktop 
    28802812share/applications/pc-updategui.desktop 
    28812813share/applications/pc-updatecenter.desktop 
  • src-qt4/src-qt4.pro

    r8fe8bea rf03134b  
    1919         pc-pbigui \ 
    2020         pc-pfmanager \ 
    21          pc-pkgmanager \ 
    2221         pc-servicemanager \ 
    2322         pc-softwaremanager \ 
Note: See TracChangeset for help on using the changeset viewer.