Index: /Vago/trunk/Vago/Vago.pro
===================================================================
--- /Vago/trunk/Vago/Vago.pro	(revision 997)
+++ /Vago/trunk/Vago/Vago.pro	(revision 998)
@@ -8,5 +8,7 @@
 QT       += network #network communication
 QT       += script #for json parse
+QT       += widgets
 
+INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib
 INCLUDEPATH += ./libs
 INCLUDEPATH += ./packageWizard
Index: /Vago/trunk/Vago/droptablewidget.h
===================================================================
--- /Vago/trunk/Vago/droptablewidget.h	(revision 997)
+++ /Vago/trunk/Vago/droptablewidget.h	(revision 998)
@@ -3,5 +3,5 @@
 
 #include <QTableWidget>
-#include <QtGui>
+#include <QtWidgets>
 
 #include "util.h"
Index: /Vago/trunk/Vago/libs/unzip.cpp
===================================================================
--- /Vago/trunk/Vago/libs/unzip.cpp	(revision 997)
+++ /Vago/trunk/Vago/libs/unzip.cpp	(revision 998)
@@ -327,5 +327,5 @@
         return UnZip::ReadFailed;
 
-    QString filename = QString::fromAscii(buffer2, szName);
+    QString filename = QString::fromUtf8(buffer2, szName);
     if (filename != path) {
         qDebug() << "Filename in local header mismatches.";
@@ -556,5 +556,5 @@
         skipEntry = true;
     } else {
-        filename = QString::fromAscii(buffer2, szName);
+        filename = QString::fromUtf8(buffer2, szName);
     }
 
@@ -611,5 +611,5 @@
         }
 
-        h->comment = QString::fromAscii(buffer2, szComment);
+        h->comment = QString::fromUtf8(buffer2, szComment);
     }
 
@@ -1005,5 +1005,5 @@
     keys[2] = 878082192L;
 
-    QByteArray pwdBytes = pwd.toAscii();
+    QByteArray pwdBytes = pwd.toUtf8();
     int sz = pwdBytes.size();
     const char* ascii = pwdBytes.data();
Index: /Vago/trunk/Vago/libs/unzip.h
===================================================================
--- /Vago/trunk/Vago/libs/unzip.h	(revision 997)
+++ /Vago/trunk/Vago/libs/unzip.h	(revision 998)
@@ -35,5 +35,5 @@
 #include <QtCore/QtGlobal>
 
-#include <zlib/zlib.h>
+#include <QtZlib/zlib.h>
 
 class QDir;
Index: /Vago/trunk/Vago/libs/zip.cpp
===================================================================
--- /Vago/trunk/Vago/libs/zip.cpp	(revision 997)
+++ /Vago/trunk/Vago/libs/zip.cpp	(revision 998)
@@ -822,5 +822,5 @@
 
 	// filename length
-	QByteArray entryNameBytes = entryName.toAscii();
+    QByteArray entryNameBytes = entryName.toUtf8();
 	int sz = entryNameBytes.size();
 
@@ -971,5 +971,5 @@
 	keys[2] = 878082192L;
 
-	QByteArray pwdBytes = password.toAscii();
+    QByteArray pwdBytes = password.toUtf8();
 	int sz = pwdBytes.size();
 	const char* ascii = pwdBytes.data();
@@ -1192,5 +1192,5 @@
 
 	// filename
-	QByteArray fileNameBytes = fileName.toAscii();
+    QByteArray fileNameBytes = fileName.toUtf8();
 	sz = fileNameBytes.size();
 	buffer1[ZIP_CD_OFF_NAMELEN] = sz & 0xFF;
@@ -1267,5 +1267,5 @@
 
 	// ZIP file comment length
-	QByteArray commentBytes = comment.toAscii();
+    QByteArray commentBytes = comment.toUtf8();
 	quint16 commentLength = commentBytes.size();
 
