Changeset 3b5ba44


Ignore:
Timestamp:
05/05/14 08:09:31 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
d73f99a
Parents:
1d68f4d
Message:

Clean up the pre-update message, and also the post-update re-sync with the system.

Location:
src-qt4/pc-softwaremanager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/mainUI.cpp

    rbdd93eb r3b5ba44  
    4444  connect(ui->actionServer_Apps, SIGNAL(triggered(bool)), this, SLOT( browserViewSettingsChanged() ) ); 
    4545  connect(ui->actionRaw_Packages, SIGNAL(triggered(bool)), this, SLOT( browserViewSettingsChanged() ) ); 
     46  connect(ui->tool_app_tips, SIGNAL(clicked()), this, SLOT(on_tool_app_rank_clicked()) ); //same functionality 
    4647} 
    4748 
     
    132133  if(PBI->safeToQuit()){ 
    133134    //Get the update stats and ask for verification to start now 
    134            
     135    QMessageBox MB(QMessageBox::Question, tr("Start Updates?"), tr("Are you ready to start performing updates?")+"\n\n"+tr("NOTE: Please close any running applications first!!"), QMessageBox::Yes | QMessageBox::No, this); 
     136      MB.setDetailedText(PBI->updateDetails()); 
     137    if( QMessageBox::Yes != MB.exec() ){ 
     138      return; //cancelled 
     139    } 
     140     
    135141    //Now start the updates 
    136142    UpdateDialog dlg(this); 
     
    139145    else{ 
    140146      //re-check for updates 
     147      PBI->syncLocalPackages(); 
    141148    } 
    142149  }else{ 
  • src-qt4/pc-softwaremanager/pbiDBAccess.h

    rbdd93eb r3b5ba44  
    7474        QStringList basePackageList(); 
    7575         
     76        QString runCMD(QString cmd, QStringList args = QStringList() ); 
     77         
    7678private: 
    7779        QProcess *proc; 
     
    9597        //General utilities 
    9698        QString readOneLineFile(QString); 
    97         QString runCMD(QString cmd, QStringList args = QStringList() ); 
    9899        QStringList cmdOutput(QString cmd, QStringList args = QStringList() ); 
    99100        QString cleanupDescription(QStringList tmp); 
  • src-qt4/pc-softwaremanager/pbiNgBackend.cpp

    rbdd93eb r3b5ba44  
    6262} 
    6363 
     64void PBIBackend::syncLocalPackages(){ 
     65  //force the backend to resync the locally installed package lists/details 
     66  slotSyncToDatabase(true);      
     67} 
     68 
    6469QStringList PBIBackend::installedList(){ 
    6570   QStringList KL = APPHASH.keys(); 
     
    453458} 
    454459 
    455 QStringList PBIBackend::updateStats(){ 
    456   qDebug() << "Update stats parsing not finished yet"; 
    457   return QStringList(); 
     460QString PBIBackend::updateDetails(){ 
     461  QString details = sysDB->runCMD("pc-updatemanager pkgcheck"); 
     462  return details; 
    458463} 
    459464 
  • src-qt4/pc-softwaremanager/pbiNgBackend.h

    rbdd93eb r3b5ba44  
    3737        //General Setup or restart functions 
    3838        void setAutoInstallDesktopEntries(bool); 
    39         void setRawPkgMode(bool); 
     39        void syncLocalPackages(); 
    4040                 
    4141        int appAvailable, pkgAvailable; 
     
    9090        void runCmdAsUser(QString cmd); 
    9191        bool checkForUpdates(); 
    92         QStringList updateStats(); 
     92        QString updateDetails(); 
    9393        QStringList filterBasePkgs(QStringList); 
    9494         
Note: See TracChangeset for help on using the changeset viewer.