Changeset 79ad6f7


Ignore:
Timestamp:
11/19/13 05:00:26 (11 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
83c9350
Parents:
0e3e712
Message:

'Update all' button now works

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

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-updatecenter/mainwindow.cpp

    r0e3e712 r79ad6f7  
    112112    connect(&mSysController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
    113113            this, SLOT(sysStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
     114    connect(&mSysController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
     115            this, SLOT(globalStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
    114116    connect(&mPkgController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
    115117            this, SLOT(pkgStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
     118    connect(&mPkgController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
     119            this, SLOT(globalStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
    116120    connect(&mPkgController, SIGNAL(progress(CAbstractUpdateController::SProgress)), 
    117121            this, SLOT(pkgProgress(CAbstractUpdateController::SProgress))); 
     
    120124    connect(&mPBIController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
    121125            this, SLOT(pbiStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
     126    connect(&mPBIController, SIGNAL(stateChanged(CAbstractUpdateController::EUpdateControllerState)), 
     127            this, SLOT(globelStateChanged(CAbstractUpdateController::EUpdateControllerState))); 
    122128    connect(&mPBIController, SIGNAL(progress(CAbstractUpdateController::SProgress)), 
    123129            this, SLOT(pbiProgress(CAbstractUpdateController::SProgress))); 
     130 
     131 
    124132 
    125133 
     
    324332} 
    325333 
     334void MainWindow::globalStateChanged(CAbstractUpdateController::EUpdateControllerState new_state) 
     335{ 
     336    bool isUpdatesAvail= (mSysController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     337                       ||(mPkgController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     338                       ||(mPBIController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL); 
     339 
     340    ui->updateAllButton->setEnabled(isUpdatesAvail); 
     341} 
     342 
    326343void MainWindow::pbiProgress(CAbstractUpdateController::SProgress progress) 
    327344{ 
     
    401418    } 
    402419} 
     420 
     421void MainWindow::on_updateAllButton_clicked() 
     422{ 
     423    if (mSysController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     424        mSysController.updateAll(); 
     425    if (mPkgController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     426        mPkgController.updateAll(); 
     427    if (mPBIController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     428        mPBIController.updateAll(); 
     429} 
  • src-qt4/pc-updatecenter/mainwindow.h

    r06ea16c r79ad6f7  
    3636    void pbiStateChanged(CAbstractUpdateController::EUpdateControllerState new_state); 
    3737 
     38    void globalStateChanged(CAbstractUpdateController::EUpdateControllerState new_state); 
     39 
    3840    void pbiProgress(CAbstractUpdateController::SProgress progress); 
    3941    void pkgProgress(CAbstractUpdateController::SProgress progress); 
  • src-qt4/pc-updatecenter/mainwindow.ui

    r0e3e712 r79ad6f7  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>639</width> 
    10     <height>453</height> 
     9    <width>637</width> 
     10    <height>451</height> 
    1111   </rect> 
    1212  </property> 
     
    2626      </property> 
    2727      <property name="currentIndex"> 
    28        <number>1</number> 
     28       <number>0</number> 
    2929      </property> 
    3030      <property name="documentMode"> 
     
    219219            </item> 
    220220            <item> 
    221              <widget class="QPushButton" name="pushButton"> 
     221             <widget class="QPushButton" name="updateAllButton"> 
     222              <property name="enabled"> 
     223               <bool>false</bool> 
     224              </property> 
    222225              <property name="text"> 
    223226               <string>Update all</string> 
     
    757760     <x>0</x> 
    758761     <y>0</y> 
    759      <width>639</width> 
    760      <height>22</height> 
     762     <width>637</width> 
     763     <height>21</height> 
    761764    </rect> 
    762765   </property> 
  • src-qt4/pc-updatecenter/syscontroller.cpp

    r0e3e712 r79ad6f7  
    2424{ 
    2525    misFREEBSDCheck= false; 
     26 
     27    QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); 
     28    env.insert("PCFETCHGUI", "YES"); 
     29    process().setProcessEnvironment(env); 
     30 
    2631} 
    2732 
Note: See TracChangeset for help on using the changeset viewer.