Index: /Vago/trunk/Vago/libs/zip.h
===================================================================
--- /Vago/trunk/Vago/libs/zip.h	(revision 997)
+++ /Vago/trunk/Vago/libs/zip.h	(revision 998)
@@ -34,5 +34,5 @@
 #include <QtCore/QtGlobal>
 
-#include <zlib/zlib.h>
+#include <QtZlib/zlib.h>
 
 class QIODevice;
Index: /Vago/trunk/Vago/main.cpp
===================================================================
--- /Vago/trunk/Vago/main.cpp	(revision 997)
+++ /Vago/trunk/Vago/main.cpp	(revision 998)
@@ -6,5 +6,5 @@
 #endif
 
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
 #include "mainwindow.h"
 
Index: /Vago/trunk/Vago/mainwindow.cpp
===================================================================
--- /Vago/trunk/Vago/mainwindow.cpp	(revision 997)
+++ /Vago/trunk/Vago/mainwindow.cpp	(revision 998)
@@ -78,4 +78,10 @@
         iniChanged=true;
     }
+#ifdef Q_OS_MAC
+    if(!this->vagoSettings->contains("UseYesButtonClear")){
+        this->vagoSettings->setValue("UseYesButtonClear", false);
+        iniChanged=true;
+    }
+#endif
 
     if(iniChanged){
@@ -90,4 +96,7 @@
     this->startedWindowWidth=this->vagoSettings->value("WindowWidth").toInt();
     this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt();
+#ifdef Q_OS_MAC
+    this->useYesAsDefaultInClearButton=this->vagoSettings->value("UseYesButtonClear").toBool();
+#endif
 
     //Create our workspace if it doesn't exists yet
@@ -127,5 +136,5 @@
     setConverterButtonsSize();
 
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
     // setUnifiedTitleAndToolBarOnMac(true); // Qt suggests to use it on mac | http://www.slideshare.net/qtbynokia/how-to-make-your-qt-app-look-native // align on left doesn't work if active
     ui->tbOni->setIcon(QIcon(":/new/icons/oni_icon_mac.png")); // Oni executable on mac have a different icon than windows
@@ -191,5 +200,5 @@
         arguments << "-noswitch";
     }
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
     else{
         arguments << "-switch"; // only supported on windows. Was added by daodan dll.
@@ -531,5 +540,11 @@
             command+=":"+ui->leSpecificFilesLevels->text();
         }
-        command+=" "+myOutputFolder+" "+file;
+
+        if(from=="DAT" && to=="ONI FILES"){ // extract files to a subdir with the files name ex: level0_Final
+            command += " " + myOutputFolder.insert(myOutputFolder.size()-2,QString(Util::cutName(file)).replace(".dat","")) + " " + file;
+        }
+        else{
+            command+=" "+myOutputFolder+" "+file;
+        }
 
     }
@@ -1047,4 +1062,6 @@
     int size = myTable->selectionModel()->selectedRows().size();
 
+    QMessageBox::StandardButton defaultButton = QMessageBox::NoButton; // default button for clear asking question, only customizable in mac os
+
     if(size==0){
         Util::showPopUp("Select a row first.");
@@ -1052,5 +1069,15 @@
     }
 
