Changes in / [50676f3:4ba9054e]


Ignore:
Location:
src-qt4/pc-pkgmanager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-pkgmanager/mainWin.cpp

    re55b4d0 r426313b  
    14281428   groupInfo->setVisible(false); 
    14291429} 
     1430 
     1431void mainWin::closeEvent(QCloseEvent *event) { 
     1432 
     1433  if ( pkgCmdList.isEmpty() ) { 
     1434    this->close(); 
     1435    return;    
     1436  } 
     1437  if ( pkgCmdList.at(0).at(0).isEmpty() ) { 
     1438    this->close(); 
     1439    return;   
     1440  } 
     1441 
     1442  //Verify that they want to continue 
     1443  QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Processes Running"), tr("Packages are currently being changed. Are you sure you want to quit?"), QMessageBox::Yes | QMessageBox::Cancel,QMessageBox::Cancel); 
     1444  if(button == QMessageBox::Yes) { 
     1445    this->close(); 
     1446  } else { 
     1447    event->ignore(); 
     1448    return; 
     1449  } 
     1450} 
     1451 
  • src-qt4/pc-pkgmanager/mainWin.h

    re55b4d0 r426313b  
    22#define MAINWIN_H 
    33 
     4#include <QCloseEvent> 
    45#include <QDialog> 
    56#include <QFile> 
     
    3839    void ProgramInit(QString); 
    3940    void slotSingleInstance(); 
     41 
     42protected: 
     43    void closeEvent(QCloseEvent *event); 
    4044 
    4145private slots: 
Note: See TracChangeset for help on using the changeset viewer.