ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/mainwindow.cpp
(Generate patch)

Comparing Vago/trunk/Vago/mainwindow.cpp (file contents):
Revision 998 by s10k, Fri Apr 25 21:05:54 2014 UTC vs.
Revision 999 by s10k, Sat Apr 26 12:40:47 2014 UTC

# Line 78 | Line 78 | MainWindow::MainWindow(QWidget *parent)
78          iniChanged=true;
79      }
80   #ifdef Q_OS_MAC
81 <    if(!this->vagoSettings->contains("UseYesButtonClear")){
82 <        this->vagoSettings->setValue("UseYesButtonClear", false);
81 >    if(!this->vagoSettings->contains("useYesAsDefaultWhenRemovingItems")){
82 >        this->vagoSettings->setValue("useYesAsDefaultWhenRemovingItems", false);
83          iniChanged=true;
84      }
85   #endif
# Line 96 | Line 96 | MainWindow::MainWindow(QWidget *parent)
96      this->startedWindowWidth=this->vagoSettings->value("WindowWidth").toInt();
97      this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt();
98   #ifdef Q_OS_MAC
99 <    this->useYesAsDefaultInClearButton=this->vagoSettings->value("UseYesButtonClear").toBool();
99 >    this->useYesAsDefaultWhenRemovingItems=this->vagoSettings->value("useYesAsDefaultWhenRemovingItems").toBool();
100   #endif
101  
102      //Create our workspace if it doesn't exists yet
# Line 1069 | Line 1069 | void MainWindow::removeTableContents(Dro
1069      }
1070  
1071   #ifdef Q_OS_MAC
1072 <    if(this->useYesAsDefaultInClearButton){
1072 >    if(this->useYesAsDefaultWhenRemovingItems){
1073          defaultButton = QMessageBox::Yes;
1074      }
1075      else{
# Line 1088 | Line 1088 | void MainWindow::removeTableContents(Dro
1088   }
1089  
1090   void MainWindow::clearTableContents(DropTableWidget *myTable){
1091 +
1092 +    QMessageBox::StandardButton defaultButton = QMessageBox::NoButton; // default button for clear asking question, only customizable in mac os
1093 +
1094      if(myTable->rowCount()==0){
1095          Util::showPopUp("Nothing to clear.");
1096          return;
1097      }
1098  
1099 <    if(Util::showQuestionPopUp(this,"Are you sure you want to clear the content?")){
1099 > #ifdef Q_OS_MAC
1100 >    if(this->useYesAsDefaultWhenRemovingItems){
1101 >        defaultButton = QMessageBox::Yes;
1102 >    }
1103 >    else{
1104 >        defaultButton = QMessageBox::No;
1105 >    }
1106 > #endif
1107 >
1108 >    if(Util::showQuestionPopUp(this,"Are you sure you want to clear the content?",defaultButton)){
1109          myTable->clearContents();
1110          myTable->setRowCount(0);
1111      }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)