-    if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?")){
+#ifdef Q_OS_MAC
+    if(this->useYesAsDefaultInClearButton){
+        defaultButton = QMessageBox::Yes;
+    }
+    else{
+        defaultButton = QMessageBox::No;
+    }
+#endif
+
+
+    if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?",defaultButton)){
         for(int i=0; i<size; i++){
             //myTable->removeRow(myTable->selectedItems().at(size-i-1)->row());
@@ -1171,17 +1198,22 @@
 /**
   Update items loaded
-  **/
-void MainWindow::on_tabWidget_selected(const QString &arg1)
-{
-    if(arg1.compare("General",Qt::CaseSensitive)==0){ //case sentive is faster
+**/
+void MainWindow::on_tabWidget_currentChanged(int index)
+{
+    QString tabtext = ui->tabWidget->tabText(index);
+
+    if(tabtext.compare("XML",Qt::CaseSensitive)==0){ //case sentive is faster
         updateItemsLoaded(ui->twSourcesXML);
     }
-    else if(arg1.compare("Textures",Qt::CaseSensitive)==0){
+    else if(tabtext.compare("Textures",Qt::CaseSensitive)==0){
         updateItemsLoaded(ui->twSourcesTextures);
     }
-    else if(arg1.compare("Objects",Qt::CaseSensitive)==0){
+    else if(tabtext.compare("Characters",Qt::CaseSensitive)==0){
+        updateItemsLoaded(ui->twSourcesCharacters);
+    }
+    else if(tabtext.compare("Objects",Qt::CaseSensitive)==0){
         updateItemsLoaded(ui->twSourcesObjects);
     }
-    else if(arg1.compare("Levels",Qt::CaseSensitive)==0){
+    else if(tabtext.compare("Levels",Qt::CaseSensitive)==0){
         updateItemsLoaded(ui->twSourcesLevels);
     }
@@ -1533,5 +1565,5 @@
   **/
 QString MainWindow::getOSIndependentAppPath(){
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
     QDir dir = QDir::current();
     if(dir.absolutePath().contains(".app")){ // include bundle, but we don't want it
Index: /Vago/trunk/Vago/mainwindow.h
===================================================================
--- /Vago/trunk/Vago/mainwindow.h	(revision 997)
+++ /Vago/trunk/Vago/mainwindow.h	(revision 998)
@@ -137,6 +137,4 @@
     void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets
 
-    void on_tabWidget_selected(const QString &arg1);
-
     void checkVagoLastVersion(QNetworkReply *result); //check vago last version
 
@@ -180,4 +178,6 @@
 
     void on_tbAbortConversion_clicked();
+
+    void on_tabWidget_currentChanged(int index);
 
 private:
@@ -191,4 +191,7 @@
     int startedWindowWidth;
     int startedWindowHeight;
+#ifdef Q_OS_MAC
+    bool useYesAsDefaultInClearButton;
+#endif
     QLabel *itemsLoaded;
     QProgressBar *myBar; //Progress Bar
Index: /Vago/trunk/Vago/packageWizard/packagewizard.cpp
===================================================================
--- /Vago/trunk/Vago/packageWizard/packagewizard.cpp	(revision 997)
+++ /Vago/trunk/Vago/packageWizard/packagewizard.cpp	(revision 998)
@@ -15,5 +15,5 @@
 
     //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/)
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
     myWizard.resize(640,480);
 #else
Index: /Vago/trunk/Vago/preferences.cpp
===================================================================
--- /Vago/trunk/Vago/preferences.cpp	(revision 997)
+++ /Vago/trunk/Vago/preferences.cpp	(revision 998)
@@ -18,4 +18,8 @@
     ui->cbSeparate->setChecked(this->vagoSettings->value("SeparateInWorkspace").toBool());
     ui->cbVagoExit->setChecked(this->vagoSettings->value("ConfirmExit").toBool());
+
+#ifdef Q_OS_WIN
+    ui->cbClearButtonYes->hide(); // don't display this mac os only option in windows
+#endif
 
 }
@@ -61,4 +65,8 @@
     this->vagoSettings->setValue("SeparateInWorkspace",ui->cbSeparate->isChecked());
     this->vagoSettings->setValue("ConfirmExit",ui->cbVagoExit->isChecked());
+#ifdef Q_OS_MAC
+    this->vagoSettings->setValue("UseYesButtonClear",ui->cbClearButtonYes->isChecked());
+#endif
+
 
     Util::showPopUp("You need to restart the application to all changes take effect.");
Index: /Vago/trunk/Vago/preferences.ui
===================================================================
--- /Vago/trunk/Vago/preferences.ui	(revision 997)
+++ /Vago/trunk/Vago/preferences.ui	(revision 998)
@@ -139,4 +139,11 @@
        </widget>
       </item>
+      <item>
+       <widget class="QCheckBox" name="cbClearButtonYes">
+        <property name="text">
+         <string>Use Yes button as default for Clear items</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
Index: /Vago/trunk/Vago/readme.txt
===================================================================
--- /Vago/trunk/Vago/readme.txt	(revision 997)
+++ /Vago/trunk/Vago/readme.txt	(revision 998)
@@ -1,5 +1,5 @@
 Readme.txt
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Vago GUI v0.9
+Vago GUI v0.9a
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -37,4 +37,14 @@
 ----------------------------------
 Change Log:
+----------------------------------
+0.9a, 25-04-2014
+-Upgraded Qt libraries to version 5
+-Updated OniSplit to 0.9.96.0 version
+-Fixed the bug where the items loaded counter in status bar wasn't updated 
+when changing tabs
+-Now levels->dat - oni files get extracted to a subfolder with the level's
+extracted name (requested by paradox)
+-Now in Mac OS is possible to choose Yes button by default when clearing the 
+files contents (requested by edt)
 ----------------------------------
 0.9, 08-01-2014
Index: /Vago/trunk/Vago/soundWizard/soundwizard.cpp
===================================================================
--- /Vago/trunk/Vago/soundWizard/soundwizard.cpp	(revision 997)
+++ /Vago/trunk/Vago/soundWizard/soundwizard.cpp	(revision 998)
@@ -23,5 +23,5 @@
 
     //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/)
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
     this->myWizard->resize(640,480);
 #else
Index: /Vago/trunk/Vago/util.cpp
===================================================================
--- /Vago/trunk/Vago/util.cpp	(revision 997)
+++ /Vago/trunk/Vago/util.cpp	(revision 998)
@@ -68,6 +68,6 @@
 }
 
-bool showQuestionPopUp(QWidget * parent, QString message){
-    return QMessageBox::question (parent, "Are you sure?", message, QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes;
+bool showQuestionPopUp(QWidget * parent, QString message, QMessageBox::StandardButton standardButton){
+    return QMessageBox::question (parent, "Are you sure?", message, QMessageBox::Yes | QMessageBox::No, standardButton)==QMessageBox::Yes;
 }
 
@@ -162,5 +162,5 @@
             }
         } else {
-            qDebug("Unhandled item" + info.filePath().toAscii() + "in cpDir");
+            qDebug("Unhandled item" + info.filePath().toUtf8() + "in cpDir");
         }
     }
Index: /Vago/trunk/Vago/util.h
===================================================================
--- /Vago/trunk/Vago/util.h	(revision 997)
+++ /Vago/trunk/Vago/util.h	(revision 998)
@@ -13,9 +13,9 @@
 
 namespace GlobalVars{
-const QString AppVersion="0.9";
+const QString AppVersion="0.9a";
 const QString OniSplitString="OniSplit.exe";
 const QString XmlToolsString="xmlTools.exe";
 
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
 const QString OniExe="Oni.exe";
 const QString OniSplitExeName=OniSplitString;
@@ -28,8 +28,8 @@
 
 const QString AppLogName="logVago.txt";
-const QString BuiltOniSplitVersion="0.9.94.0";
+const QString BuiltOniSplitVersion="0.9.96.0";
 const QString BuiltXmlToolsVersion="0.8d";
 const QString ModsDomain="mods.oni2.net";
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
 const QString VagoNode = "247";
 #else
@@ -59,5 +59,5 @@
 QStringList substring(QString myString,QString separator,Qt::CaseSensitivity cs = Qt::CaseSensitive);
 int indexOfBackward(QString myString, QString toSearch, int from = -1);
-bool showQuestionPopUp(QWidget * parent, QString message);
+bool showQuestionPopUp(QWidget * parent, QString message, QMessageBox::StandardButton standardButton=QMessageBox::NoButton);
 bool checkEmptySpaces(QStringList toCheck);
 bool checkIfIntegers(QStringList toCheck);
