Changeset 999 for Vago


Ignore:
Timestamp:
Apr 26, 2014, 2:40:47 PM (11 years ago)
Author:
s10k
Message:

Vago 0.9a mac specific changes

Location:
Vago/trunk/Vago
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Vago/trunk/Vago/Vago.pro

    r998 r999  
    55#-------------------------------------------------
    66
    7 QT       += core gui
     7QT       += widgets
    88QT       += network #network communication
    99QT       += script #for json parse
    10 QT       += widgets
    1110
    1211INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib
  • Vago/trunk/Vago/libs/unzip.h

    r998 r999  
    3535#include <QtCore/QtGlobal>
    3636
    37 #include <QtZlib/zlib.h>
     37#include <zlib.h>
    3838
    3939class QDir;
  • Vago/trunk/Vago/libs/zip.h

    r998 r999  
    3434#include <QtCore/QtGlobal>
    3535
    36 #include <QtZlib/zlib.h>
     36#include <zlib.h>
    3737
    3838class QIODevice;
  • Vago/trunk/Vago/main.cpp

    r998 r999  
    33#ifdef USING_VM_TABLET_WARNING_FIX
    44#include <qapplication.h>
    5 void myMessageOutput(QtMsgType type, const char *msg);
     5void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str);
    66#endif
    77
     
    1313
    1414#ifdef USING_VM_TABLET_WARNING_FIX
    15     qInstallMsgHandler(myMessageOutput);
     15    qInstallMessageHandler(myMessageOutput);
    1616#endif
    1717
     
    2525
    2626#ifdef USING_VM_TABLET_WARNING_FIX
    27 void myMessageOutput(QtMsgType type, const char *msg)
     27void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str)
    2828{
     29
     30    const char * msg = str.toStdString().c_str();
     31
    2932    switch (type) {
    3033    case QtWarningMsg:
    31         if(QString(msg)=="QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."){ // ignore this message
     34        if(QString(msg)=="QNSView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."){ // ignore this message
    3235            return;
    3336        }
  • Vago/trunk/Vago/mainwindow.cpp

    r998 r999  
    7979    }
    8080#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);
    8383        iniChanged=true;
    8484    }
     
    9797    this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt();
    9898#ifdef Q_OS_MAC
    99     this->useYesAsDefaultInClearButton=this->vagoSettings->value("UseYesButtonClear").toBool();
     99    this->useYesAsDefaultWhenRemovingItems=this->vagoSettings->value("useYesAsDefaultWhenRemovingItems").toBool();
    100100#endif
    101101
     
    10701070
    10711071#ifdef Q_OS_MAC
    1072     if(this->useYesAsDefaultInClearButton){
     1072    if(this->useYesAsDefaultWhenRemovingItems){
    10731073        defaultButton = QMessageBox::Yes;
    10741074    }
     
    10891089
    10901090void MainWindow::clearTableContents(DropTableWidget *myTable){
     1091
     1092    QMessageBox::StandardButton defaultButton = QMessageBox::NoButton; // default button for clear asking question, only customizable in mac os
     1093
    10911094    if(myTable->rowCount()==0){
    10921095        Util::showPopUp("Nothing to clear.");
     
    10941097    }
    10951098
    1096     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)){
    10971109        myTable->clearContents();
    10981110        myTable->setRowCount(0);
  • Vago/trunk/Vago/mainwindow.h

    r998 r999  
    192192    int startedWindowHeight;
    193193#ifdef Q_OS_MAC
    194     bool useYesAsDefaultInClearButton;
     194    bool useYesAsDefaultWhenRemovingItems;
    195195#endif
    196196    QLabel *itemsLoaded;
  • Vago/trunk/Vago/preferences.cpp

    r998 r999  
    1818    ui->cbSeparate->setChecked(this->vagoSettings->value("SeparateInWorkspace").toBool());
    1919    ui->cbVagoExit->setChecked(this->vagoSettings->value("ConfirmExit").toBool());
     20#ifdef Q_OS_MAC
     21    ui->cbUseYesAsDefaultWhenRemovingItems->setChecked(this->vagoSettings->value("useYesAsDefaultWhenRemovingItems").toBool());
     22#endif
    2023
    2124#ifdef Q_OS_WIN
    22     ui->cbClearButtonYes->hide(); // don't display this mac os only option in windows
     25    ui->cbUseYesAsDefaultWhenRemovingItems->hide(); // don't display this mac os only option in windows
    2326#endif
    2427
     
    6669    this->vagoSettings->setValue("ConfirmExit",ui->cbVagoExit->isChecked());
    6770#ifdef Q_OS_MAC
    68     this->vagoSettings->setValue("UseYesButtonClear",ui->cbClearButtonYes->isChecked());
     71    this->vagoSettings->setValue("useYesAsDefaultWhenRemovingItems",ui->cbUseYesAsDefaultWhenRemovingItems->isChecked());
    6972#endif
    7073
  • Vago/trunk/Vago/preferences.ui

    r998 r999  
    88    <y>0</y>
    99    <width>493</width>
    10     <height>258</height>
     10    <height>291</height>
    1111   </rect>
    1212  </property>
     
    140140      </item>
    141141      <item>
    142        <widget class="QCheckBox" name="cbClearButtonYes">
     142       <widget class="QCheckBox" name="cbUseYesAsDefaultWhenRemovingItems">
    143143        <property name="text">
    144          <string>Use Yes button as default for Clear items</string>
     144         <string>Use Yes button as default when removing items</string>
    145145        </property>
    146146       </widget>
Note: See TracChangeset for help on using the changeset viewer.