Changeset 88cdb0d


Ignore:
Timestamp:
12/02/13 04:42:47 (10 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
cf34815
Parents:
91809be
Message:

Last log showing

Location:
src-qt4/pc-updatecenter
Files:
3 added
5 edited

Legend:

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

    r6cb0c08 r88cdb0d  
    33 
    44#include "dialogconflict.h" 
     5#include "logviewdialog.h" 
    56 
    67#include <QTreeWidgetItem> 
     
    89#include <QPalette> 
    910#include <QMessageBox> 
     11#include <QApplication> 
    1012 
    1113#include "pcbsd-utils.h" 
     
    112114} 
    113115 
     116void MainWindow::refreshMenu() 
     117{ 
     118    bool en_syslog= (mSysController.currentState() != CAbstractUpdateController::eUPDATING) && mSysController.hasLog(); 
     119    ui->actionLast_system_update_log->setEnabled(en_syslog); 
     120    bool en_pkglog= (mPkgController.currentState() != CAbstractUpdateController::eUPDATING) && mPkgController.hasLog(); 
     121    ui->actionLast_package_update_log->setEnabled(en_pkglog); 
     122    bool en_pbiglog= (mPBIController.currentState() != CAbstractUpdateController::eUPDATING) && mPBIController.hasLog(); 
     123    ui->actionLast_software_update_log->setEnabled(en_pbiglog); 
     124} 
     125 
    114126void MainWindow::globalStateChanged(CAbstractUpdateController::EUpdateControllerState new_state) 
    115127{ 
     128    refreshMenu(); 
     129 
    116130    bool isUpdatesAvail= (mSysController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
    117131                       ||(mPkgController.currentState() == CAbstractUpdateController::eUPDATES_AVAIL) 
     
    195209    mPBIController.check(); 
    196210} 
     211 
     212void MainWindow::on_actionLast_system_update_log_triggered() 
     213{ 
     214    LogViewDialog* dlg = new LogViewDialog(this); 
     215    dlg->showLog(&mSysController); 
     216} 
     217 
     218void MainWindow::on_actionLast_package_update_log_triggered() 
     219{ 
     220    LogViewDialog* dlg = new LogViewDialog(this); 
     221    dlg->showLog(&mPkgController); 
     222} 
     223 
     224void MainWindow::on_actionLast_software_update_log_triggered() 
     225{ 
     226    LogViewDialog* dlg = new LogViewDialog(this); 
     227    dlg->showLog(&mPBIController); 
     228} 
     229 
     230void MainWindow::on_actionExit_triggered() 
     231{ 
     232    bool isUpdate= (mSysController.currentState() == CAbstractUpdateController::eUPDATING) 
     233                 ||(mPkgController.currentState() == CAbstractUpdateController::eUPDATING) 
     234                 ||(mPBIController.currentState() == CAbstractUpdateController::eUPDATING); 
     235    if (isUpdate) 
     236    { 
     237        QMessageBox::StandardButton reply; 
     238        reply = QMessageBox::question(this, tr("Update process not finished"), tr("One or more update process is not finished. Exit anyway?"), 
     239                                        QMessageBox::Yes|QMessageBox::No); 
     240        if (reply == QMessageBox::No) { 
     241            return; 
     242        } 
     243    } 
     244    QApplication::exit(); 
     245} 
  • src-qt4/pc-updatecenter/mainwindow.h

    r6cb0c08 r88cdb0d  
    2727    void init(); 
    2828 
     29    void refreshMenu(); 
     30 
    2931    CSysController  mSysController; 
    3032    CPkgController  mPkgController; 
     
    4042    void on_pushButton_clicked(); 
    4143    void on_checkAllButton_clicked(); 
     44    void on_actionLast_system_update_log_triggered(); 
     45    void on_actionLast_package_update_log_triggered(); 
     46    void on_actionLast_software_update_log_triggered(); 
     47    void on_actionExit_triggered(); 
    4248}; 
    4349 
  • src-qt4/pc-updatecenter/mainwindow.ui

    r6cb0c08 r88cdb0d  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>631</width> 
    10     <height>445</height> 
     9    <width>629</width> 
     10    <height>443</height> 
    1111   </rect> 
    1212  </property> 
     
    339339     <x>0</x> 
    340340     <y>0</y> 
    341      <width>631</width> 
     341     <width>629</width> 
    342342     <height>21</height> 
    343343    </rect> 
  • src-qt4/pc-updatecenter/pc-updatecenter.pro

    rf9991e8 r88cdb0d  
    2727    sysdetailswidget.cpp \ 
    2828    pkgdetailswidget.cpp \ 
    29     pbidetailswidget.cpp 
     29    pbidetailswidget.cpp \ 
     30    logviewdialog.cpp 
    3031 
    3132HEADERS  += mainwindow.h \ 
     
    4041    iconset.h \ 
    4142    pkgdetailswidget.h \ 
    42     pbidetailswidget.h 
     43    pbidetailswidget.h \ 
     44    logviewdialog.h 
    4345 
    4446FORMS    += mainwindow.ui \ 
     
    4749    sysdetailswidget.ui \ 
    4850    pkgdetailswidget.ui \ 
    49     pbidetailswidget.ui 
     51    pbidetailswidget.ui \ 
     52    logviewdialog.ui 
    5053 
    5154RESOURCES += \ 
  • src-qt4/pc-updatecenter/sysdetailswidget.ui

    re9c3453 r88cdb0d  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>610</width> 
    10     <height>311</height> 
     9    <width>608</width> 
     10    <height>309</height> 
    1111   </rect> 
    1212  </property> 
Note: See TracChangeset for help on using the changeset viewer.