OSDN Git Service

Small improvement to UpdateDialog.
[lamexp/LameXP.git] / src / Dialog_MainWindow.cpp
index c6afdf2..27469be 100644 (file)
@@ -1,11 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2020 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
 // the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// (at your option) any later version; always including the non-optional
+// LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "Dialog_MainWindow.h"
 
 //UIC includes
-#include "../tmp/UIC_MainWindow.h"
+#include "UIC_MainWindow.h"
 
 //LameXP includes
 #include "Global.h"
-#include "Resource.h"
 #include "Dialog_WorkingBanner.h"
 #include "Dialog_MetaInfo.h"
 #include "Dialog_About.h"
 #include "Dialog_CueImport.h"
 #include "Dialog_LogView.h"
 #include "Thread_FileAnalyzer.h"
-#include "Thread_FileAnalyzer_ST.h"
 #include "Thread_MessageHandler.h"
 #include "Model_MetaInfo.h"
 #include "Model_Settings.h"
 #include "Model_FileList.h"
 #include "Model_FileSystem.h"
-#include "WinSevenTaskbar.h"
+#include "Model_FileExts.h"
 #include "Registry_Encoder.h"
 #include "Registry_Decoder.h"
 #include "Encoder_Abstract.h"
 #include "ShellIntegration.h"
 #include "CustomEventFilter.h"
 
+//Mutils includes
+#include <MUtils/Global.h>
+#include <MUtils/OSSupport.h>
+#include <MUtils/GUI.h>
+#include <MUtils/Exception.h>
+#include <MUtils/Sound.h>
+#include <MUtils/Translation.h>
+#include <MUtils/Version.h>
+
 //Qt includes
 #include <QMessageBox>
 #include <QTimer>
 #include <QResource>
 #include <QScrollBar>
 
-//System includes
-#include <MMSystem.h>
-#include <ShellAPI.h>
+////////////////////////////////////////////////////////////
+// Constants
+////////////////////////////////////////////////////////////
+
+static const unsigned int IDM_ABOUTBOX = 0xEFF0;
+static const char *g_hydrogen_audio_url = "http://wiki.hydrogenaud.io/index.php?title=Main_Page";
+static const char *g_documents_base_url = "http://lamexp.sourceforge.net/doc";
 
 ////////////////////////////////////////////////////////////
-// Helper macros
+// Helper Macros
 ////////////////////////////////////////////////////////////
 
-#define ABORT_IF_BUSY do \
+#define BANNER_VISIBLE ((!m_banner.isNull()) && m_banner->isVisible())
+
+#define INIT_BANNER() do \
 { \
-       if(m_banner->isVisible() || m_delayedFileTimer->isActive()) \
+       if(m_banner.isNull()) \
        { \
-               MessageBeep(MB_ICONEXCLAMATION); \
-               return; \
+               m_banner.reset(new WorkingBanner(this)); \
        } \
 } \
 while(0)
 
-#define SET_TEXT_COLOR(WIDGET, COLOR) do \
-{ \
-       QPalette _palette = WIDGET->palette(); \
-       _palette.setColor(QPalette::WindowText, (COLOR)); \
-       _palette.setColor(QPalette::Text, (COLOR)); \
-       WIDGET->setPalette(_palette); \
-} \
-while(0)
-
-#define SET_FONT_BOLD(WIDGET,BOLD) do \
-{ \
-       QFont _font = WIDGET->font(); \
-       _font.setBold(BOLD); \
-       WIDGET->setFont(_font); \
-} \
-while(0)
-
-#define TEMP_HIDE_DROPBOX(CMD) do \
+#define ABORT_IF_BUSY do \
 { \
-       bool _dropBoxVisible = m_dropBox->isVisible(); \
-       if(_dropBoxVisible) m_dropBox->hide(); \
-       do { CMD } while(0); \
-       if(_dropBoxVisible) m_dropBox->show(); \
+       if(BANNER_VISIBLE || m_delayedFileTimer->isActive() || (QApplication::activeModalWidget() != NULL)) \
+       { \
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN); \
+               return; \
+       } \
 } \
 while(0)
 
-#define SET_MODEL(VIEW, MODEL) do \
+#define PLAY_SOUND_OPTIONAL(NAME, ASYNC) do \
 { \
-       QItemSelectionModel *_tmp = (VIEW)->selectionModel(); \
-       (VIEW)->setModel(MODEL); \
-       LAMEXP_DELETE(_tmp); \
+       if(m_settings->soundsEnabled()) MUtils::Sound::play_sound((NAME), (ASYNC)); \
 } \
 while(0)
 
-#define SET_CHECKBOX_STATE(CHCKBX, STATE) do \
+#define SHOW_CORNER_WIDGET(FLAG) do \
 { \
-       if((CHCKBX)->isChecked() != (STATE)) \
-       { \
-               (CHCKBX)->click(); \
-       } \
-       if((CHCKBX)->isChecked() != (STATE)) \
+       if(QWidget *cornerWidget = ui->menubar->cornerWidget()) \
        { \
-               qWarning("Warning: Failed to set checkbox " #CHCKBX " state!"); \
+               cornerWidget->setVisible((FLAG)); \
        } \
 } \
 while(0)
 
-#define TRIM_STRING_RIGHT(STR) do \
-{ \
-       while((STR.length() > 0) && STR[STR.length()-1].isSpace()) STR.chop(1); \
-} \
-while(0)
+#define LINK(URL) \
+       (QString("<a href=\"%1\">%2</a>").arg(URL).arg(QString(URL).replace("-", "&minus;")))
 
-#define MAKE_TRANSPARENT(WIDGET, FLAG) do \
-{ \
-       QPalette _p = (WIDGET)->palette(); \
-       _p.setColor(QPalette::Background, Qt::transparent); \
-       (WIDGET)->setPalette(FLAG ? _p : QPalette()); \
-} \
-while(0)
+#define LINK_EX(URL, NAME) \
+       (QString("<a href=\"%1\">%2</a>").arg(URL).arg(QString(NAME).replace("-", "&minus;")))
 
-#define WITH_BLOCKED_SIGNALS(WIDGET, CMD, ...) do \
-{ \
-       const bool _flag = (WIDGET)->blockSignals(true); \
-       (WIDGET)->CMD(__VA_ARGS__); \
-       if(!(_flag)) { (WIDGET)->blockSignals(false); } \
-} \
-while(0)
+#define FSLINK(PATH) \
+       (QString("<a href=\"file:///%1\">%2</a>").arg(PATH).arg(QString(PATH).replace("-", "&minus;")))
+
+#define CENTER_CURRENT_OUTPUT_FOLDER_DELAYED() \
+       QTimer::singleShot(125, this, SLOT(centerOutputFolderModel()))
+
+////////////////////////////////////////////////////////////
+// Static Functions
+////////////////////////////////////////////////////////////
+
+static inline void SET_TEXT_COLOR(QWidget *const widget, const QColor &color)
+{
+       QPalette _palette = widget->palette();
+       _palette.setColor(QPalette::WindowText, (color));
+       _palette.setColor(QPalette::Text, (color));
+       widget->setPalette(_palette);
+}
+
+static inline void SET_FONT_BOLD(QWidget *const widget, const bool &bold)
+{ 
+       QFont _font = widget->font();
+       _font.setBold(bold);
+       widget->setFont(_font);
+}
+
+static inline void SET_FONT_BOLD(QAction *const widget, const bool &bold)
+{ 
+       QFont _font = widget->font();
+       _font.setBold(bold);
+       widget->setFont(_font);
+}
+
+static inline void SET_MODEL(QAbstractItemView *const view, QAbstractItemModel *const model)
+{
+       QItemSelectionModel *_tmp = view->selectionModel();
+       view->setModel(model);
+       MUTILS_DELETE(_tmp);
+}
+
+static inline void SET_CHECKBOX_STATE(QCheckBox *const chckbx, const bool &state)
+{
+       const bool isDisabled = (!chckbx->isEnabled());
+       if(isDisabled)
+       {
+               chckbx->setEnabled(true);
+       }
+       if(chckbx->isChecked() != state)
+       {
+               chckbx->click();
+       }
+       if(chckbx->isChecked() != state)
+       {
+               qWarning("Warning: Failed to set checkbox %p state!", chckbx);
+       }
+       if(isDisabled)
+       {
+               chckbx->setEnabled(false);
+       }
+}
 
-#define LINK(URL) QString("<a href=\"%1\">%2</a>").arg(URL).arg(QString(URL).replace("-", "&minus;"))
-#define FSLINK(PATH) QString("<a href=\"file:///%1\">%2</a>").arg(PATH).arg(QString(PATH).replace("-", "&minus;"))
-//#define USE_NATIVE_FILE_DIALOG (lamexp_themes_enabled() || ((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) < QSysInfo::WV_XP))
-#define CENTER_CURRENT_OUTPUT_FOLDER_DELAYED QTimer::singleShot(125, this, SLOT(centerOutputFolderModel()))
+static inline void TRIM_STRING_RIGHT(QString &str)
+{
+       while((str.length() > 0) && str[str.length()-1].isSpace())
+       {
+               str.chop(1);
+       }
+}
 
-static const DWORD IDM_ABOUTBOX = 0xEFF0;
+static inline void MAKE_TRANSPARENT(QWidget *const widget, const bool &flag)
+{
+       QPalette _p = widget->palette(); \
+       _p.setColor(QPalette::Background, Qt::transparent);
+       widget->setPalette(flag ? _p : QPalette());
+}
+
+template <typename T>
+static QList<T>& INVERT_LIST(QList<T> &list)
+{
+       if(!list.isEmpty())
+       {
+               const int limit = list.size() / 2, maxIdx = list.size() - 1;
+               for(int k = 0; k < limit; k++) list.swap(k, maxIdx - k);
+       }
+       return list;
+}
+
+static quint32 encodeInstances(quint32 instances)
+{
+       if (instances > 16U)
+       {
+               instances -= (instances - 16U) / 2U;
+               if (instances > 24U)
+               {
+                       instances -= (instances - 24U) / 2U;
+               }
+       }
+       return instances;
+}
+
+static quint32 decodeInstances(quint32 instances)
+{
+       if (instances > 16U)
+       {
+               instances += instances - 16U;
+               if (instances > 32U)
+               {
+                       instances += instances - 32U;
+               }
+       }
+       return instances;
+}
+
+////////////////////////////////////////////////////////////
+// Helper Classes
+////////////////////////////////////////////////////////////
+
+class WidgetHideHelper
+{
+public:
+       WidgetHideHelper(QWidget *const widget) : m_widget(widget), m_visible(widget && widget->isVisible()) { if(m_widget && m_visible) m_widget->hide(); }
+       ~WidgetHideHelper(void)                                                                              { if(m_widget && m_visible) m_widget->show(); }
+private:
+       QWidget *const m_widget;
+       const bool m_visible;
+};
+
+class SignalBlockHelper
+{
+public:
+       SignalBlockHelper(QObject *const object) : m_object(object), m_flag(object && object->blockSignals(true)) {}
+       ~SignalBlockHelper(void) { if(m_object && (!m_flag)) m_object->blockSignals(false); }
+private:
+       QObject *const m_object;
+       const bool m_flag;
+};
+
+class FileListBlockHelper
+{
+public:
+       FileListBlockHelper(FileListModel *const fileList) : m_fileList(fileList) { if(m_fileList) m_fileList->setBlockUpdates(true);  }
+       ~FileListBlockHelper(void)                                                { if(m_fileList) m_fileList->setBlockUpdates(false); }
+private:
+       FileListModel *const m_fileList;
+};
 
 ////////////////////////////////////////////////////////////
 // Constructor
 ////////////////////////////////////////////////////////////
 
-MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, SettingsModel *settingsModel, QWidget *parent)
+MainWindow::MainWindow(MUtils::IPCChannel *const ipcChannel, FileListModel *const fileListModel, AudioFileModel_MetaInfo *const metaInfo, SettingsModel *const settingsModel, QWidget *const parent)
 :
        QMainWindow(parent),
        ui(new Ui::MainWindow),
        m_fileListModel(fileListModel),
        m_metaData(metaInfo),
        m_settings(settingsModel),
-       m_fileSystemModel(NULL),
        m_accepted(false),
        m_firstTimeShown(true),
        m_outputFolderViewCentering(false),
@@ -187,64 +299,76 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        //Init the dialog, from the .ui file
        ui->setupUi(this);
        setWindowFlags(windowFlags() ^ Qt::WindowMaximizeButtonHint);
-       
+       setMinimumSize(this->size());
+
+       //Create window icon
+       MUtils::GUI::set_window_icon(this, lamexp_app_icon(), true);
+
        //Register meta types
        qRegisterMetaType<AudioFileModel>("AudioFileModel");
 
        //Enabled main buttons
        connect(ui->buttonAbout, SIGNAL(clicked()), this, SLOT(aboutButtonClicked()));
        connect(ui->buttonStart, SIGNAL(clicked()), this, SLOT(encodeButtonClicked()));
-       connect(ui->buttonQuit, SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
+       connect(ui->buttonQuit,  SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
 
        //Setup tab widget
        ui->tabWidget->setCurrentIndex(0);
        connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabPageChanged(int)));
 
        //Add system menu
-       if(HMENU hMenu = ::GetSystemMenu(winId(), FALSE))
-       {
-               AppendMenuW(hMenu, MF_SEPARATOR, 0, 0);
-               AppendMenuW(hMenu, MF_STRING, IDM_ABOUTBOX, L"About...");
-       }
+       MUtils::GUI::sysmenu_append(this, IDM_ABOUTBOX, "About...");
+
+       //Setup corner widget
+       QLabel *cornerWidget = new QLabel(ui->menubar);
+       m_evenFilterCornerWidget.reset(new CustomEventFilter);
+       cornerWidget->setText("N/A");
+       cornerWidget->setFixedHeight(ui->menubar->height());
+       cornerWidget->setCursor(QCursor(Qt::PointingHandCursor));
+       cornerWidget->hide();
+       cornerWidget->installEventFilter(m_evenFilterCornerWidget.data());
+       connect(m_evenFilterCornerWidget.data(), SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(cornerWidgetEventOccurred(QWidget*, QEvent*)));
+       ui->menubar->setCornerWidget(cornerWidget);
 
        //--------------------------------
        // Setup "Source" tab
        //--------------------------------
 
        ui->sourceFileView->setModel(m_fileListModel);
-       ui->sourceFileView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+       ui->sourceFileView->verticalHeader()  ->setResizeMode(QHeaderView::ResizeToContents);
        ui->sourceFileView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
        ui->sourceFileView->setContextMenuPolicy(Qt::CustomContextMenu);
        ui->sourceFileView->viewport()->installEventFilter(this);
-       m_dropNoteLabel = new QLabel(ui->sourceFileView);
+       m_dropNoteLabel.reset(new QLabel(ui->sourceFileView));
        m_dropNoteLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
-       SET_FONT_BOLD(m_dropNoteLabel, true);
-       SET_TEXT_COLOR(m_dropNoteLabel, Qt::darkGray);
-       m_sourceFilesContextMenu = new QMenu();
-       m_showDetailsContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/zoom.png"), "N/A");
-       m_previewContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/sound.png"), "N/A");
-       m_findFileContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/folder_go.png"), "N/A");
+       SET_FONT_BOLD(m_dropNoteLabel.data(), true);
+       SET_TEXT_COLOR(m_dropNoteLabel.data(), Qt::darkGray);
+       m_sourceFilesContextMenu.reset(new QMenu());
+       m_showDetailsContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/zoom.png"),         "N/A");
+       m_previewContextAction     = m_sourceFilesContextMenu->addAction(QIcon(":/icons/sound.png"),        "N/A");
+       m_findFileContextAction    = m_sourceFilesContextMenu->addAction(QIcon(":/icons/folder_go.png"),    "N/A");
        m_sourceFilesContextMenu->addSeparator();
-       m_exportCsvContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/table_save.png"), "N/A");
-       m_importCsvContextAction = m_sourceFilesContextMenu->addAction(QIcon(":/icons/folder_table.png"), "N/A");
+       m_exportCsvContextAction   = m_sourceFilesContextMenu->addAction(QIcon(":/icons/table_save.png"),   "N/A");
+       m_importCsvContextAction   = m_sourceFilesContextMenu->addAction(QIcon(":/icons/folder_table.png"), "N/A");
        SET_FONT_BOLD(m_showDetailsContextAction, true);
-       connect(ui->buttonAddFiles, SIGNAL(clicked()), this, SLOT(addFilesButtonClicked()));
-       connect(ui->buttonRemoveFile, SIGNAL(clicked()), this, SLOT(removeFileButtonClicked()));
-       connect(ui->buttonClearFiles, SIGNAL(clicked()), this, SLOT(clearFilesButtonClicked()));
-       connect(ui->buttonFileUp, SIGNAL(clicked()), this, SLOT(fileUpButtonClicked()));
-       connect(ui->buttonFileDown, SIGNAL(clicked()), this, SLOT(fileDownButtonClicked()));
-       connect(ui->buttonShowDetails, SIGNAL(clicked()), this, SLOT(showDetailsButtonClicked()));
-       connect(m_fileListModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sourceModelChanged()));
-       connect(m_fileListModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(sourceModelChanged()));
-       connect(m_fileListModel, SIGNAL(modelReset()), this, SLOT(sourceModelChanged()));
-       connect(ui->sourceFileView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(sourceFilesContextMenu(QPoint)));
-       connect(ui->sourceFileView->verticalScrollBar(), SIGNAL(sliderMoved(int)), this, SLOT(sourceFilesScrollbarMoved(int)));
-       connect(ui->sourceFileView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(sourceFilesScrollbarMoved(int)));
-       connect(m_showDetailsContextAction, SIGNAL(triggered(bool)), this, SLOT(showDetailsButtonClicked()));
-       connect(m_previewContextAction, SIGNAL(triggered(bool)), this, SLOT(previewContextActionTriggered()));
-       connect(m_findFileContextAction, SIGNAL(triggered(bool)), this, SLOT(findFileContextActionTriggered()));
-       connect(m_exportCsvContextAction, SIGNAL(triggered(bool)), this, SLOT(exportCsvContextActionTriggered()));
-       connect(m_importCsvContextAction, SIGNAL(triggered(bool)), this, SLOT(importCsvContextActionTriggered()));
+
+       connect(ui->buttonAddFiles,                      SIGNAL(clicked()),                          this, SLOT(addFilesButtonClicked()));
+       connect(ui->buttonRemoveFile,                    SIGNAL(clicked()),                          this, SLOT(removeFileButtonClicked()));
+       connect(ui->buttonClearFiles,                    SIGNAL(clicked()),                          this, SLOT(clearFilesButtonClicked()));
+       connect(ui->buttonFileUp,                        SIGNAL(clicked()),                          this, SLOT(fileUpButtonClicked()));
+       connect(ui->buttonFileDown,                      SIGNAL(clicked()),                          this, SLOT(fileDownButtonClicked()));
+       connect(ui->buttonShowDetails,                   SIGNAL(clicked()),                          this, SLOT(showDetailsButtonClicked()));
+       connect(m_fileListModel,                         SIGNAL(rowsInserted(QModelIndex,int,int)),  this, SLOT(sourceModelChanged()));
+       connect(m_fileListModel,                         SIGNAL(rowsRemoved(QModelIndex,int,int)),   this, SLOT(sourceModelChanged()));
+       connect(m_fileListModel,                         SIGNAL(modelReset()),                       this, SLOT(sourceModelChanged()));
+       connect(ui->sourceFileView,                      SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(sourceFilesContextMenu(QPoint)));
+       connect(ui->sourceFileView->verticalScrollBar(), SIGNAL(sliderMoved(int)),                   this, SLOT(sourceFilesScrollbarMoved(int)));
+       connect(ui->sourceFileView->verticalScrollBar(), SIGNAL(valueChanged(int)),                  this, SLOT(sourceFilesScrollbarMoved(int)));
+       connect(m_showDetailsContextAction,              SIGNAL(triggered(bool)),                    this, SLOT(showDetailsButtonClicked()));
+       connect(m_previewContextAction,                  SIGNAL(triggered(bool)),                    this, SLOT(previewContextActionTriggered()));
+       connect(m_findFileContextAction,                 SIGNAL(triggered(bool)),                    this, SLOT(findFileContextActionTriggered()));
+       connect(m_exportCsvContextAction,                SIGNAL(triggered(bool)),                    this, SLOT(exportCsvContextActionTriggered()));
+       connect(m_importCsvContextAction,                SIGNAL(triggered(bool)),                    this, SLOT(importCsvContextActionTriggered()));
 
        //--------------------------------
        // Setup "Output" tab
@@ -256,63 +380,56 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        ui->outputFolderView->setContextMenuPolicy(Qt::CustomContextMenu);
        ui->outputFolderView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
 
-       m_evenFilterOutputFolderMouse = new CustomEventFilter;
-       ui->outputFoldersGoUpLabel->installEventFilter(m_evenFilterOutputFolderMouse);
-       ui->outputFoldersEditorLabel->installEventFilter(m_evenFilterOutputFolderMouse);
-       ui->outputFoldersFovoritesLabel->installEventFilter(m_evenFilterOutputFolderMouse);
-       ui->outputFolderLabel->installEventFilter(m_evenFilterOutputFolderMouse);
+       m_evenFilterOutputFolderMouse.reset(new CustomEventFilter);
+       ui->outputFoldersGoUpLabel     ->installEventFilter(m_evenFilterOutputFolderMouse.data());
+       ui->outputFoldersEditorLabel   ->installEventFilter(m_evenFilterOutputFolderMouse.data());
+       ui->outputFoldersFovoritesLabel->installEventFilter(m_evenFilterOutputFolderMouse.data());
+       ui->outputFolderLabel          ->installEventFilter(m_evenFilterOutputFolderMouse.data());
 
-       m_evenFilterOutputFolderView = new CustomEventFilter;
-       ui->outputFolderView->installEventFilter(m_evenFilterOutputFolderView);
+       m_evenFilterOutputFolderView.reset(new CustomEventFilter);
+       ui->outputFolderView->installEventFilter(m_evenFilterOutputFolderView.data());
 
        SET_CHECKBOX_STATE(ui->saveToSourceFolderCheckBox, m_settings->outputToSourceDir());
        ui->prependRelativePathCheckBox->setChecked(m_settings->prependRelativeSourcePath());
        
-       connect(ui->outputFolderView, SIGNAL(clicked(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
-       connect(ui->outputFolderView, SIGNAL(activated(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
-       connect(ui->outputFolderView, SIGNAL(pressed(QModelIndex)), this, SLOT(outputFolderViewClicked(QModelIndex)));
-       connect(ui->outputFolderView, SIGNAL(entered(QModelIndex)), this, SLOT(outputFolderViewMoved(QModelIndex)));
-       connect(ui->outputFolderView, SIGNAL(expanded(QModelIndex)), this, SLOT(outputFolderItemExpanded(QModelIndex)));
-       connect(ui->buttonMakeFolder, SIGNAL(clicked()), this, SLOT(makeFolderButtonClicked()));
-       connect(ui->buttonGotoHome, SIGNAL(clicked()), SLOT(gotoHomeFolderButtonClicked()));
-       connect(ui->buttonGotoDesktop, SIGNAL(clicked()), this, SLOT(gotoDesktopButtonClicked()));
-       connect(ui->buttonGotoMusic, SIGNAL(clicked()), this, SLOT(gotoMusicFolderButtonClicked()));
-       connect(ui->saveToSourceFolderCheckBox, SIGNAL(clicked()), this, SLOT(saveToSourceFolderChanged()));
-       connect(ui->prependRelativePathCheckBox, SIGNAL(clicked()), this, SLOT(prependRelativePathChanged()));
-       connect(ui->outputFolderEdit, SIGNAL(editingFinished()), this, SLOT(outputFolderEditFinished()));
-       connect(m_evenFilterOutputFolderMouse, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderMouseEventOccurred(QWidget*, QEvent*)));
-       connect(m_evenFilterOutputFolderView, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderViewEventOccurred(QWidget*, QEvent*)));
-
-       if(m_outputFolderContextMenu = new QMenu())
-       {
-               m_showFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/zoom.png"), "N/A");
-               m_goUpFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/folder_up.png"), "N/A");
-               m_outputFolderContextMenu->addSeparator();
-               m_refreshFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/arrow_refresh.png"), "N/A");
-               m_outputFolderContextMenu->setDefaultAction(m_showFolderContextAction);
-               connect(ui->outputFolderView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(outputFolderContextMenu(QPoint)));
-               connect(m_showFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(showFolderContextActionTriggered()));
-               connect(m_refreshFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(refreshFolderContextActionTriggered()));
-               connect(m_goUpFolderContextAction, SIGNAL(triggered(bool)), this, SLOT(goUpFolderContextActionTriggered()));
-       }
-
-       if(m_outputFolderFavoritesMenu = new QMenu())
-       {
-               m_addFavoriteFolderAction = m_outputFolderFavoritesMenu->addAction(QIcon(":/icons/add.png"), "N/A");
-               m_outputFolderFavoritesMenu->insertSeparator(m_addFavoriteFolderAction);
-               connect(m_addFavoriteFolderAction, SIGNAL(triggered(bool)), this, SLOT(addFavoriteFolderActionTriggered()));
-       }
+       connect(ui->outputFolderView,                 SIGNAL(clicked(QModelIndex)),             this, SLOT(outputFolderViewClicked(QModelIndex)));
+       connect(ui->outputFolderView,                 SIGNAL(activated(QModelIndex)),           this, SLOT(outputFolderViewClicked(QModelIndex)));
+       connect(ui->outputFolderView,                 SIGNAL(pressed(QModelIndex)),             this, SLOT(outputFolderViewClicked(QModelIndex)));
+       connect(ui->outputFolderView,                 SIGNAL(entered(QModelIndex)),             this, SLOT(outputFolderViewMoved(QModelIndex)));
+       connect(ui->outputFolderView,                 SIGNAL(expanded(QModelIndex)),            this, SLOT(outputFolderItemExpanded(QModelIndex)));
+       connect(ui->buttonMakeFolder,                 SIGNAL(clicked()),                        this, SLOT(makeFolderButtonClicked()));
+       connect(ui->buttonGotoHome,                   SIGNAL(clicked()),                        this, SLOT(gotoHomeFolderButtonClicked()));
+       connect(ui->buttonGotoDesktop,                SIGNAL(clicked()),                        this, SLOT(gotoDesktopButtonClicked()));
+       connect(ui->buttonGotoMusic,                  SIGNAL(clicked()),                        this, SLOT(gotoMusicFolderButtonClicked()));
+       connect(ui->saveToSourceFolderCheckBox,       SIGNAL(clicked()),                        this, SLOT(saveToSourceFolderChanged()));
+       connect(ui->prependRelativePathCheckBox,      SIGNAL(clicked()),                        this, SLOT(prependRelativePathChanged()));
+       connect(ui->outputFolderEdit,                 SIGNAL(editingFinished()),                this, SLOT(outputFolderEditFinished()));
+       connect(m_evenFilterOutputFolderMouse.data(), SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderMouseEventOccurred(QWidget*, QEvent*)));
+       connect(m_evenFilterOutputFolderView.data(),  SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(outputFolderViewEventOccurred(QWidget*, QEvent*)));
+
+       m_outputFolderContextMenu.reset(new QMenu());
+       m_showFolderContextAction    = m_outputFolderContextMenu->addAction(QIcon(":/icons/zoom.png"),          "N/A");
+       m_goUpFolderContextAction    = m_outputFolderContextMenu->addAction(QIcon(":/icons/folder_up.png"),     "N/A");
+       m_outputFolderContextMenu->addSeparator();
+       m_refreshFolderContextAction = m_outputFolderContextMenu->addAction(QIcon(":/icons/arrow_refresh.png"), "N/A");
+       m_outputFolderContextMenu->setDefaultAction(m_showFolderContextAction);
+       connect(ui->outputFolderView,         SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(outputFolderContextMenu(QPoint)));
+       connect(m_showFolderContextAction,    SIGNAL(triggered(bool)),                    this, SLOT(showFolderContextActionTriggered()));
+       connect(m_refreshFolderContextAction, SIGNAL(triggered(bool)),                    this, SLOT(refreshFolderContextActionTriggered()));
+       connect(m_goUpFolderContextAction,    SIGNAL(triggered(bool)),                    this, SLOT(goUpFolderContextActionTriggered()));
+
+       m_outputFolderFavoritesMenu.reset(new QMenu());
+       m_addFavoriteFolderAction = m_outputFolderFavoritesMenu->addAction(QIcon(":/icons/add.png"), "N/A");
+       m_outputFolderFavoritesMenu->insertSeparator(m_addFavoriteFolderAction);
+       connect(m_addFavoriteFolderAction, SIGNAL(triggered(bool)), this, SLOT(addFavoriteFolderActionTriggered()));
 
        ui->outputFolderEdit->setVisible(false);
-       if(m_outputFolderNoteBox = new QLabel(ui->outputFolderView))
-       {
-               m_outputFolderNoteBox->setAutoFillBackground(true);
-               m_outputFolderNoteBox->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
-               m_outputFolderNoteBox->setFrameShape(QFrame::StyledPanel);
-               SET_FONT_BOLD(m_outputFolderNoteBox, true);
-               m_outputFolderNoteBox->hide();
-
-       }
+       m_outputFolderNoteBox.reset(new QLabel(ui->outputFolderView));
+       m_outputFolderNoteBox->setAutoFillBackground(true);
+       m_outputFolderNoteBox->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
+       m_outputFolderNoteBox->setFrameShape(QFrame::StyledPanel);
+       SET_FONT_BOLD(m_outputFolderNoteBox.data(), true);
+       m_outputFolderNoteBox->hide();
 
        outputFolderViewClicked(QModelIndex());
        refreshFavorites();
@@ -321,41 +438,42 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        // Setup "Meta Data" tab
        //--------------------------------
 
-       m_metaInfoModel = new MetaInfoModel(m_metaData, 6);
+       m_metaInfoModel.reset(new MetaInfoModel(m_metaData));
        m_metaInfoModel->clearData();
        m_metaInfoModel->setData(m_metaInfoModel->index(4, 1), m_settings->metaInfoPosition());
-       ui->metaDataView->setModel(m_metaInfoModel);
+       ui->metaDataView->setModel(m_metaInfoModel.data());
        ui->metaDataView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
        ui->metaDataView->verticalHeader()->hide();
        ui->metaDataView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
        SET_CHECKBOX_STATE(ui->writeMetaDataCheckBox, m_settings->writeMetaTags());
        ui->generatePlaylistCheckBox->setChecked(m_settings->createPlaylist());
-       connect(ui->buttonEditMeta, SIGNAL(clicked()), this, SLOT(editMetaButtonClicked()));
-       connect(ui->buttonClearMeta, SIGNAL(clicked()), this, SLOT(clearMetaButtonClicked()));
-       connect(ui->writeMetaDataCheckBox, SIGNAL(clicked()), this, SLOT(metaTagsEnabledChanged()));
+       connect(ui->buttonEditMeta,           SIGNAL(clicked()), this, SLOT(editMetaButtonClicked()));
+       connect(ui->buttonClearMeta,          SIGNAL(clicked()), this, SLOT(clearMetaButtonClicked()));
+       connect(ui->writeMetaDataCheckBox,    SIGNAL(clicked()), this, SLOT(metaTagsEnabledChanged()));
        connect(ui->generatePlaylistCheckBox, SIGNAL(clicked()), this, SLOT(playlistEnabledChanged()));
 
        //--------------------------------
        //Setup "Compression" tab
        //--------------------------------
 
-       m_encoderButtonGroup = new QButtonGroup(this);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderMP3, SettingsModel::MP3Encoder);
+       m_encoderButtonGroup.reset(new QButtonGroup(this));
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderMP3,    SettingsModel::MP3Encoder);
        m_encoderButtonGroup->addButton(ui->radioButtonEncoderVorbis, SettingsModel::VorbisEncoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderAAC, SettingsModel::AACEncoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderAC3, SettingsModel::AC3Encoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderFLAC, SettingsModel::FLACEncoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderOpus, SettingsModel::OpusEncoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderDCA, SettingsModel::DCAEncoder);
-       m_encoderButtonGroup->addButton(ui->radioButtonEncoderPCM, SettingsModel::PCMEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderAAC,    SettingsModel::AACEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderAC3,    SettingsModel::AC3Encoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderFLAC,   SettingsModel::FLACEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderAPE,    SettingsModel::MACEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderOpus,   SettingsModel::OpusEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderDCA,    SettingsModel::DCAEncoder);
+       m_encoderButtonGroup->addButton(ui->radioButtonEncoderPCM,    SettingsModel::PCMEncoder);
 
        const int aacEncoder = EncoderRegistry::getAacEncoder();
        ui->radioButtonEncoderAAC->setEnabled(aacEncoder > SettingsModel::AAC_ENCODER_NONE);
 
-       m_modeButtonGroup = new QButtonGroup(this);
-       m_modeButtonGroup->addButton(ui->radioButtonModeQuality, SettingsModel::VBRMode);
+       m_modeButtonGroup.reset(new QButtonGroup(this));
+       m_modeButtonGroup->addButton(ui->radioButtonModeQuality,        SettingsModel::VBRMode);
        m_modeButtonGroup->addButton(ui->radioButtonModeAverageBitrate, SettingsModel::ABRMode);
-       m_modeButtonGroup->addButton(ui->radioButtonConstBitrate, SettingsModel::CBRMode);
+       m_modeButtonGroup->addButton(ui->radioButtonConstBitrate,       SettingsModel::CBRMode);
 
        ui->radioButtonEncoderMP3->setChecked(true);
        foreach(QAbstractButton *currentButton, m_encoderButtonGroup->buttons())
@@ -367,14 +485,14 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
                }
        }
 
-       m_evenFilterCompressionTab = new CustomEventFilter();
-       ui->labelCompressionHelp->installEventFilter(m_evenFilterCompressionTab);
-       ui->labelResetEncoders ->installEventFilter(m_evenFilterCompressionTab);
+       m_evenFilterCompressionTab.reset(new CustomEventFilter());
+       ui->labelCompressionHelp->installEventFilter(m_evenFilterCompressionTab.data());
+       ui->labelResetEncoders  ->installEventFilter(m_evenFilterCompressionTab.data());
 
-       connect(m_encoderButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(updateEncoder(int)));
-       connect(m_modeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(updateRCMode(int)));
-       connect(m_evenFilterCompressionTab, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(compressionTabEventOccurred(QWidget*, QEvent*)));
-       connect(ui->sliderBitrate, SIGNAL(valueChanged(int)), this, SLOT(updateBitrate(int)));
+       connect(m_encoderButtonGroup.data(),       SIGNAL(buttonClicked(int)),               this, SLOT(updateEncoder(int)));
+       connect(m_modeButtonGroup.data(),          SIGNAL(buttonClicked(int)),               this, SLOT(updateRCMode(int)));
+       connect(m_evenFilterCompressionTab.data(), SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(compressionTabEventOccurred(QWidget*, QEvent*)));
+       connect(ui->sliderBitrate,                 SIGNAL(valueChanged(int)),                this, SLOT(updateBitrate(int)));
 
        updateEncoder(m_encoderButtonGroup->checkedId());
 
@@ -383,54 +501,63 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        //--------------------------------
 
        ui->sliderLameAlgoQuality->setValue(m_settings->lameAlgoQuality());
-       if(m_settings->maximumInstances() > 0) ui->sliderMaxInstances->setValue(m_settings->maximumInstances());
-
-       ui->spinBoxBitrateManagementMin->setValue(m_settings->bitrateManagementMinRate());
-       ui->spinBoxBitrateManagementMax->setValue(m_settings->bitrateManagementMaxRate());
-       ui->spinBoxNormalizationFilter->setValue(static_cast<double>(m_settings->normalizationFilterMaxVolume()) / 100.0);
-       ui->spinBoxToneAdjustBass->setValue(static_cast<double>(m_settings->toneAdjustBass()) / 100.0);
-       ui->spinBoxToneAdjustTreble->setValue(static_cast<double>(m_settings->toneAdjustTreble()) / 100.0);
-       ui->spinBoxAftenSearchSize->setValue(m_settings->aftenExponentSearchSize());
-       ui->spinBoxOpusComplexity->setValue(m_settings->opusComplexity());
+       if (m_settings->maximumInstances() > 0U)
+       {
+               ui->sliderMaxInstances->setValue(static_cast<int>(encodeInstances(m_settings->maximumInstances())));
+       }
+
+       ui->spinBoxBitrateManagementMin   ->setValue(m_settings->bitrateManagementMinRate());
+       ui->spinBoxBitrateManagementMax   ->setValue(m_settings->bitrateManagementMaxRate());
+       ui->spinBoxNormalizationFilterPeak->setValue(static_cast<double>(m_settings->normalizationFilterMaxVolume()) / 100.0);
+       ui->spinBoxNormalizationFilterSize->setValue(m_settings->normalizationFilterSize());
+       ui->spinBoxToneAdjustBass         ->setValue(static_cast<double>(m_settings->toneAdjustBass()) / 100.0);
+       ui->spinBoxToneAdjustTreble       ->setValue(static_cast<double>(m_settings->toneAdjustTreble()) / 100.0);
+       ui->spinBoxAftenSearchSize        ->setValue(m_settings->aftenExponentSearchSize());
+       ui->spinBoxOpusComplexity         ->setValue(m_settings->opusComplexity());
        
-       ui->comboBoxMP3ChannelMode->setCurrentIndex(m_settings->lameChannelMode());
-       ui->comboBoxSamplingRate->setCurrentIndex(m_settings->samplingRate());
-       ui->comboBoxAACProfile->setCurrentIndex(m_settings->aacEncProfile());
-       ui->comboBoxAftenCodingMode->setCurrentIndex(m_settings->aftenAudioCodingMode());
-       ui->comboBoxAftenDRCMode->setCurrentIndex(m_settings->aftenDynamicRangeCompression());
-       ui->comboBoxNormalizationMode->setCurrentIndex(m_settings->normalizationFilterEQMode());
-       //comboBoxOpusOptimize->setCurrentIndex(m_settings->opusOptimizeFor());
-       ui->comboBoxOpusFramesize->setCurrentIndex(m_settings->opusFramesize());
+       ui->comboBoxMP3ChannelMode   ->setCurrentIndex(m_settings->lameChannelMode());
+       ui->comboBoxSamplingRate     ->setCurrentIndex(m_settings->samplingRate());
+       ui->comboBoxAACProfile       ->setCurrentIndex(m_settings->aacEncProfile());
+       ui->comboBoxAftenCodingMode  ->setCurrentIndex(m_settings->aftenAudioCodingMode());
+       ui->comboBoxAftenDRCMode     ->setCurrentIndex(m_settings->aftenDynamicRangeCompression());
+       ui->comboBoxOpusFramesize    ->setCurrentIndex(m_settings->opusFramesize());
        
-       SET_CHECKBOX_STATE(ui->checkBoxBitrateManagement, m_settings->bitrateManagementEnabled());
-       SET_CHECKBOX_STATE(ui->checkBoxNeroAAC2PassMode, m_settings->neroAACEnable2Pass());
-       SET_CHECKBOX_STATE(ui->checkBoxAftenFastAllocation, m_settings->aftenFastBitAllocation());
-       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilter, m_settings->normalizationFilterEnabled());
-       SET_CHECKBOX_STATE(ui->checkBoxAutoDetectInstances, (m_settings->maximumInstances() < 1));
-       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder, !m_settings->customTempPathEnabled());
-       SET_CHECKBOX_STATE(ui->checkBoxRenameOutput, m_settings->renameOutputFilesEnabled());
-       SET_CHECKBOX_STATE(ui->checkBoxForceStereoDownmix, m_settings->forceStereoDownmix());
-       SET_CHECKBOX_STATE(ui->checkBoxOpusDisableResample, m_settings->opusDisableResample());
+       SET_CHECKBOX_STATE(ui->checkBoxBitrateManagement,          m_settings->bitrateManagementEnabled());
+       SET_CHECKBOX_STATE(ui->checkBoxNeroAAC2PassMode,           m_settings->neroAACEnable2Pass());
+       SET_CHECKBOX_STATE(ui->checkBoxAftenFastAllocation,        m_settings->aftenFastBitAllocation());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterEnabled, m_settings->normalizationFilterEnabled());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterDynamic, m_settings->normalizationFilterDynamic());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterCoupled, m_settings->normalizationFilterCoupled());
+       SET_CHECKBOX_STATE(ui->checkBoxAutoDetectInstances,        (m_settings->maximumInstances() < 1));
+       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder,        (!m_settings->customTempPathEnabled()));
+       SET_CHECKBOX_STATE(ui->checkBoxRename_Rename,              m_settings->renameFiles_renameEnabled());
+       SET_CHECKBOX_STATE(ui->checkBoxRename_RegExp,              m_settings->renameFiles_regExpEnabled());
+       SET_CHECKBOX_STATE(ui->checkBoxForceStereoDownmix,         m_settings->forceStereoDownmix());
+       SET_CHECKBOX_STATE(ui->checkBoxOpusDisableResample,        m_settings->opusDisableResample());
+       SET_CHECKBOX_STATE(ui->checkBoxKeepOriginalDateTime,       m_settings->keepOriginalDataTime());
+
        ui->checkBoxNeroAAC2PassMode->setEnabled(aacEncoder == SettingsModel::AAC_ENCODER_NERO);
        
-       ui->lineEditCustomParamLAME   ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::MP3Encoder));
-       ui->lineEditCustomParamOggEnc ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::VorbisEncoder));
-       ui->lineEditCustomParamNeroAAC->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::AACEncoder));
-       ui->lineEditCustomParamFLAC   ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::FLACEncoder));
-       ui->lineEditCustomParamAften  ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::AC3Encoder));
-       ui->lineEditCustomParamOpus   ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::OpusEncoder));
-       ui->lineEditCustomTempFolder  ->setText(QDir::toNativeSeparators(m_settings->customTempPath()));
-       ui->lineEditRenamePattern     ->setText(m_settings->renameOutputFilesPattern());
+       ui->lineEditCustomParamLAME     ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::MP3Encoder));
+       ui->lineEditCustomParamOggEnc   ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::VorbisEncoder));
+       ui->lineEditCustomParamNeroAAC  ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::AACEncoder));
+       ui->lineEditCustomParamFLAC     ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::FLACEncoder));
+       ui->lineEditCustomParamAften    ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::AC3Encoder));
+       ui->lineEditCustomParamOpus     ->setText(EncoderRegistry::loadEncoderCustomParams(m_settings, SettingsModel::OpusEncoder));
+       ui->lineEditCustomTempFolder    ->setText(QDir::toNativeSeparators(m_settings->customTempPath()));
+       ui->lineEditRenamePattern       ->setText(m_settings->renameFiles_renamePattern());
+       ui->lineEditRenameRegExp_Search ->setText(m_settings->renameFiles_regExpSearch ());
+       ui->lineEditRenameRegExp_Replace->setText(m_settings->renameFiles_regExpReplace());
        
-       m_evenFilterCustumParamsHelp = new CustomEventFilter();
-       ui->helpCustomParamLAME->installEventFilter(m_evenFilterCustumParamsHelp);
-       ui->helpCustomParamOggEnc->installEventFilter(m_evenFilterCustumParamsHelp);
-       ui->helpCustomParamNeroAAC->installEventFilter(m_evenFilterCustumParamsHelp);
-       ui->helpCustomParamFLAC->installEventFilter(m_evenFilterCustumParamsHelp);
-       ui->helpCustomParamAften->installEventFilter(m_evenFilterCustumParamsHelp);
-       ui->helpCustomParamOpus->installEventFilter(m_evenFilterCustumParamsHelp);
+       m_evenFilterCustumParamsHelp.reset(new CustomEventFilter());
+       ui->helpCustomParamLAME   ->installEventFilter(m_evenFilterCustumParamsHelp.data());
+       ui->helpCustomParamOggEnc ->installEventFilter(m_evenFilterCustumParamsHelp.data());
+       ui->helpCustomParamNeroAAC->installEventFilter(m_evenFilterCustumParamsHelp.data());
+       ui->helpCustomParamFLAC   ->installEventFilter(m_evenFilterCustumParamsHelp.data());
+       ui->helpCustomParamAften  ->installEventFilter(m_evenFilterCustumParamsHelp.data());
+       ui->helpCustomParamOpus   ->installEventFilter(m_evenFilterCustumParamsHelp.data());
        
-       m_overwriteButtonGroup = new QButtonGroup(this);
+       m_overwriteButtonGroup.reset(new QButtonGroup(this));
        m_overwriteButtonGroup->addButton(ui->radioButtonOverwriteModeKeepBoth, SettingsModel::Overwrite_KeepBoth);
        m_overwriteButtonGroup->addButton(ui->radioButtonOverwriteModeSkipFile, SettingsModel::Overwrite_SkipFile);
        m_overwriteButtonGroup->addButton(ui->radioButtonOverwriteModeReplaces, SettingsModel::Overwrite_Replaces);
@@ -439,46 +566,68 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        ui->radioButtonOverwriteModeSkipFile->setChecked(m_settings->overwriteMode() == SettingsModel::Overwrite_SkipFile);
        ui->radioButtonOverwriteModeReplaces->setChecked(m_settings->overwriteMode() == SettingsModel::Overwrite_Replaces);
 
-       connect(ui->sliderLameAlgoQuality, SIGNAL(valueChanged(int)), this, SLOT(updateLameAlgoQuality(int)));
-       connect(ui->checkBoxBitrateManagement, SIGNAL(clicked(bool)), this, SLOT(bitrateManagementEnabledChanged(bool)));
-       connect(ui->spinBoxBitrateManagementMin, SIGNAL(valueChanged(int)), this, SLOT(bitrateManagementMinChanged(int)));
-       connect(ui->spinBoxBitrateManagementMax, SIGNAL(valueChanged(int)), this, SLOT(bitrateManagementMaxChanged(int)));
-       connect(ui->comboBoxMP3ChannelMode, SIGNAL(currentIndexChanged(int)), this, SLOT(channelModeChanged(int)));
-       connect(ui->comboBoxSamplingRate, SIGNAL(currentIndexChanged(int)), this, SLOT(samplingRateChanged(int)));
-       connect(ui->checkBoxNeroAAC2PassMode, SIGNAL(clicked(bool)), this, SLOT(neroAAC2PassChanged(bool)));
-       connect(ui->comboBoxAACProfile, SIGNAL(currentIndexChanged(int)), this, SLOT(neroAACProfileChanged(int)));
-       connect(ui->checkBoxNormalizationFilter, SIGNAL(clicked(bool)), this, SLOT(normalizationEnabledChanged(bool)));
-       connect(ui->comboBoxAftenCodingMode, SIGNAL(currentIndexChanged(int)), this, SLOT(aftenCodingModeChanged(int)));
-       connect(ui->comboBoxAftenDRCMode, SIGNAL(currentIndexChanged(int)), this, SLOT(aftenDRCModeChanged(int)));
-       connect(ui->spinBoxAftenSearchSize, SIGNAL(valueChanged(int)), this, SLOT(aftenSearchSizeChanged(int)));
-       connect(ui->checkBoxAftenFastAllocation, SIGNAL(clicked(bool)), this, SLOT(aftenFastAllocationChanged(bool)));
-       connect(ui->spinBoxNormalizationFilter, SIGNAL(valueChanged(double)), this, SLOT(normalizationMaxVolumeChanged(double)));
-       connect(ui->comboBoxNormalizationMode, SIGNAL(currentIndexChanged(int)), this, SLOT(normalizationModeChanged(int)));
-       connect(ui->spinBoxToneAdjustBass, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustBassChanged(double)));
-       connect(ui->spinBoxToneAdjustTreble, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustTrebleChanged(double)));
-       connect(ui->buttonToneAdjustReset, SIGNAL(clicked()), this, SLOT(toneAdjustTrebleReset()));
-       connect(ui->lineEditCustomParamLAME, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->lineEditCustomParamOggEnc, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->lineEditCustomParamNeroAAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->lineEditCustomParamFLAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->lineEditCustomParamAften, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->lineEditCustomParamOpus, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
-       connect(ui->sliderMaxInstances, SIGNAL(valueChanged(int)), this, SLOT(updateMaximumInstances(int)));
-       connect(ui->checkBoxAutoDetectInstances, SIGNAL(clicked(bool)), this, SLOT(autoDetectInstancesChanged(bool)));
-       connect(ui->buttonBrowseCustomTempFolder, SIGNAL(clicked()), this, SLOT(browseCustomTempFolderButtonClicked()));
-       connect(ui->lineEditCustomTempFolder, SIGNAL(textChanged(QString)), this, SLOT(customTempFolderChanged(QString)));
-       connect(ui->checkBoxUseSystemTempFolder, SIGNAL(clicked(bool)), this, SLOT(useCustomTempFolderChanged(bool)));
-       connect(ui->buttonResetAdvancedOptions, SIGNAL(clicked()), this, SLOT(resetAdvancedOptionsButtonClicked()));
-       connect(ui->checkBoxRenameOutput, SIGNAL(clicked(bool)), this, SLOT(renameOutputEnabledChanged(bool)));
-       connect(ui->lineEditRenamePattern, SIGNAL(editingFinished()), this, SLOT(renameOutputPatternChanged()));
-       connect(ui->lineEditRenamePattern, SIGNAL(textChanged(QString)), this, SLOT(renameOutputPatternChanged(QString)));
-       connect(ui->labelShowRenameMacros, SIGNAL(linkActivated(QString)), this, SLOT(showRenameMacros(QString)));
-       connect(ui->checkBoxForceStereoDownmix, SIGNAL(clicked(bool)), this, SLOT(forceStereoDownmixEnabledChanged(bool)));
-       connect(ui->comboBoxOpusFramesize, SIGNAL(currentIndexChanged(int)), this, SLOT(opusSettingsChanged()));
-       connect(ui->spinBoxOpusComplexity, SIGNAL(valueChanged(int)), this, SLOT(opusSettingsChanged()));
-       connect(ui->checkBoxOpusDisableResample, SIGNAL(clicked(bool)), SLOT(opusSettingsChanged()));
-       connect(m_overwriteButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(overwriteModeChanged(int)));
-       connect(m_evenFilterCustumParamsHelp, SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(customParamsHelpRequested(QWidget*, QEvent*)));
+       FileExtsModel *fileExtModel = new FileExtsModel(this);
+       fileExtModel->importItems(m_settings->renameFiles_fileExtension());
+       ui->tableViewFileExts->setModel(fileExtModel);
+       ui->tableViewFileExts->verticalHeader()  ->setResizeMode(QHeaderView::ResizeToContents);
+       ui->tableViewFileExts->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
+
+       connect(ui->sliderLameAlgoQuality,              SIGNAL(valueChanged(int)),                this, SLOT(updateLameAlgoQuality(int)));
+       connect(ui->checkBoxBitrateManagement,          SIGNAL(clicked(bool)),                    this, SLOT(bitrateManagementEnabledChanged(bool)));
+       connect(ui->spinBoxBitrateManagementMin,        SIGNAL(valueChanged(int)),                this, SLOT(bitrateManagementMinChanged(int)));
+       connect(ui->spinBoxBitrateManagementMax,        SIGNAL(valueChanged(int)),                this, SLOT(bitrateManagementMaxChanged(int)));
+       connect(ui->comboBoxMP3ChannelMode,             SIGNAL(currentIndexChanged(int)),         this, SLOT(channelModeChanged(int)));
+       connect(ui->comboBoxSamplingRate,               SIGNAL(currentIndexChanged(int)),         this, SLOT(samplingRateChanged(int)));
+       connect(ui->checkBoxNeroAAC2PassMode,           SIGNAL(clicked(bool)),                    this, SLOT(neroAAC2PassChanged(bool)));
+       connect(ui->comboBoxAACProfile,                 SIGNAL(currentIndexChanged(int)),         this, SLOT(neroAACProfileChanged(int)));
+       connect(ui->checkBoxNormalizationFilterEnabled, SIGNAL(clicked(bool)),                    this, SLOT(normalizationEnabledChanged(bool)));
+       connect(ui->checkBoxNormalizationFilterDynamic, SIGNAL(clicked(bool)),                    this, SLOT(normalizationDynamicChanged(bool)));
+       connect(ui->checkBoxNormalizationFilterCoupled, SIGNAL(clicked(bool)),                    this, SLOT(normalizationCoupledChanged(bool)));
+       connect(ui->comboBoxAftenCodingMode,            SIGNAL(currentIndexChanged(int)),         this, SLOT(aftenCodingModeChanged(int)));
+       connect(ui->comboBoxAftenDRCMode,               SIGNAL(currentIndexChanged(int)),         this, SLOT(aftenDRCModeChanged(int)));
+       connect(ui->spinBoxAftenSearchSize,             SIGNAL(valueChanged(int)),                this, SLOT(aftenSearchSizeChanged(int)));
+       connect(ui->checkBoxAftenFastAllocation,        SIGNAL(clicked(bool)),                    this, SLOT(aftenFastAllocationChanged(bool)));
+       connect(ui->spinBoxNormalizationFilterPeak,     SIGNAL(valueChanged(double)),             this, SLOT(normalizationMaxVolumeChanged(double)));
+       connect(ui->spinBoxNormalizationFilterSize,     SIGNAL(valueChanged(int)),                this, SLOT(normalizationFilterSizeChanged(int)));
+       connect(ui->spinBoxNormalizationFilterSize,     SIGNAL(editingFinished()),                this, SLOT(normalizationFilterSizeFinished()));
+       connect(ui->spinBoxToneAdjustBass,              SIGNAL(valueChanged(double)),             this, SLOT(toneAdjustBassChanged(double)));
+       connect(ui->spinBoxToneAdjustTreble,            SIGNAL(valueChanged(double)),             this, SLOT(toneAdjustTrebleChanged(double)));
+       connect(ui->buttonToneAdjustReset,              SIGNAL(clicked()),                        this, SLOT(toneAdjustTrebleReset()));
+       connect(ui->lineEditCustomParamLAME,            SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->lineEditCustomParamOggEnc,          SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->lineEditCustomParamNeroAAC,         SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->lineEditCustomParamFLAC,            SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->lineEditCustomParamAften,           SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->lineEditCustomParamOpus,            SIGNAL(editingFinished()),                this, SLOT(customParamsChanged()));
+       connect(ui->sliderMaxInstances,                 SIGNAL(valueChanged(int)),                this, SLOT(updateMaximumInstances(int)));
+       connect(ui->checkBoxAutoDetectInstances,        SIGNAL(clicked(bool)),                    this, SLOT(autoDetectInstancesChanged(bool)));
+       connect(ui->buttonBrowseCustomTempFolder,       SIGNAL(clicked()),                        this, SLOT(browseCustomTempFolderButtonClicked()));
+       connect(ui->lineEditCustomTempFolder,           SIGNAL(textChanged(QString)),             this, SLOT(customTempFolderChanged(QString)));
+       connect(ui->checkBoxUseSystemTempFolder,        SIGNAL(clicked(bool)),                    this, SLOT(useCustomTempFolderChanged(bool)));
+       connect(ui->buttonResetAdvancedOptions,         SIGNAL(clicked()),                        this, SLOT(resetAdvancedOptionsButtonClicked()));
+       connect(ui->checkBoxRename_Rename,              SIGNAL(clicked(bool)),                    this, SLOT(renameOutputEnabledChanged(bool)));
+       connect(ui->checkBoxRename_RegExp,              SIGNAL(clicked(bool)),                    this, SLOT(renameRegExpEnabledChanged(bool)));
+       connect(ui->lineEditRenamePattern,              SIGNAL(editingFinished()),                this, SLOT(renameOutputPatternChanged()));
+       connect(ui->lineEditRenamePattern,              SIGNAL(textChanged(QString)),             this, SLOT(renameOutputPatternChanged(QString)));
+       connect(ui->lineEditRenameRegExp_Search,        SIGNAL(editingFinished()),                this, SLOT(renameRegExpValueChanged()));
+       connect(ui->lineEditRenameRegExp_Search,        SIGNAL(textChanged(QString)),             this, SLOT(renameRegExpSearchChanged(QString)));
+       connect(ui->lineEditRenameRegExp_Replace,       SIGNAL(editingFinished()),                this, SLOT(renameRegExpValueChanged()));
+       connect(ui->lineEditRenameRegExp_Replace,       SIGNAL(textChanged(QString)),             this, SLOT(renameRegExpReplaceChanged(QString)));
+       connect(ui->labelShowRenameMacros,              SIGNAL(linkActivated(QString)),           this, SLOT(showRenameMacros(QString)));
+       connect(ui->labelShowRegExpHelp,                SIGNAL(linkActivated(QString)),           this, SLOT(showRenameMacros(QString)));
+       connect(ui->checkBoxForceStereoDownmix,         SIGNAL(clicked(bool)),                    this, SLOT(forceStereoDownmixEnabledChanged(bool)));
+       connect(ui->comboBoxOpusFramesize,              SIGNAL(currentIndexChanged(int)),         this, SLOT(opusSettingsChanged()));
+       connect(ui->spinBoxOpusComplexity,              SIGNAL(valueChanged(int)),                this, SLOT(opusSettingsChanged()));
+       connect(ui->checkBoxOpusDisableResample,        SIGNAL(clicked(bool)),                    this, SLOT(opusSettingsChanged()));
+       connect(ui->buttonRename_Rename,                SIGNAL(clicked(bool)),                    this, SLOT(renameButtonClicked(bool)));
+       connect(ui->buttonRename_RegExp,                SIGNAL(clicked(bool)),                    this, SLOT(renameButtonClicked(bool)));
+       connect(ui->buttonRename_FileEx,                SIGNAL(clicked(bool)),                    this, SLOT(renameButtonClicked(bool)));
+       connect(ui->buttonFileExts_Add,                 SIGNAL(clicked()),                        this, SLOT(fileExtAddButtonClicked()));
+       connect(ui->buttonFileExts_Remove,              SIGNAL(clicked()),                        this, SLOT(fileExtRemoveButtonClicked()));
+       connect(ui->checkBoxKeepOriginalDateTime,       SIGNAL(clicked(bool)),                    this, SLOT(keepOriginalDateTimeChanged(bool)));
+       connect(m_overwriteButtonGroup.data(),          SIGNAL(buttonClicked(int)),               this, SLOT(overwriteModeChanged(int)));
+       connect(m_evenFilterCustumParamsHelp.data(),    SIGNAL(eventOccurred(QWidget*, QEvent*)), this, SLOT(customParamsHelpRequested(QWidget*, QEvent*)));
+       connect(fileExtModel,                           SIGNAL(modelReset()),                     this, SLOT(fileExtModelChanged()));
 
        //--------------------------------
        // Force initial GUI update
@@ -488,6 +637,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        updateMaximumInstances(ui->sliderMaxInstances->value());
        toneAdjustTrebleChanged(ui->spinBoxToneAdjustTreble->value());
        toneAdjustBassChanged(ui->spinBoxToneAdjustBass->value());
+       normalizationEnabledChanged(ui->checkBoxNormalizationFilterEnabled->isChecked());
        customParamsChanged();
        
        //--------------------------------
@@ -495,13 +645,13 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        //--------------------------------
 
        //Activate file menu actions
-       ui->actionOpenFolder->setData(QVariant::fromValue<bool>(false));
+       ui->actionOpenFolder           ->setData(QVariant::fromValue<bool>(false));
        ui->actionOpenFolderRecursively->setData(QVariant::fromValue<bool>(true));
-       connect(ui->actionOpenFolder, SIGNAL(triggered()), this, SLOT(openFolderActionActivated()));
+       connect(ui->actionOpenFolder,            SIGNAL(triggered()), this, SLOT(openFolderActionActivated()));
        connect(ui->actionOpenFolderRecursively, SIGNAL(triggered()), this, SLOT(openFolderActionActivated()));
 
        //Activate view menu actions
-       m_tabActionGroup = new QActionGroup(this);
+       m_tabActionGroup.reset(new QActionGroup(this));
        m_tabActionGroup->addAction(ui->actionSourceFiles);
        m_tabActionGroup->addAction(ui->actionOutputDirectory);
        m_tabActionGroup->addAction(ui->actionCompression);
@@ -513,10 +663,10 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        ui->actionCompression->setData(3);
        ui->actionAdvancedOptions->setData(4);
        ui->actionSourceFiles->setChecked(true);
-       connect(m_tabActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(tabActionActivated(QAction*)));
+       connect(m_tabActionGroup.data(), SIGNAL(triggered(QAction*)), this, SLOT(tabActionActivated(QAction*)));
 
        //Activate style menu actions
-       m_styleActionGroup = new QActionGroup(this);
+       m_styleActionGroup .reset(new QActionGroup(this));
        m_styleActionGroup->addAction(ui->actionStylePlastique);
        m_styleActionGroup->addAction(ui->actionStyleCleanlooks);
        m_styleActionGroup->addAction(ui->actionStyleWindowsVista);
@@ -528,29 +678,31 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        ui->actionStyleWindowsXP->setData(3);
        ui->actionStyleWindowsClassic->setData(4);
        ui->actionStylePlastique->setChecked(true);
-       ui->actionStyleWindowsXP->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_XP && lamexp_themes_enabled());
-       ui->actionStyleWindowsVista->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA && lamexp_themes_enabled());
-       connect(m_styleActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
+       ui->actionStyleWindowsXP->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_XP && MUtils::GUI::themes_enabled());
+       ui->actionStyleWindowsVista->setEnabled((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA && MUtils::GUI::themes_enabled());
+       connect(m_styleActionGroup.data(), SIGNAL(triggered(QAction*)), this, SLOT(styleActionActivated(QAction*)));
        styleActionActivated(NULL);
 
        //Populate the language menu
-       m_languageActionGroup = new QActionGroup(this);
-       QStringList translations = lamexp_query_translations();
-       while(!translations.isEmpty())
-       {
-               QString langId = translations.takeFirst();
-               QAction *currentLanguage = new QAction(this);
-               currentLanguage->setData(langId);
-               currentLanguage->setText(lamexp_translation_name(langId));
-               currentLanguage->setIcon(QIcon(QString(":/flags/%1.png").arg(langId)));
-               currentLanguage->setCheckable(true);
-               currentLanguage->setChecked(false);
-               m_languageActionGroup->addAction(currentLanguage);
-               ui->menuLanguage->insertAction(ui->actionLoadTranslationFromFile, currentLanguage);
+       m_languageActionGroup.reset(new QActionGroup(this));
+       QStringList translations;
+       if(MUtils::Translation::enumerate(translations) > 0)
+       {
+               for(QStringList::ConstIterator iter = translations.constBegin(); iter != translations.constEnd(); iter++)
+               {
+                       QAction *currentLanguage = new QAction(this);
+                       currentLanguage->setData(*iter);
+                       currentLanguage->setText(MUtils::Translation::get_name(*iter));
+                       currentLanguage->setIcon(QIcon(QString(":/flags/%1.png").arg(*iter)));
+                       currentLanguage->setCheckable(true);
+                       currentLanguage->setChecked(false);
+                       m_languageActionGroup->addAction(currentLanguage);
+                       ui->menuLanguage->insertAction(ui->actionLoadTranslationFromFile, currentLanguage);
+               }
        }
        ui->menuLanguage->insertSeparator(ui->actionLoadTranslationFromFile);
-       connect(ui->actionLoadTranslationFromFile, SIGNAL(triggered(bool)), this, SLOT(languageFromFileActionActivated(bool)));
-       connect(m_languageActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(languageActionActivated(QAction*)));
+       connect(ui->actionLoadTranslationFromFile, SIGNAL(triggered(bool)),     this, SLOT(languageFromFileActionActivated(bool)));
+       connect(m_languageActionGroup.data(),      SIGNAL(triggered(QAction*)), this, SLOT(languageActionActivated(QAction*)));
        ui->actionLoadTranslationFromFile->setChecked(false);
 
        //Activate tools menu actions
@@ -559,11 +711,11 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        ui->actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled());
        ui->actionDisableSlowStartupNotifications->setChecked(!m_settings->antivirNotificationsEnabled());
        ui->actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled());
-       ui->actionDisableShellIntegration->setDisabled(lamexp_portable_mode() && ui->actionDisableShellIntegration->isChecked());
+       ui->actionDisableShellIntegration->setDisabled(lamexp_version_portable() && ui->actionDisableShellIntegration->isChecked());
        ui->actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta() || lamexp_version_demo());
        ui->actionCheckForBetaUpdates->setEnabled(!lamexp_version_demo());
        ui->actionHibernateComputer->setChecked(m_settings->hibernateComputer());
-       ui->actionHibernateComputer->setEnabled(lamexp_is_hibernation_supported());
+       ui->actionHibernateComputer->setEnabled(MUtils::OS::is_hibernation_supported());
        connect(ui->actionDisableUpdateReminder, SIGNAL(triggered(bool)), this, SLOT(disableUpdateReminderActionTriggered(bool)));
        connect(ui->actionDisableSounds, SIGNAL(triggered(bool)), this, SLOT(disableSoundsActionTriggered(bool)));
        connect(ui->actionDisableNeroAacNotifications, SIGNAL(triggered(bool)), this, SLOT(disableNeroAacNotificationsActionTriggered(bool)));
@@ -575,17 +727,21 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        connect(ui->actionImportCueSheet, SIGNAL(triggered(bool)), this, SLOT(importCueSheetActionTriggered(bool)));
                
        //Activate help menu actions
-       ui->actionVisitHomepage->setData(QString::fromLatin1(lamexp_website_url()));
-       ui->actionVisitSupport->setData(QString::fromLatin1(lamexp_support_url()));
-       ui->actionVisitMuldersSite->setData(QString::fromLatin1(lamexp_mulders_url()));
-       ui->actionDocumentFAQ->setData(QString("%1/FAQ.html").arg(QApplication::applicationDirPath()));
+       ui->actionVisitHomepage    ->setData(QString::fromLatin1(lamexp_website_url()));
+       ui->actionVisitSupport     ->setData(QString::fromLatin1(lamexp_support_url()));
+       ui->actionVisitMuldersSite ->setData(QString::fromLatin1(lamexp_mulders_url()));
+       ui->actionVisitTracker     ->setData(QString::fromLatin1(lamexp_tracker_url()));
+       ui->actionVisitHAK         ->setData(QString::fromLatin1(g_hydrogen_audio_url));
+       ui->actionDocumentManual   ->setData(QString("%1/Manual.html")   .arg(QApplication::applicationDirPath()));
        ui->actionDocumentChangelog->setData(QString("%1/Changelog.html").arg(QApplication::applicationDirPath()));
        ui->actionDocumentTranslate->setData(QString("%1/Translate.html").arg(QApplication::applicationDirPath()));
-       connect(ui->actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated()));
-       connect(ui->actionVisitHomepage, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
-       connect(ui->actionVisitMuldersSite, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
-       connect(ui->actionVisitSupport, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
-       connect(ui->actionDocumentFAQ, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
+       connect(ui->actionCheckUpdates,      SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated()));
+       connect(ui->actionVisitSupport,      SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
+       connect(ui->actionVisitTracker,      SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
+       connect(ui->actionVisitHomepage,     SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
+       connect(ui->actionVisitMuldersSite,  SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
+       connect(ui->actionVisitHAK,          SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
+       connect(ui->actionDocumentManual,    SIGNAL(triggered()), this, SLOT(documentActionActivated()));
        connect(ui->actionDocumentChangelog, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
        connect(ui->actionDocumentTranslate, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
        
@@ -593,34 +749,30 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        // Prepare to show window
        //--------------------------------
 
-       //Center window in screen
-       QRect desktopRect = QApplication::desktop()->screenGeometry();
-       QRect thisRect = this->geometry();
-       move((desktopRect.width() - thisRect.width()) / 2, (desktopRect.height() - thisRect.height()) / 2);
-       setMinimumSize(thisRect.width(), thisRect.height());
-
-       //Create banner
-       m_banner = new WorkingBanner(this);
-
+       //Adjust size to DPI settings and re-center
+       MUtils::GUI::scale_widget(this);
+       
        //Create DropBox widget
-       m_dropBox = new DropBox(this, m_fileListModel, m_settings);
-       connect(m_fileListModel, SIGNAL(modelReset()), m_dropBox, SLOT(modelChanged()));
-       connect(m_fileListModel, SIGNAL(rowsInserted(QModelIndex,int,int)), m_dropBox, SLOT(modelChanged()));
-       connect(m_fileListModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), m_dropBox, SLOT(modelChanged()));
-       connect(m_fileListModel, SIGNAL(rowAppended()), m_dropBox, SLOT(modelChanged()));
+       m_dropBox.reset(new DropBox(this, m_fileListModel, m_settings));
+       connect(m_fileListModel, SIGNAL(modelReset()),                      m_dropBox.data(), SLOT(modelChanged()));
+       connect(m_fileListModel, SIGNAL(rowsInserted(QModelIndex,int,int)), m_dropBox.data(), SLOT(modelChanged()));
+       connect(m_fileListModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),  m_dropBox.data(), SLOT(modelChanged()));
+       connect(m_fileListModel, SIGNAL(rowAppended()),                     m_dropBox.data(), SLOT(modelChanged()));
 
        //Create message handler thread
-       m_messageHandler = new MessageHandlerThread();
-       m_delayedFileList = new QStringList();
-       m_delayedFileTimer = new QTimer();
+       m_messageHandler.reset(new MessageHandlerThread(ipcChannel));
+       connect(m_messageHandler.data(), SIGNAL(otherInstanceDetected()),       this, SLOT(notifyOtherInstance()), Qt::QueuedConnection);
+       connect(m_messageHandler.data(), SIGNAL(fileReceived(QString)),         this, SLOT(addFileDelayed(QString)), Qt::QueuedConnection);
+       connect(m_messageHandler.data(), SIGNAL(folderReceived(QString, bool)), this, SLOT(addFolderDelayed(QString, bool)), Qt::QueuedConnection);
+       connect(m_messageHandler.data(), SIGNAL(killSignalReceived()),          this, SLOT(close()), Qt::QueuedConnection);
+       m_messageHandler->start();
+
+       //Init delayed file handling
+       m_delayedFileList .reset(new QStringList());
+       m_delayedFileTimer.reset(new QTimer());
        m_delayedFileTimer->setSingleShot(true);
        m_delayedFileTimer->setInterval(5000);
-       connect(m_messageHandler, SIGNAL(otherInstanceDetected()), this, SLOT(notifyOtherInstance()), Qt::QueuedConnection);
-       connect(m_messageHandler, SIGNAL(fileReceived(QString)), this, SLOT(addFileDelayed(QString)), Qt::QueuedConnection);
-       connect(m_messageHandler, SIGNAL(folderReceived(QString, bool)), this, SLOT(addFolderDelayed(QString, bool)), Qt::QueuedConnection);
-       connect(m_messageHandler, SIGNAL(killSignalReceived()), this, SLOT(close()), Qt::QueuedConnection);
-       connect(m_delayedFileTimer, SIGNAL(timeout()), this, SLOT(handleDelayedFiles()));
-       m_messageHandler->start();
+       connect(m_delayedFileTimer.data(), SIGNAL(timeout()), this, SLOT(handleDelayedFiles()));
 
        //Load translation
        initializeTranslation();
@@ -630,6 +782,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        changeEvent(&languageChangeEvent);
 
        //Enable Drag & Drop
+       m_droppedFileList.reset(new QList<QUrl>());
        this->setAcceptDrops(true);
 }
 
@@ -651,34 +804,12 @@ MainWindow::~MainWindow(void)
        }
 
        //Unset models
-       SET_MODEL(ui->sourceFileView, NULL);
+       SET_MODEL(ui->sourceFileView,   NULL);
        SET_MODEL(ui->outputFolderView, NULL);
-       SET_MODEL(ui->metaDataView, NULL);
-
-       //Free memory
-       LAMEXP_DELETE(m_tabActionGroup);
-       LAMEXP_DELETE(m_styleActionGroup);
-       LAMEXP_DELETE(m_languageActionGroup);
-       LAMEXP_DELETE(m_banner);
-       LAMEXP_DELETE(m_fileSystemModel);
-       LAMEXP_DELETE(m_messageHandler);
-       LAMEXP_DELETE(m_delayedFileList);
-       LAMEXP_DELETE(m_delayedFileTimer);
-       LAMEXP_DELETE(m_metaInfoModel);
-       LAMEXP_DELETE(m_encoderButtonGroup);
-       LAMEXP_DELETE(m_modeButtonGroup);
-       LAMEXP_DELETE(m_overwriteButtonGroup);
-       LAMEXP_DELETE(m_sourceFilesContextMenu);
-       LAMEXP_DELETE(m_outputFolderFavoritesMenu);
-       LAMEXP_DELETE(m_outputFolderContextMenu);
-       LAMEXP_DELETE(m_dropBox);
-       LAMEXP_DELETE(m_evenFilterCustumParamsHelp);
-       LAMEXP_DELETE(m_evenFilterOutputFolderMouse);
-       LAMEXP_DELETE(m_evenFilterOutputFolderView);
-       LAMEXP_DELETE(m_evenFilterCompressionTab);
-       
+       SET_MODEL(ui->metaDataView,     NULL);
+
        //Un-initialize the dialog
-       LAMEXP_DELETE(ui);
+       MUTILS_DELETE(ui);
 }
 
 ////////////////////////////////////////////////////////////
@@ -695,27 +826,28 @@ void MainWindow::addFiles(const QStringList &files)
                return;
        }
 
-       ui->tabWidget->setCurrentIndex(0);
-
-       FileAnalyzer *analyzer = new FileAnalyzer(files);
-       connect(analyzer, SIGNAL(fileSelected(QString)), m_banner, SLOT(setText(QString)), Qt::QueuedConnection);
-       connect(analyzer, SIGNAL(progressValChanged(unsigned int)), m_banner, SLOT(setProgressVal(unsigned int)), Qt::QueuedConnection);
-       connect(analyzer, SIGNAL(progressMaxChanged(unsigned int)), m_banner, SLOT(setProgressMax(unsigned int)), Qt::QueuedConnection);
-       connect(analyzer, SIGNAL(fileAnalyzed(AudioFileModel)), m_fileListModel, SLOT(addFile(AudioFileModel)), Qt::QueuedConnection);
-       connect(m_banner, SIGNAL(userAbort()), analyzer, SLOT(abortProcess()), Qt::DirectConnection);
-
-       try
+       if(ui->tabWidget->currentIndex() != 0)
        {
-               m_fileListModel->setBlockUpdates(true);
-               QTime startTime = QTime::currentTime();
-               m_banner->show(tr("Adding file(s), please wait..."), analyzer);
+               SignalBlockHelper signalBlockHelper(ui->tabWidget);
+               ui->tabWidget->setCurrentIndex(0);
+               tabPageChanged(ui->tabWidget->currentIndex(), true);
        }
-       catch(...)
+
+       INIT_BANNER();
+       QScopedPointer<FileAnalyzer> analyzer(new FileAnalyzer(files));
+
+       connect(analyzer.data(), SIGNAL(fileSelected(QString)),            m_banner.data(), SLOT(setText(QString)),             Qt::QueuedConnection);
+       connect(analyzer.data(), SIGNAL(progressValChanged(unsigned int)), m_banner.data(), SLOT(setProgressVal(unsigned int)), Qt::QueuedConnection);
+       connect(analyzer.data(), SIGNAL(progressMaxChanged(unsigned int)), m_banner.data(), SLOT(setProgressMax(unsigned int)), Qt::QueuedConnection);
+       connect(analyzer.data(), SIGNAL(fileAnalyzed(AudioFileModel)),     m_fileListModel, SLOT(addFile(AudioFileModel)),      Qt::QueuedConnection);
+       connect(m_banner.data(), SIGNAL(userAbort()),                      analyzer.data(), SLOT(abortProcess()),               Qt::DirectConnection);
+
+       if(!analyzer.isNull())
        {
-               /* ignore any exceptions that may occur */
+               FileListBlockHelper fileListBlocker(m_fileListModel);
+               m_banner->show(tr("Adding file(s), please wait..."), analyzer.data());
        }
 
-       m_fileListModel->setBlockUpdates(false);
        qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
        ui->sourceFileView->update();
        qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
@@ -724,45 +856,44 @@ void MainWindow::addFiles(const QStringList &files)
 
        if(analyzer->filesDenied())
        {
-               QMessageBox::warning(this, tr("Access Denied"), QString("%1<br>%2").arg(NOBR(tr("%n file(s) have been rejected, because read access was not granted!", "", analyzer->filesDenied())), NOBR(tr("This usually means the file is locked by another process."))));
+               QMessageBox::warning(this, tr("Access Denied"), NOBREAK(QString("%1<br>%2").arg(tr("%n file(s) have been rejected, because read access was not granted!", "", analyzer->filesDenied()), tr("This usually means the file is locked by another process."))));
        }
        if(analyzer->filesDummyCDDA())
        {
-               QMessageBox::warning(this, tr("CDDA Files"), QString("%1<br><br>%2<br>%3").arg(NOBR(tr("%n file(s) have been rejected, because they are dummy CDDA files!", "", analyzer->filesDummyCDDA())), NOBR(tr("Sorry, LameXP cannot extract audio tracks from an Audio-CD at present.")), NOBR(tr("We recommend using %1 for that purpose.").arg("<a href=\"http://www.exactaudiocopy.de/\">Exact Audio Copy</a>"))));
+               QMessageBox::warning(this, tr("CDDA Files"), NOBREAK(QString("%1<br><br>%2<br>%3").arg(tr("%n file(s) have been rejected, because they are dummy CDDA files!", "", analyzer->filesDummyCDDA()), tr("Sorry, LameXP cannot extract audio tracks from an Audio-CD at present."), tr("We recommend using %1 for that purpose.").arg("<a href=\"http://www.exactaudiocopy.de/\">Exact Audio Copy</a>"))));
        }
        if(analyzer->filesCueSheet())
        {
-               QMessageBox::warning(this, tr("Cue Sheet"), QString("%1<br>%2").arg(NOBR(tr("%n file(s) have been rejected, because they appear to be Cue Sheet images!", "",analyzer->filesCueSheet())), NOBR(tr("Please use LameXP's Cue Sheet wizard for importing Cue Sheet files."))));
+               QMessageBox::warning(this, tr("Cue Sheet"), NOBREAK(QString("%1<br>%2").arg(tr("%n file(s) have been rejected, because they appear to be Cue Sheet images!", "",analyzer->filesCueSheet()), tr("Please use LameXP's Cue Sheet wizard for importing Cue Sheet files."))));
        }
        if(analyzer->filesRejected())
        {
-               QMessageBox::warning(this, tr("Files Rejected"), QString("%1<br>%2").arg(NOBR(tr("%n file(s) have been rejected, because the file format could not be recognized!", "", analyzer->filesRejected())), NOBR(tr("This usually means the file is damaged or the file format is not supported."))));
+               QMessageBox::warning(this, tr("Files Rejected"), NOBREAK(QString("%1<br>%2").arg(tr("%n file(s) have been rejected, because the file format could not be recognized!", "", analyzer->filesRejected()), tr("This usually means the file is damaged or the file format is not supported."))));
        }
 
-       LAMEXP_DELETE(analyzer);
        m_banner->close();
 }
 
 /*
  * Add folder to source list
  */
-void MainWindow::addFolder(const QString &path, bool recursive, bool delayed)
+void MainWindow::addFolder(const QString &path, bool recursive, bool delayed, QString filter)
 {
        QFileInfoList folderInfoList;
        folderInfoList << QFileInfo(path);
        QStringList fileList;
        
-       m_banner->show(tr("Scanning folder(s) for files, please wait..."));
+       showBanner(tr("Scanning folder(s) for files, please wait..."));
        
        QApplication::processEvents();
-       GetAsyncKeyState(VK_ESCAPE);
+       MUtils::OS::check_key_state_esc();
 
        while(!folderInfoList.isEmpty())
        {
-               if(GetAsyncKeyState(VK_ESCAPE) & 0x0001)
+               if(MUtils::OS::check_key_state_esc())
                {
-                       MessageBeep(MB_ICONERROR);
                        qWarning("Operation cancelled by user!");
+                       MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
                        fileList.clear();
                        break;
                }
@@ -770,12 +901,15 @@ void MainWindow::addFolder(const QString &path, bool recursive, bool delayed)
                QDir currentDir(folderInfoList.takeFirst().canonicalFilePath());
                QFileInfoList fileInfoList = currentDir.entryInfoList(QDir::Files | QDir::NoSymLinks);
 
-               while(!fileInfoList.isEmpty())
+               for(QFileInfoList::ConstIterator iter = fileInfoList.constBegin(); iter != fileInfoList.constEnd(); iter++)
                {
-                       fileList << fileInfoList.takeFirst().canonicalFilePath();
+                       if(filter.isEmpty() || (iter->suffix().compare(filter, Qt::CaseInsensitive) == 0))
+                       {
+                               fileList << iter->canonicalFilePath();
+                       }
                }
 
-               QApplication::processEvents();
+               QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
 
                if(recursive)
                {
@@ -803,8 +937,9 @@ void MainWindow::addFolder(const QString &path, bool recursive, bool delayed)
 /*
  * Check for updates
  */
-bool MainWindow::checkForUpdates(void)
+bool MainWindow::checkForUpdates(bool &haveNewVersion)
 {
+       haveNewVersion = false;
        bool bReadyToInstall = false;
        
        UpdateDialog *updateDialog = new UpdateDialog(m_settings, this);
@@ -812,11 +947,13 @@ bool MainWindow::checkForUpdates(void)
 
        if(updateDialog->getSuccess())
        {
+               SHOW_CORNER_WIDGET(false);
                m_settings->autoUpdateLastCheck(QDate::currentDate().toString(Qt::ISODate));
+               haveNewVersion = updateDialog->haveNewVersion();
                bReadyToInstall = updateDialog->updateReadyToInstall();
        }
 
-       LAMEXP_DELETE(updateDialog);
+       MUTILS_DELETE(updateDialog);
        return bReadyToInstall;
 }
 
@@ -834,7 +971,7 @@ void MainWindow::refreshFavorites(void)
                QAction *currentItem = folderList.takeFirst();
                if(currentItem->isSeparator()) break;
                m_outputFolderFavoritesMenu->removeAction(currentItem);
-               LAMEXP_DELETE(currentItem);
+               MUTILS_DELETE(currentItem);
        }
 
        QAction *lastItem = m_outputFolderFavoritesMenu->actions().first();
@@ -866,7 +1003,7 @@ void MainWindow::initializeTranslation(void)
                const QString qmFilePath = QFileInfo(m_settings->currentLanguageFile()).canonicalFilePath();
                if((!qmFilePath.isEmpty()) && QFileInfo(qmFilePath).exists() && QFileInfo(qmFilePath).isFile() && (QFileInfo(qmFilePath).suffix().compare("qm", Qt::CaseInsensitive) == 0))
                {
-                       if(lamexp_install_translator_from_file(qmFilePath))
+                       if(MUtils::Translation::install_translator_from_file(qmFilePath))
                        {
                                QList<QAction*> actions = m_languageActionGroup->actions();
                                while(!actions.isEmpty()) actions.takeFirst()->setChecked(false);
@@ -899,7 +1036,7 @@ void MainWindow::initializeTranslation(void)
                while(!languageActions.isEmpty())
                {
                        QAction *currentLanguage = languageActions.takeFirst();
-                       if(currentLanguage->data().toString().compare(LAMEXP_DEFAULT_LANGID, Qt::CaseInsensitive) == 0)
+                       if(currentLanguage->data().toString().compare(MUtils::Translation::DEFAULT_LANGID, Qt::CaseInsensitive) == 0)
                        {
                                currentLanguage->setChecked(true);
                                languageActionActivated(currentLanguage);
@@ -915,6 +1052,109 @@ void MainWindow::initializeTranslation(void)
        }
 }
 
+/*
+ * Open a document link
+ */
+void MainWindow::openDocumentLink(QAction *const action)
+{
+       if(!(action->data().isValid() && (action->data().type() == QVariant::String)))
+       {
+               qWarning("Cannot open document for this QAction!");
+               return;
+       }
+
+       //Try to open exitsing document file
+       const QFileInfo document(action->data().toString());
+       if(document.exists() && document.isFile() && (document.size() >= 1024))
+       {
+               QDesktopServices::openUrl(QUrl::fromLocalFile(document.canonicalFilePath()));
+               return;
+       }
+
+       //Document not found -> fallback mode!
+       qWarning("Document '%s' not found -> redirecting to the website!", MUTILS_UTF8(document.fileName()));
+       const QUrl url(QString("%1/%2").arg(QString::fromLatin1(g_documents_base_url), document.fileName()));
+       QDesktopServices::openUrl(url);
+}
+
+/*
+ * Move selected files up/down
+ */
+void MainWindow::moveSelectedFiles(const bool &up)
+{
+       QItemSelectionModel *const selection = ui->sourceFileView->selectionModel();
+       if(selection && selection->hasSelection())
+       {
+               const QModelIndexList selectedRows = up ? selection->selectedRows() : INVERT_LIST(selection->selectedRows());
+               if((up && (selectedRows.first().row() > 0)) || ((!up) && (selectedRows.first().row() < m_fileListModel->rowCount() - 1)))
+               {
+                       const int delta = up ? (-1) : 1;
+                       const int firstIndex = (up ? selectedRows.first() : selectedRows.last()).row() + delta;
+                       const int selectionCount = selectedRows.count();
+                       if(abs(delta) > 0)
+                       {
+                               FileListBlockHelper fileListBlocker(m_fileListModel);
+                               for(QModelIndexList::ConstIterator iter = selectedRows.constBegin(); iter != selectedRows.constEnd(); iter++)
+                               {
+                                       if(!m_fileListModel->moveFile((*iter), delta))
+                                       {
+                                               break;
+                                       }
+                               }
+                       }
+                       selection->clearSelection();
+                       for(int i = 0; i < selectionCount; i++)
+                       {
+                               const QModelIndex item = m_fileListModel->index(firstIndex + i, 0);
+                               selection->select(QItemSelection(item, item), QItemSelectionModel::Select | QItemSelectionModel::Rows);
+                       }
+                       ui->sourceFileView->scrollTo(m_fileListModel->index((up ? firstIndex : firstIndex + selectionCount - 1), 0), QAbstractItemView::PositionAtCenter);
+                       return;
+               }
+       }
+       MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
+}
+
+/*
+ * Show banner popup dialog
+ */
+void MainWindow::showBanner(const QString &text)
+{
+       INIT_BANNER();
+       m_banner->show(text);
+}
+
+/*
+ * Show banner popup dialog
+ */
+void MainWindow::showBanner(const QString &text, QThread *const thread)
+{
+       INIT_BANNER();
+       m_banner->show(text, thread);
+}
+
+/*
+ * Show banner popup dialog
+ */
+void MainWindow::showBanner(const QString &text, QEventLoop *const eventLoop)
+{
+       INIT_BANNER();
+       m_banner->show(text, eventLoop);
+}
+
+/*
+ * Show banner popup dialog
+ */
+void MainWindow::showBanner(const QString &text, bool &flag, const bool &test)
+{
+       if((!flag) && (test))
+       {
+               INIT_BANNER();
+               m_banner->show(text);
+               flag = true;
+       }
+}
+
 ////////////////////////////////////////////////////////////
 // EVENTS
 ////////////////////////////////////////////////////////////
@@ -927,10 +1167,12 @@ void MainWindow::showEvent(QShowEvent *event)
        m_accepted = false;
        resizeEvent(NULL);
        sourceModelChanged();
-       
+
        if(!event->spontaneous())
        {
+               SignalBlockHelper signalBlockHelper(ui->tabWidget);
                ui->tabWidget->setCurrentIndex(0);
+               tabPageChanged(ui->tabWidget->currentIndex(), true);
        }
 
        if(m_firstTimeShown)
@@ -952,81 +1194,91 @@ void MainWindow::showEvent(QShowEvent *event)
  */
 void MainWindow::changeEvent(QEvent *e)
 {
-       if(e->type() == QEvent::LanguageChange)
+       QMainWindow::changeEvent(e);
+       if(e->type() != QEvent::LanguageChange)
        {
-               qWarning("\nMainWindow::changeEvent()\n");
+               return;
+       }
 
-               int comboBoxIndex[8];
+       int comboBoxIndex[6];
                
-               //Backup combobox indices, as retranslateUi() resets
-               comboBoxIndex[0] = ui->comboBoxMP3ChannelMode->currentIndex();
-               comboBoxIndex[1] = ui->comboBoxSamplingRate->currentIndex();
-               comboBoxIndex[2] = ui->comboBoxAACProfile->currentIndex();
-               comboBoxIndex[3] = ui->comboBoxAftenCodingMode->currentIndex();
-               comboBoxIndex[4] = ui->comboBoxAftenDRCMode->currentIndex();
-               comboBoxIndex[5] = ui->comboBoxNormalizationMode->currentIndex();
-               comboBoxIndex[6] = 0; //comboBoxOpusOptimize->currentIndex();
-               comboBoxIndex[7] = ui->comboBoxOpusFramesize->currentIndex();
+       //Backup combobox indices, as retranslateUi() resets
+       comboBoxIndex[0] = ui->comboBoxMP3ChannelMode->currentIndex();
+       comboBoxIndex[1] = ui->comboBoxSamplingRate->currentIndex();
+       comboBoxIndex[2] = ui->comboBoxAACProfile->currentIndex();
+       comboBoxIndex[3] = ui->comboBoxAftenCodingMode->currentIndex();
+       comboBoxIndex[4] = ui->comboBoxAftenDRCMode->currentIndex();
+       comboBoxIndex[5] = ui->comboBoxOpusFramesize->currentIndex();
                
-               //Re-translate from UIC
-               ui->retranslateUi(this);
-
-               //Restore combobox indices
-               ui->comboBoxMP3ChannelMode->setCurrentIndex(comboBoxIndex[0]);
-               ui->comboBoxSamplingRate->setCurrentIndex(comboBoxIndex[1]);
-               ui->comboBoxAACProfile->setCurrentIndex(comboBoxIndex[2]);
-               ui->comboBoxAftenCodingMode->setCurrentIndex(comboBoxIndex[3]);
-               ui->comboBoxAftenDRCMode->setCurrentIndex(comboBoxIndex[4]);
-               ui->comboBoxNormalizationMode->setCurrentIndex(comboBoxIndex[5]);
-               //comboBoxOpusOptimize->setCurrentIndex(comboBoxIndex[6]);
-               ui->comboBoxOpusFramesize->setCurrentIndex(comboBoxIndex[7]);
-
-               //Update the window title
-               if(LAMEXP_DEBUG)
-               {
-                       setWindowTitle(QString("%1 [!!! DEBUG BUILD !!!]").arg(windowTitle()));
-               }
-               else if(lamexp_version_demo())
-               {
-                       setWindowTitle(QString("%1 [%2]").arg(windowTitle(), tr("DEMO VERSION")));
-               }
+       //Re-translate from UIC
+       ui->retranslateUi(this);
 
-               //Manually re-translate widgets that UIC doesn't handle
-               m_outputFolderNoteBox->setText(tr("Initializing directory outline, please be patient..."));
-               m_dropNoteLabel->setText(QString("<br><br>» %1 Â«<br><br><br><img src=\":/images/Sound.png\">").arg(tr("You can drop in audio files here!")));
-               m_showDetailsContextAction->setText(tr("Show Details"));
-               m_previewContextAction->setText(tr("Open File in External Application"));
-               m_findFileContextAction->setText(tr("Browse File Location"));
-               m_showFolderContextAction->setText(tr("Browse Selected Folder"));
-               m_refreshFolderContextAction->setText(tr("Refresh Directory Outline"));
-               m_goUpFolderContextAction->setText(tr("Go To Parent Directory"));
-               m_addFavoriteFolderAction->setText(tr("Bookmark Current Output Folder"));
-               m_exportCsvContextAction->setText(tr("Export Meta Tags to CSV File"));
-               m_importCsvContextAction->setText(tr("Import Meta Tags from CSV File"));
-
-               //Force GUI update
-               m_metaInfoModel->clearData();
-               m_metaInfoModel->setData(m_metaInfoModel->index(4, 1), m_settings->metaInfoPosition());
-               updateEncoder(m_settings->compressionEncoder());
-               updateLameAlgoQuality(ui->sliderLameAlgoQuality->value());
-               updateMaximumInstances(ui->sliderMaxInstances->value());
-               renameOutputPatternChanged(ui->lineEditRenamePattern->text(), true);
-
-               //Re-install shell integration
-               if(m_settings->shellIntegrationEnabled())
-               {
-                       ShellIntegration::install();
-               }
+       //Restore combobox indices
+       ui->comboBoxMP3ChannelMode->setCurrentIndex(comboBoxIndex[0]);
+       ui->comboBoxSamplingRate->setCurrentIndex(comboBoxIndex[1]);
+       ui->comboBoxAACProfile->setCurrentIndex(comboBoxIndex[2]);
+       ui->comboBoxAftenCodingMode->setCurrentIndex(comboBoxIndex[3]);
+       ui->comboBoxAftenDRCMode->setCurrentIndex(comboBoxIndex[4]);
+       ui->comboBoxOpusFramesize->setCurrentIndex(comboBoxIndex[5]);
+
+       //Update the window title
+       if(MUTILS_DEBUG)
+       {
+               setWindowTitle(QString("%1 [!!! DEBUG BUILD !!!]").arg(windowTitle()));
+       }
+       else if(lamexp_version_demo())
+       {
+               setWindowTitle(QString("%1 [%2]").arg(windowTitle(), tr("DEMO VERSION")));
+       }
 
-               //Translate system menu
-               if(HMENU hMenu = ::GetSystemMenu(winId(), FALSE))
+       //Manually re-translate widgets that UIC doesn't handle
+       m_outputFolderNoteBox->setText(tr("Initializing directory outline, please be patient..."));
+       m_dropNoteLabel->setText(QString("<br><img src=\":/images/DropZone.png\"><br><br>%1").arg(tr("You can drop in audio files here!")));
+       if(QLabel *cornerWidget = dynamic_cast<QLabel*>(ui->menubar->cornerWidget()))
+       {
+               cornerWidget->setText(QString("<nobr><img src=\":/icons/exclamation_small.png\">&nbsp;<b style=\"color:darkred\">%1</b>&nbsp;&nbsp;&nbsp;</nobr>").arg(tr("Check for Updates")));
+       }
+       m_showDetailsContextAction->setText(tr("Show Details"));
+       m_previewContextAction->setText(tr("Open File in External Application"));
+       m_findFileContextAction->setText(tr("Browse File Location"));
+       m_showFolderContextAction->setText(tr("Browse Selected Folder"));
+       m_refreshFolderContextAction->setText(tr("Refresh Directory Outline"));
+       m_goUpFolderContextAction->setText(tr("Go To Parent Directory"));
+       m_addFavoriteFolderAction->setText(tr("Bookmark Current Output Folder"));
+       m_exportCsvContextAction->setText(tr("Export Meta Tags to CSV File"));
+       m_importCsvContextAction->setText(tr("Import Meta Tags from CSV File"));
+
+       //Force GUI update
+       m_metaInfoModel->clearData();
+       m_metaInfoModel->setData(m_metaInfoModel->index(4, 1), m_settings->metaInfoPosition());
+       updateEncoder(m_settings->compressionEncoder());
+       updateLameAlgoQuality(ui->sliderLameAlgoQuality->value());
+       updateMaximumInstances(ui->sliderMaxInstances->value());
+       renameOutputPatternChanged(ui->lineEditRenamePattern->text(), true);
+       renameRegExpSearchChanged (ui->lineEditRenameRegExp_Search ->text(), true);
+       renameRegExpReplaceChanged(ui->lineEditRenameRegExp_Replace->text(), true);
+
+       //Re-install shell integration
+       if(m_settings->shellIntegrationEnabled())
+       {
+               ShellIntegration::install();
+       }
+
+       //Translate system menu
+       MUtils::GUI::sysmenu_update(this, IDM_ABOUTBOX, ui->buttonAbout->text());
+       
+       //Force resize event
+       QApplication::postEvent(this, new QResizeEvent(this->size(), QSize()));
+       for(QObjectList::ConstIterator iter = this->children().constBegin(); iter != this->children().constEnd(); iter++)
+       {
+               if(QWidget *child = dynamic_cast<QWidget*>(*iter))
                {
-                       ModifyMenu(hMenu, IDM_ABOUTBOX, MF_STRING | MF_BYCOMMAND, IDM_ABOUTBOX, QWCHAR(ui->buttonAbout->text()));
+                       QApplication::postEvent(child, new QResizeEvent(child->size(), QSize()));
                }
-                       
-               //Force resize, if needed
-               tabPageChanged(ui->tabWidget->currentIndex());
        }
+
+       //Force tabe page change
+       tabPageChanged(ui->tabWidget->currentIndex(), true);
 }
 
 /*
@@ -1047,51 +1299,12 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
  */
 void MainWindow::dropEvent(QDropEvent *event)
 {
-       ABORT_IF_BUSY;
-
-       QStringList droppedFiles;
-       QList<QUrl> urls = event->mimeData()->urls();
-
-       while(!urls.isEmpty())
+       m_droppedFileList->clear();
+       (*m_droppedFileList) << event->mimeData()->urls();
+       if(!m_droppedFileList->isEmpty())
        {
-               QUrl currentUrl = urls.takeFirst();
-               QFileInfo file(currentUrl.toLocalFile());
-               if(!file.exists())
-               {
-                       continue;
-               }
-               if(file.isFile())
-               {
-                       qDebug("Dropped File: %s", file.canonicalFilePath().toUtf8().constData());
-                       droppedFiles << file.canonicalFilePath();
-                       continue;
-               }
-               if(file.isDir())
-               {
-                       qDebug("Dropped Folder: %s", file.canonicalFilePath().toUtf8().constData());
-                       QList<QFileInfo> list = QDir(file.canonicalFilePath()).entryInfoList(QDir::Files | QDir::NoSymLinks);
-                       if(list.count() > 0)
-                       {
-                               for(int j = 0; j < list.count(); j++)
-                               {
-                                       droppedFiles << list.at(j).canonicalFilePath();
-                               }
-                       }
-                       else
-                       {
-                               list = QDir(file.canonicalFilePath()).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);
-                               for(int j = 0; j < list.count(); j++)
-                               {
-                                       qDebug("Descending to Folder: %s", list.at(j).canonicalFilePath().toUtf8().constData());
-                                       urls.prepend(QUrl::fromLocalFile(list.at(j).canonicalFilePath()));
-                               }
-                       }
-               }
-       }
-       
-       if(!droppedFiles.isEmpty())
-       {
-               addFilesDelayed(droppedFiles, true);
+               PLAY_SOUND_OPTIONAL("drop", true);
+               QTimer::singleShot(0, this, SLOT(handleDroppedFiles()));
        }
 }
 
@@ -1100,9 +1313,9 @@ void MainWindow::dropEvent(QDropEvent *event)
  */
 void MainWindow::closeEvent(QCloseEvent *event)
 {
-       if(m_banner->isVisible() || m_delayedFileTimer->isActive())
+       if(BANNER_VISIBLE || m_delayedFileTimer->isActive())
        {
-               MessageBeep(MB_ICONEXCLAMATION);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
                event->ignore();
        }
        
@@ -1126,7 +1339,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
 
        if(QWidget *port = ui->outputFolderView->viewport())
        {
-               m_outputFolderNoteBox->setGeometry(16, (port->height() - 64) / 2, port->width() - 32,  64);
+               m_outputFolderNoteBox->setGeometry(16, (port->height() - 64) / 2, port->width() - 32, 64);
        }
 }
 
@@ -1147,7 +1360,7 @@ void MainWindow::keyPressEvent(QKeyEvent *e)
        if(e->modifiers().testFlag(Qt::ControlModifier) && (e->key() == Qt::Key_F5))
        {
                initializeTranslation();
-               MessageBeep(MB_ICONINFORMATION);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
                return;
        }
 
@@ -1168,7 +1381,7 @@ void MainWindow::keyPressEvent(QKeyEvent *e)
  */
 bool MainWindow::eventFilter(QObject *obj, QEvent *event)
 {
-       if(obj == m_fileSystemModel)
+       if(obj == m_fileSystemModel.data())
        {
                if(QApplication::overrideCursor() == NULL)
                {
@@ -1184,12 +1397,12 @@ bool MainWindow::event(QEvent *e)
 {
        switch(e->type())
        {
-       case lamexp_event_queryendsession:
+       case MUtils::GUI::USER_EVENT_QUERYENDSESSION:
                qWarning("System is shutting down, main window prepares to close...");
-               if(m_banner->isVisible()) m_banner->close();
+               if(BANNER_VISIBLE) m_banner->close();
                if(m_delayedFileTimer->isActive()) m_delayedFileTimer->stop();
                return true;
-       case lamexp_event_endsession:
+       case MUtils::GUI::USER_EVENT_ENDSESSION:
                qWarning("System is shutting down, main window will close now...");
                if(isVisible())
                {
@@ -1212,13 +1425,13 @@ bool MainWindow::event(QEvent *e)
 
 bool MainWindow::winEvent(MSG *message, long *result)
 {
-       if((message->message == WM_SYSCOMMAND) && ((message->wParam & 0xFFF0) == IDM_ABOUTBOX))
+       if(MUtils::GUI::sysmenu_check_msg(message, IDM_ABOUTBOX))
        {
                QTimer::singleShot(0, ui->buttonAbout, SLOT(click()));
                *result = 0;
                return true;
        }
-       return WinSevenTaskbar::handleWinEvent(message, result);
+       return false;
 }
 
 ////////////////////////////////////////////////////////////
@@ -1234,73 +1447,90 @@ bool MainWindow::winEvent(MSG *message, long *result)
  */
 void MainWindow::windowShown(void)
 {
-       const QStringList &arguments = lamexp_arguments(); //QApplication::arguments();
+       const MUtils::OS::ArgumentMap &arguments = MUtils::OS::arguments(); //QApplication::arguments();
 
        //Force resize event
        resizeEvent(NULL);
 
        //First run?
-       bool firstRun = false;
-       for(int i = 0; i < arguments.count(); i++)
+       const bool firstRun = arguments.contains("first-run");
+       if (firstRun)
        {
-               /*QMessageBox::information(this, QString::number(i), arguments[i]);*/
-               if(!arguments[i].compare("--first-run", Qt::CaseInsensitive)) firstRun = true;
+               m_settings->licenseAccepted(0);
+               m_settings->autoUpdateCheckBeta(false);
+               m_settings->syncNow();
        }
 
        //Check license
-       if((m_settings->licenseAccepted() <= 0) || firstRun)
+       if (m_settings->licenseAccepted() <= 0)
        {
-               int iAccepted = m_settings->licenseAccepted();
-
-               if((iAccepted == 0) || firstRun)
+               if (m_settings->licenseAccepted() == 0)
                {
-                       AboutDialog *about = new AboutDialog(m_settings, this, true);
-                       iAccepted = about->exec();
-                       if(iAccepted <= 0) iAccepted = -2;
-                       LAMEXP_DELETE(about);
+                       QScopedPointer<AboutDialog> about(new AboutDialog(m_settings, this, true));
+                       if (about->exec() > 0)
+                       {
+                               m_settings->licenseAccepted(1);
+                               m_settings->syncNow();
+                               PLAY_SOUND_OPTIONAL("woohoo", false);
+                               if (lamexp_version_demo())
+                               {
+                                       showAnnounceBox();
+                               }
+                       }
+                       else
+                       {
+                               m_settings->licenseAccepted(-1);
+                               m_settings->syncNow();
+                       }
                }
-
-               if(iAccepted <= 0)
+               else
                {
-                       m_settings->licenseAccepted(++iAccepted);
+                       m_settings->licenseAccepted(0);
                        m_settings->syncNow();
-                       QApplication::processEvents();
-                       PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
-                       QMessageBox::critical(this, tr("License Declined"), tr("You have declined the license. Consequently the application will exit now!"), tr("Goodbye!"));
-                       QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
-                       if(uninstallerInfo.exists())
+               }
+       }
+
+       //License declined?
+       if(m_settings->licenseAccepted() <= 0)
+       {
+               QApplication::processEvents();
+               PLAY_SOUND_OPTIONAL("whammy", false);
+               QMessageBox::critical(this, tr("License Declined"), tr("You have declined the license. Consequently the application will exit now!"), tr("Goodbye!"));
+               QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
+               if(uninstallerInfo.exists())
+               {
+                       QString uninstallerDir = uninstallerInfo.canonicalPath();
+                       QString uninstallerPath = uninstallerInfo.canonicalFilePath();
+                       for(int i = 0; i < 3; i++)
                        {
-                               QString uninstallerDir = uninstallerInfo.canonicalPath();
-                               QString uninstallerPath = uninstallerInfo.canonicalFilePath();
-                               for(int i = 0; i < 3; i++)
-                               {
-                                       HINSTANCE res = ShellExecuteW(reinterpret_cast<HWND>(this->winId()), L"open", QWCHAR(QDir::toNativeSeparators(uninstallerPath)), L"/Force", QWCHAR(QDir::toNativeSeparators(uninstallerDir)), SW_SHOWNORMAL);
-                                       if(reinterpret_cast<int>(res) > 32) break;
-                               }
+                               if(MUtils::OS::shell_open(this, QDir::toNativeSeparators(uninstallerPath), "/Force", QDir::toNativeSeparators(uninstallerDir))) break;
                        }
-                       QApplication::quit();
-                       return;
                }
-               
-               PlaySound(MAKEINTRESOURCE(IDR_WAVE_WOOHOO), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
-               m_settings->licenseAccepted(1);
-               m_settings->syncNow();
-               if(lamexp_version_demo()) showAnnounceBox();
+               QApplication::quit();
+               return;
        }
        
        //Check for expiration
        if(lamexp_version_demo())
        {
-               if(lamexp_current_date_safe() >= lamexp_version_expires())
+               if(MUtils::OS::current_date() >= lamexp_version_expires())
                {
-                       qWarning("Binary has expired !!!");
-                       PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
-                       if(QMessageBox::warning(this, tr("LameXP - Expired"), QString("%1<br>%2").arg(NOBR(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate))), NOBR(tr("LameXP is free software and release versions won't expire."))), tr("Check for Updates"), tr("Exit Program")) == 0)
+                       qWarning("Binary expired !!!");
+                       PLAY_SOUND_OPTIONAL("whammy", false);
+                       bool haveNewVersion = true;
+                       if(QMessageBox::warning(this, tr("LameXP - Expired"), NOBREAK(QString("%1<br>%2").arg(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate)), tr("LameXP is free software and release versions won't expire."))), tr("Check for Updates"), tr("Exit Program")) == 0)
+                       {
+                               if (checkForUpdates(haveNewVersion))
+                               {
+                                       QApplication::quit();
+                                       return;
+                               }
+                       }
+                       if(haveNewVersion)
                        {
-                               checkForUpdates();
+                               QApplication::quit();
+                               return;
                        }
-                       QApplication::quit();
-                       return;
                }
        }
 
@@ -1308,9 +1538,9 @@ void MainWindow::windowShown(void)
        if(m_settings->slowStartup() && m_settings->antivirNotificationsEnabled())
        {
                QString message;
-               message += NOBR(tr("It seems that a bogus anti-virus software is slowing down the startup of LameXP.")).append("<br>");
-               message += NOBR(tr("Please refer to the %1 document for details and solutions!")).arg("<a href=\"http://lamexp.sourceforge.net/doc/FAQ.html#df406578\">F.A.Q.</a>").append("<br>");
-               if(QMessageBox::warning(this, tr("Slow Startup"), message, tr("Discard"), tr("Don't Show Again")) == 1)
+               message += tr("It seems that a bogus anti-virus software is slowing down the startup of LameXP.").append("<br>");
+               message += tr("Please refer to the %1 document for details and solutions!").arg(LINK_EX(QString("%1/Manual.html#performance-issues").arg(g_documents_base_url), tr("Manual"))).append("<br>");
+               if(QMessageBox::warning(this, tr("Slow Startup"), NOBREAK(message), tr("Discard"), tr("Don't Show Again")) == 1)
                {
                        m_settings->antivirNotificationsEnabled(false);
                        ui->actionDisableSlowStartupNotifications->setChecked(!m_settings->antivirNotificationsEnabled());
@@ -1318,14 +1548,16 @@ void MainWindow::windowShown(void)
        }
 
        //Update reminder
-       if(lamexp_current_date_safe() >= lamexp_version_date().addYears(1))
+       if(MUtils::OS::current_date() >= MUtils::Version::app_build_date().addYears(1))
        {
                qWarning("Binary is more than a year old, time to update!");
-               int ret = QMessageBox::warning(this, tr("Urgent Update"), NOBR(tr("Your version of LameXP is more than a year old. Time for an update!")), tr("Check for Updates"), tr("Exit Program"), tr("Ignore"));
+               SHOW_CORNER_WIDGET(true);
+               int ret = QMessageBox::warning(this, tr("Urgent Update"), NOBREAK(tr("Your version of LameXP is more than a year old. Time for an update!")), tr("Check for Updates"), tr("Exit Program"), tr("Ignore"));
                switch(ret)
                {
                case 0:
-                       if(checkForUpdates())
+                       bool haveNewVersion;
+                       if(checkForUpdates(haveNewVersion))
                        {
                                QApplication::quit();
                                return;
@@ -1336,95 +1568,84 @@ void MainWindow::windowShown(void)
                        return;
                default:
                        QEventLoop loop; QTimer::singleShot(7000, &loop, SLOT(quit()));
-                       PlaySound(MAKEINTRESOURCE(IDR_WAVE_WAITING), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
-                       m_banner->show(tr("Skipping update check this time, please be patient..."), &loop);
+                       PLAY_SOUND_OPTIONAL("waiting", true);
+                       showBanner(tr("Skipping update check this time, please be patient..."), &loop);
                        break;
                }
        }
-       else if(m_settings->autoUpdateEnabled())
+       else
        {
                QDate lastUpdateCheck = QDate::fromString(m_settings->autoUpdateLastCheck(), Qt::ISODate);
-               if(!firstRun && (!lastUpdateCheck.isValid() || lamexp_current_date_safe() >= lastUpdateCheck.addDays(14)))
+               if((!firstRun) && ((!lastUpdateCheck.isValid()) || (MUtils::OS::current_date() >= lastUpdateCheck.addDays(14))))
                {
-                       if(QMessageBox::information(this, tr("Update Reminder"), NOBR(lastUpdateCheck.isValid() ? tr("Your last update check was more than 14 days ago. Check for updates now?") : tr("Your did not check for LameXP updates yet. Check for updates now?")), tr("Check for Updates"), tr("Postpone")) == 0)
+                       SHOW_CORNER_WIDGET(true);
+                       if(m_settings->autoUpdateEnabled())
                        {
-                               if(checkForUpdates())
+                               if(QMessageBox::information(this, tr("Update Reminder"), NOBREAK(lastUpdateCheck.isValid() ? tr("Your last update check was more than 14 days ago. Check for updates now?") : tr("Your did not check for LameXP updates yet. Check for updates now?")), tr("Check for Updates"), tr("Postpone")) == 0)
                                {
-                                       QApplication::quit();
-                                       return;
+                                       bool haveNewVersion;
+                                       if(checkForUpdates(haveNewVersion))
+                                       {
+                                               QApplication::quit();
+                                               return;
+                                       }
                                }
                        }
                }
        }
 
        //Check for AAC support
-       const int aacEncoder = EncoderRegistry::getAacEncoder();
-       if(aacEncoder == SettingsModel::AAC_ENCODER_NERO)
-       {
-               if(m_settings->neroAacNotificationsEnabled())
-               {
-                       if(lamexp_tool_version("neroAacEnc.exe") < lamexp_toolver_neroaac())
-                       {
-                               QString messageText;
-                               messageText += NOBR(tr("LameXP detected that your version of the Nero AAC encoder is outdated!")).append("<br>");
-                               messageText += NOBR(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac(), tr("n/a")), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe"), tr("n/a")))).append("<br><br>");
-                               messageText += NOBR(tr("You can download the latest version of the Nero AAC encoder from the Nero website at:")).append("<br>");
-                               messageText += "<nobr><tt>" + LINK(AboutDialog::neroAacUrl) + "</tt></nobr><br><br>";
-                               messageText += NOBR(tr("(Hint: Please ignore the name of the downloaded ZIP file and check the included 'changelog.txt' instead!)")).append("<br>");
-                               QMessageBox::information(this, tr("AAC Encoder Outdated"), messageText);
-                       }
-               }
-       }
-       else
-       {
-               if(m_settings->neroAacNotificationsEnabled() && (aacEncoder <= SettingsModel::AAC_ENCODER_NONE))
+       if(m_settings->neroAacNotificationsEnabled() && (EncoderRegistry::getAacEncoder() <= SettingsModel::AAC_ENCODER_NONE))
+       {
+               QString appPath = QDir(QCoreApplication::applicationDirPath()).canonicalPath();
+               if(appPath.isEmpty()) appPath = QCoreApplication::applicationDirPath();
+               QString messageText;
+               messageText += tr("The Nero AAC encoder could not be found. AAC encoding support will be disabled.").append("<br>");
+               messageText += tr("Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory!").append("<br><br>");
+               messageText += QString("<b>").append(tr("Your LameXP install directory is located here:")).append("</b><br>");
+               messageText += QString("<tt>%1</tt><br><br>").arg(FSLINK(QDir::toNativeSeparators(appPath)));
+               messageText += QString("<b>").append(tr("You can download the Nero AAC encoder for free from this website:")).append("</b><br>");
+               messageText += QString("<tt>").append(LINK(AboutDialog::neroAacUrl)).append("</tt><br><br>");
+               messageText += QString("<i>").append(tr("Note: Nero AAC encoder version %1 or newer is required to enable AAC encoding support!").arg(lamexp_version2string("v?.?.?.?", lamexp_toolver_neroaac(), "n/a"))).append("</i><br>");
+               if(QMessageBox::information(this, tr("AAC Support Disabled"), NOBREAK(messageText), tr("Discard"), tr("Don't Show Again")) == 1)
                {
-                       QString appPath = QDir(QCoreApplication::applicationDirPath()).canonicalPath();
-                       if(appPath.isEmpty()) appPath = QCoreApplication::applicationDirPath();
-                       QString messageText;
-                       messageText += NOBR(tr("The Nero AAC encoder could not be found. AAC encoding support will be disabled.")).append("<br>");
-                       messageText += NOBR(tr("Please put 'neroAacEnc.exe', 'neroAacDec.exe' and 'neroAacTag.exe' into the LameXP directory!")).append("<br><br>");
-                       messageText += NOBR(tr("Your LameXP directory is located here:")).append("<br>");
-                       messageText += QString("<nobr><tt>%1</tt></nobr><br><br>").arg(FSLINK(QDir::toNativeSeparators(appPath)));
-                       messageText += NOBR(tr("You can download the Nero AAC encoder for free from the official Nero website at:")).append("<br>");
-                       messageText += "<nobr><tt>" + LINK(AboutDialog::neroAacUrl) + "</tt></nobr><br>";
-                       if(QMessageBox::information(this, tr("AAC Support Disabled"), messageText, tr("Discard"), tr("Don't Show Again")) == 1)
-                       {
-                               m_settings->neroAacNotificationsEnabled(false);
-                               ui->actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled());
-                       }
+                       m_settings->neroAacNotificationsEnabled(false);
+                       ui->actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled());
                }
        }
 
        //Add files from the command-line
-       for(int i = 0; i < arguments.count() - 1; i++)
+       QStringList addedFiles;
+       foreach(const QString &value, arguments.values("add"))
        {
-               QStringList addedFiles;
-               if(!arguments[i].compare("--add", Qt::CaseInsensitive))
+               if(!value.isEmpty())
                {
-                       QFileInfo currentFile(arguments[++i].trimmed());
-                       qDebug("Adding file from CLI: %s", currentFile.absoluteFilePath().toUtf8().constData());
+                       QFileInfo currentFile(value);
+                       qDebug("Adding file from CLI: %s", MUTILS_UTF8(currentFile.absoluteFilePath()));
                        addedFiles.append(currentFile.absoluteFilePath());
                }
-               if(!addedFiles.isEmpty())
-               {
-                       addFilesDelayed(addedFiles);
-               }
+       }
+       if(!addedFiles.isEmpty())
+       {
+               addFilesDelayed(addedFiles);
        }
 
        //Add folders from the command-line
-       for(int i = 0; i < arguments.count() - 1; i++)
+       foreach(const QString &value, arguments.values("add-folder"))
        {
-               if(!arguments[i].compare("--add-folder", Qt::CaseInsensitive))
+               if(!value.isEmpty())
                {
-                       QFileInfo currentFile(arguments[++i].trimmed());
-                       qDebug("Adding folder from CLI: %s", currentFile.absoluteFilePath().toUtf8().constData());
+                       const QFileInfo currentFile(value);
+                       qDebug("Adding folder from CLI: %s", MUTILS_UTF8(currentFile.absoluteFilePath()));
                        addFolder(currentFile.absoluteFilePath(), false, true);
                }
-               if(!arguments[i].compare("--add-recursive", Qt::CaseInsensitive))
+       }
+       foreach(const QString &value, arguments.values("add-recursive"))
+       {
+               if(!value.isEmpty())
                {
-                       QFileInfo currentFile(arguments[++i].trimmed());
-                       qDebug("Adding folder recursively from CLI: %s", currentFile.absoluteFilePath().toUtf8().constData());
+                       const QFileInfo currentFile(value);
+                       qDebug("Adding folder recursively from CLI: %s", MUTILS_UTF8(currentFile.absoluteFilePath()));
                        addFolder(currentFile.absoluteFilePath(), true, true);
                }
        }
@@ -1449,14 +1670,14 @@ void MainWindow::showAnnounceBox(void)
 {
        const unsigned int timeout = 8U;
 
-       const QString announceText = QString("%1<br><br>%2<br><nobr><tt>%3</tt></nobr><br>").arg
+       const QString announceText = QString("%1<br><br>%2<br><tt>%3</tt><br>").arg
        (
-               NOBR("We are still looking for LameXP translators!"),
-               NOBR("If you are willing to translate LameXP to your language or to complete an existing translation, please refer to:"),
+               "We are still looking for LameXP translators!",
+               "If you are willing to translate LameXP to your language or to complete an existing translation, please refer to:",
                LINK("http://lamexp.sourceforge.net/doc/Translate.html")
        );
 
-       QMessageBox *announceBox = new QMessageBox(QMessageBox::Warning, "We want you!", announceText, QMessageBox::NoButton, this);
+       QMessageBox *announceBox = new QMessageBox(QMessageBox::Warning, "We want you!", NOBREAK(announceText), QMessageBox::NoButton, this);
        announceBox->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
        announceBox->setIconPixmap(QIcon(":/images/Announcement.png").pixmap(64,79));
        
@@ -1494,10 +1715,10 @@ void MainWindow::showAnnounceBox(void)
        for(unsigned int i = 0; i < timeout; i++)
        {
                timers[i]->stop();
-               LAMEXP_DELETE(timers[i]);
+               MUTILS_DELETE(timers[i]);
        }
 
-       LAMEXP_DELETE(announceBox);
+       MUTILS_DELETE(announceBox);
 }
 
 // =========================================================
@@ -1517,46 +1738,47 @@ void MainWindow::encodeButtonClicked(void)
 
        if(m_fileListModel->rowCount() < 1)
        {
-               QMessageBox::warning(this, tr("LameXP"), NOBR(tr("You must add at least one file to the list before proceeding!")));
+               QMessageBox::warning(this, tr("LameXP"), NOBREAK(tr("You must add at least one file to the list before proceeding!")));
                ui->tabWidget->setCurrentIndex(0);
                return;
        }
        
-       QString tempFolder = m_settings->customTempPathEnabled() ? m_settings->customTempPath() : lamexp_temp_folder2();
+       QString tempFolder = m_settings->customTempPathEnabled() ? m_settings->customTempPath() : MUtils::temp_folder();
        if(!QFileInfo(tempFolder).exists() || !QFileInfo(tempFolder).isDir())
        {
-               if(QMessageBox::warning(this, tr("Not Found"), QString("%1<br><tt>%2</tt>").arg(NOBR(tr("Your currently selected TEMP folder does not exist anymore:")), NOBR(QDir::toNativeSeparators(tempFolder))), tr("Restore Default"), tr("Cancel")) == 0)
+               if(QMessageBox::warning(this, tr("Not Found"), NOBREAK(QString("%1<br><tt>%2</tt>").arg(tr("Your currently selected TEMP folder does not exist anymore:"), QDir::toNativeSeparators(tempFolder))), tr("Restore Default"), tr("Cancel")) == 0)
                {
-                       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder, m_settings->customTempPathEnabledDefault());
+                       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder, (!m_settings->customTempPathEnabledDefault()));
                }
                return;
        }
 
-       bool ok = false;
-       unsigned __int64 currentFreeDiskspace = lamexp_free_diskspace(tempFolder, &ok);
-
-       if(ok && (currentFreeDiskspace < (oneGigabyte * minimumFreeDiskspaceMultiplier)))
-       {
-               QStringList tempFolderParts = tempFolder.split("/", QString::SkipEmptyParts, Qt::CaseInsensitive);
-               tempFolderParts.takeLast();
-               if(m_settings->soundsEnabled()) PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
-               QString lowDiskspaceMsg = QString("%1<br>%2<br><br>%3<br>%4<br>").arg
-               (
-                       NOBR(tr("There are less than %1 GB of free diskspace available on your system's TEMP folder.").arg(QString::number(minimumFreeDiskspaceMultiplier))),
-                       NOBR(tr("It is highly recommend to free up more diskspace before proceeding with the encode!")),
-                       NOBR(tr("Your TEMP folder is located at:")),
-                       QString("<nobr><tt>%1</tt></nobr>").arg(FSLINK(tempFolderParts.join("\\")))
-               );
-               switch(QMessageBox::warning(this, tr("Low Diskspace Warning"), lowDiskspaceMsg, tr("Abort Encoding Process"), tr("Clean Disk Now"), tr("Ignore")))
+       quint64 currentFreeDiskspace = 0;
+       if(MUtils::OS::free_diskspace(tempFolder, currentFreeDiskspace))
+       {
+               if(currentFreeDiskspace < (oneGigabyte * minimumFreeDiskspaceMultiplier))
                {
-               case 1:
-                       QProcess::startDetached(QString("%1/cleanmgr.exe").arg(lamexp_known_folder(lamexp_folder_systemfolder)), QStringList() << "/D" << tempFolderParts.first());
-               case 0:
-                       return;
-                       break;
-               default:
-                       QMessageBox::warning(this, tr("Low Diskspace"), NOBR(tr("You are proceeding with low diskspace. Problems might occur!")));
-                       break;
+                       QStringList tempFolderParts = tempFolder.split("/", QString::SkipEmptyParts, Qt::CaseInsensitive);
+                       tempFolderParts.takeLast();
+                       PLAY_SOUND_OPTIONAL("whammy", false);
+                       QString lowDiskspaceMsg = QString("%1<br>%2<br><br>%3<br>%4<br>").arg
+                       (
+                               tr("There are less than %1 GB of free diskspace available on your system's TEMP folder.").arg(QString::number(minimumFreeDiskspaceMultiplier)),
+                               tr("It is highly recommend to free up more diskspace before proceeding with the encode!"),
+                               tr("Your TEMP folder is located at:"),
+                               QString("<tt>%1</tt>").arg(FSLINK(tempFolderParts.join("\\")))
+                       );
+                       switch(QMessageBox::warning(this, tr("Low Diskspace Warning"), NOBREAK(lowDiskspaceMsg), tr("Abort Encoding Process"), tr("Clean Disk Now"), tr("Ignore")))
+                       {
+                       case 1:
+                               QProcess::startDetached(QString("%1/cleanmgr.exe").arg(MUtils::OS::known_folder(MUtils::OS::FOLDER_SYSTEM_DEF)), QStringList() << "/D" << tempFolderParts.first());
+                       case 0:
+                               return;
+                               break;
+                       default:
+                               QMessageBox::warning(this, tr("Low Diskspace"), NOBREAK(tr("You are proceeding with low diskspace. Problems might occur!")));
+                               break;
+                       }
                }
        }
 
@@ -1569,6 +1791,7 @@ void MainWindow::encodeButtonClicked(void)
        case SettingsModel::FLACEncoder:
        case SettingsModel::OpusEncoder:
        case SettingsModel::DCAEncoder:
+       case SettingsModel::MACEncoder:
        case SettingsModel::PCMEncoder:
                break;
        default:
@@ -1579,10 +1802,10 @@ void MainWindow::encodeButtonClicked(void)
 
        if(!m_settings->outputToSourceDir())
        {
-               QFile writeTest(QString("%1/~%2.txt").arg(m_settings->outputDir(), lamexp_rand_str()));
+               QFile writeTest(QString("%1/~%2.txt").arg(m_settings->outputDir(), MUtils::next_rand_str()));
                if(!(writeTest.open(QIODevice::ReadWrite) && (writeTest.write(writeTestBuffer) == strlen(writeTestBuffer))))
                {
-                       QMessageBox::warning(this, tr("LameXP"), QString("%1<br><nobr>%2</nobr><br><br>%3").arg(tr("Cannot write to the selected output directory."), m_settings->outputDir(), tr("Please choose a different directory!")));
+                       QMessageBox::warning(this, tr("LameXP"), NOBREAK(QString("%1<br>%2<br><br>%3").arg(tr("Cannot write to the selected output directory."), m_settings->outputDir(), tr("Please choose a different directory!"))));
                        ui->tabWidget->setCurrentIndex(1);
                        return;
                }
@@ -1603,13 +1826,9 @@ void MainWindow::encodeButtonClicked(void)
 void MainWindow::aboutButtonClicked(void)
 {
        ABORT_IF_BUSY;
-
-       TEMP_HIDE_DROPBOX
-       (
-               AboutDialog *aboutBox = new AboutDialog(m_settings, this);
-               aboutBox->exec();
-               LAMEXP_DELETE(aboutBox);
-       );
+       WidgetHideHelper hiderHelper(m_dropBox.data());
+       QScopedPointer<AboutDialog> aboutBox(new AboutDialog(m_settings, this));
+       aboutBox->exec();
 }
 
 /*
@@ -1628,10 +1847,11 @@ void MainWindow::closeButtonClicked(void)
 /*
  * Tab page changed
  */
-void MainWindow::tabPageChanged(int idx)
+void MainWindow::tabPageChanged(int idx, const bool silent)
 {
        resizeEvent(NULL);
        
+       //Update "view" menu
        QList<QAction*> actions = m_tabActionGroup->actions();
        for(int i = 0; i < actions.count(); i++)
        {
@@ -1643,6 +1863,12 @@ void MainWindow::tabPageChanged(int idx)
                }
        }
 
+       //Play tick sound
+       if(!silent)
+       {
+               PLAY_SOUND_OPTIONAL("tick", true);
+       }
+
        int initialWidth = this->width();
        int maximumWidth = QApplication::desktop()->availableGeometry().width();
 
@@ -1680,7 +1906,7 @@ void MainWindow::tabPageChanged(int idx)
                }
                else
                {
-                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
                }
        }
 
@@ -1710,6 +1936,21 @@ void MainWindow::tabActionActivated(QAction *action)
 }
 
 // =========================================================
+// Menubar slots
+// =========================================================
+
+/*
+ * Handle corner widget Event
+ */
+void MainWindow::cornerWidgetEventOccurred(QWidget *sender, QEvent *event)
+{
+       if(event->type() == QEvent::MouseButtonPress)
+       {
+               QTimer::singleShot(0, this, SLOT(checkUpdatesActionActivated()));
+       }
+}
+
+// =========================================================
 // View menu slots
 // =========================================================
 
@@ -1770,13 +2011,17 @@ void MainWindow::styleActionActivated(QAction *action)
        if(QEvent *e = new QEvent(QEvent::LanguageChange))
        {
                changeEvent(e);
-               LAMEXP_DELETE(e);
+               MUTILS_DELETE(e);
        }
 
        //Make transparent
        const type_info &styleType = typeid(*qApp->style());
        const bool bTransparent = ((typeid(QWindowsVistaStyle) == styleType) || (typeid(QWindowsXPStyle) == styleType));
        MAKE_TRANSPARENT(ui->scrollArea, bTransparent);
+
+       //Also force a re-size event
+       QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+       resizeEvent(NULL);
 }
 
 /*
@@ -1788,7 +2033,7 @@ void MainWindow::languageActionActivated(QAction *action)
        {
                QString langId = action->data().toString();
 
-               if(lamexp_install_translator(langId))
+               if(MUtils::Translation::install_translator(langId))
                {
                        action->setChecked(true);
                        ui->actionLoadTranslationFromFile->setChecked(false);
@@ -1811,7 +2056,7 @@ void MainWindow::languageFromFileActionActivated(bool checked)
        {
                QStringList selectedFiles = dialog.selectedFiles();
                const QString qmFile = QFileInfo(selectedFiles.first()).canonicalFilePath();
-               if(lamexp_install_translator_from_file(qmFile))
+               if(MUtils::Translation::install_translator_from_file(qmFile))
                {
                        QList<QAction*> actions = m_languageActionGroup->actions();
                        while(!actions.isEmpty())
@@ -1839,9 +2084,9 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Disable Update Reminder"), NOBR(tr("Do you really want to disable the update reminder?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Disable Update Reminder"), NOBREAK(tr("Do you really want to disable the update reminder?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       QMessageBox::information(this, tr("Update Reminder"), QString("%1<br>%2").arg(NOBR(tr("The update reminder has been disabled.")), NOBR(tr("Please remember to check for updates at regular intervals!"))));
+                       QMessageBox::information(this, tr("Update Reminder"), NOBREAK(QString("%1<br>%2").arg(tr("The update reminder has been disabled."), tr("Please remember to check for updates at regular intervals!"))));
                        m_settings->autoUpdateEnabled(false);
                }
                else
@@ -1851,7 +2096,7 @@ void MainWindow::disableUpdateReminderActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Update Reminder"), NOBR(tr("The update reminder has been re-enabled.")));
+                       QMessageBox::information(this, tr("Update Reminder"), NOBREAK(tr("The update reminder has been re-enabled.")));
                        m_settings->autoUpdateEnabled(true);
        }
 
@@ -1865,9 +2110,9 @@ void MainWindow::disableSoundsActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Disable Sound Effects"), NOBR(tr("Do you really want to disable all sound effects?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Disable Sound Effects"), NOBREAK(tr("Do you really want to disable all sound effects?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       QMessageBox::information(this, tr("Sound Effects"), NOBR(tr("All sound effects have been disabled.")));
+                       QMessageBox::information(this, tr("Sound Effects"), NOBREAK(tr("All sound effects have been disabled.")));
                        m_settings->soundsEnabled(false);
                }
                else
@@ -1877,7 +2122,7 @@ void MainWindow::disableSoundsActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Sound Effects"), NOBR(tr("The sound effects have been re-enabled.")));
+                       QMessageBox::information(this, tr("Sound Effects"), NOBREAK(tr("The sound effects have been re-enabled.")));
                        m_settings->soundsEnabled(true);
        }
 
@@ -1891,9 +2136,9 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Nero AAC Notifications"), NOBR(tr("Do you really want to disable all Nero AAC Encoder notifications?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Nero AAC Notifications"), NOBREAK(tr("Do you really want to disable all Nero AAC Encoder notifications?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       QMessageBox::information(this, tr("Nero AAC Notifications"), NOBR(tr("All Nero AAC Encoder notifications have been disabled.")));
+                       QMessageBox::information(this, tr("Nero AAC Notifications"), NOBREAK(tr("All Nero AAC Encoder notifications have been disabled.")));
                        m_settings->neroAacNotificationsEnabled(false);
                }
                else
@@ -1903,8 +2148,8 @@ void MainWindow::disableNeroAacNotificationsActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Nero AAC Notifications"), NOBR(tr("The Nero AAC Encoder notifications have been re-enabled.")));
-                       m_settings->neroAacNotificationsEnabled(true);
+               QMessageBox::information(this, tr("Nero AAC Notifications"), NOBREAK(tr("The Nero AAC Encoder notifications have been re-enabled.")));
+               m_settings->neroAacNotificationsEnabled(true);
        }
 
        ui->actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled());
@@ -1917,9 +2162,9 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Slow Startup Notifications"), NOBR(tr("Do you really want to disable the slow startup notifications?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Slow Startup Notifications"), NOBREAK(tr("Do you really want to disable the slow startup notifications?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       QMessageBox::information(this, tr("Slow Startup Notifications"), NOBR(tr("The slow startup notifications have been disabled.")));
+                       QMessageBox::information(this, tr("Slow Startup Notifications"), NOBREAK(tr("The slow startup notifications have been disabled.")));
                        m_settings->antivirNotificationsEnabled(false);
                }
                else
@@ -1929,7 +2174,7 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Slow Startup Notifications"), NOBR(tr("The slow startup notifications have been re-enabled.")));
+                       QMessageBox::information(this, tr("Slow Startup Notifications"), NOBREAK(tr("The slow startup notifications have been re-enabled.")));
                        m_settings->antivirNotificationsEnabled(true);
        }
 
@@ -1942,41 +2187,47 @@ void MainWindow::disableSlowStartupNotificationsActionTriggered(bool checked)
 void MainWindow::importCueSheetActionTriggered(bool checked)
 {
        ABORT_IF_BUSY;
-       
-       TEMP_HIDE_DROPBOX
-       (
-               while(true)
-               {
-                       int result = 0;
-                       QString selectedCueFile;
+       WidgetHideHelper hiderHelper(m_dropBox.data());
 
-                       if(lamexp_themes_enabled())
-                       {
-                               selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
-                       }
-                       else
-                       {
-                               QFileDialog dialog(this, tr("Open Cue Sheet"));
-                               dialog.setFileMode(QFileDialog::ExistingFile);
-                               dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
-                               dialog.setDirectory(m_settings->mostRecentInputPath());
-                               if(dialog.exec())
-                               {
-                                       selectedCueFile = dialog.selectedFiles().first();
-                               }
-                       }
+       while(true)
+       {
+               int result = 0;
+               QString selectedCueFile;
 
-                       if(!selectedCueFile.isEmpty())
+               if(MUtils::GUI::themes_enabled())
+               {
+                       selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
+               }
+               else
+               {
+                       QFileDialog dialog(this, tr("Open Cue Sheet"));
+                       dialog.setFileMode(QFileDialog::ExistingFile);
+                       dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
+                       dialog.setDirectory(m_settings->mostRecentInputPath());
+                       if(dialog.exec())
                        {
-                               m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath());
-                               CueImportDialog *cueImporter  = new CueImportDialog(this, m_fileListModel, selectedCueFile, m_settings);
-                               result = cueImporter->exec();
-                               LAMEXP_DELETE(cueImporter);
+                               selectedCueFile = dialog.selectedFiles().first();
                        }
+               }
 
-                       if(result != (-1)) break;
+               if(!selectedCueFile.isEmpty())
+               {
+                       m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath());
+                       FileListBlockHelper fileListBlocker(m_fileListModel);
+                       QScopedPointer<CueImportDialog> cueImporter(new CueImportDialog(this, m_fileListModel, selectedCueFile, m_settings));
+                       result = cueImporter->exec();
                }
-       );
+
+               if(result != (-1))
+               {
+                       qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+                       ui->sourceFileView->update();
+                       qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+                       ui->sourceFileView->scrollToBottom();
+                       qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
+                       break;
+               }
+       }
 }
 
 /*
@@ -1989,9 +2240,10 @@ void MainWindow::showDropBoxWidgetActionTriggered(bool checked)
        if(!m_dropBox->isVisible())
        {
                m_dropBox->show();
+               QTimer::singleShot(2500, m_dropBox.data(), SLOT(showToolTip()));
        }
        
-       lamexp_blink_window(m_dropBox);
+       MUtils::GUI::blink_window(m_dropBox.data());
 }
 
 /*
@@ -2003,9 +2255,9 @@ void MainWindow::checkForBetaUpdatesActionTriggered(bool checked)
        
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Beta Updates"), NOBR(tr("Do you really want LameXP to check for Beta (pre-release) updates?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Beta Updates"), NOBREAK(tr("Do you really want LameXP to check for Beta (pre-release) updates?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       if(0 == QMessageBox::information(this, tr("Beta Updates"), NOBR(tr("LameXP will check for Beta (pre-release) updates from now on.")), tr("Check Now"), tr("Discard")))
+                       if(0 == QMessageBox::information(this, tr("Beta Updates"), NOBREAK(tr("LameXP will check for Beta (pre-release) updates from now on.")), tr("Check Now"), tr("Discard")))
                        {
                                checkUpdatesNow = true;
                        }
@@ -2018,15 +2270,16 @@ void MainWindow::checkForBetaUpdatesActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Beta Updates"), NOBR(tr("LameXP will <i>not</i> check for Beta (pre-release) updates from now on.")));
-                       m_settings->autoUpdateCheckBeta(false);
+               QMessageBox::information(this, tr("Beta Updates"), NOBREAK(tr("LameXP will <i>not</i> check for Beta (pre-release) updates from now on.")));
+               m_settings->autoUpdateCheckBeta(false);
        }
 
        ui->actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta());
 
        if(checkUpdatesNow)
        {
-               if(checkForUpdates())
+               bool haveNewVersion;
+               if(checkForUpdates(haveNewVersion))
                {
                        QApplication::quit();
                }
@@ -2040,9 +2293,9 @@ void MainWindow::hibernateComputerActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Hibernate Computer"), NOBR(tr("Do you really want the computer to be hibernated on shutdown?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Hibernate Computer"), NOBREAK(tr("Do you really want the computer to be hibernated on shutdown?")), tr("Yes"), tr("No"), QString(), 1))
                {
-                       QMessageBox::information(this, tr("Hibernate Computer"), NOBR(tr("LameXP will hibernate the computer on shutdown from now on.")));
+                       QMessageBox::information(this, tr("Hibernate Computer"), NOBREAK(tr("LameXP will hibernate the computer on shutdown from now on.")));
                        m_settings->hibernateComputer(true);
                }
                else
@@ -2052,7 +2305,7 @@ void MainWindow::hibernateComputerActionTriggered(bool checked)
        }
        else
        {
-                       QMessageBox::information(this, tr("Hibernate Computer"), NOBR(tr("LameXP will <i>not</i> hibernate the computer on shutdown from now on.")));
+                       QMessageBox::information(this, tr("Hibernate Computer"), NOBREAK(tr("LameXP will <i>not</i> hibernate the computer on shutdown from now on.")));
                        m_settings->hibernateComputer(false);
        }
 
@@ -2066,10 +2319,10 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked)
 {
        if(checked)
        {
-               if(0 == QMessageBox::question(this, tr("Shell Integration"), NOBR(tr("Do you really want to disable the LameXP shell integration?")), tr("Yes"), tr("No"), QString(), 1))
+               if(0 == QMessageBox::question(this, tr("Shell Integration"), NOBREAK(tr("Do you really want to disable the LameXP shell integration?")), tr("Yes"), tr("No"), QString(), 1))
                {
                        ShellIntegration::remove();
-                       QMessageBox::information(this, tr("Shell Integration"), NOBR(tr("The LameXP shell integration has been disabled.")));
+                       QMessageBox::information(this, tr("Shell Integration"), NOBREAK(tr("The LameXP shell integration has been disabled.")));
                        m_settings->shellIntegrationEnabled(false);
                }
                else
@@ -2080,13 +2333,13 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked)
        else
        {
                        ShellIntegration::install();
-                       QMessageBox::information(this, tr("Shell Integration"), NOBR(tr("The LameXP shell integration has been re-enabled.")));
+                       QMessageBox::information(this, tr("Shell Integration"), NOBREAK(tr("The LameXP shell integration has been re-enabled.")));
                        m_settings->shellIntegrationEnabled(true);
        }
 
        ui->actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled());
        
-       if(lamexp_portable_mode() && ui->actionDisableShellIntegration->isChecked())
+       if(lamexp_version_portable() && ui->actionDisableShellIntegration->isChecked())
        {
                ui->actionDisableShellIntegration->setEnabled(false);
        }
@@ -2117,28 +2370,7 @@ void MainWindow::documentActionActivated(void)
 {
        if(QAction *action = dynamic_cast<QAction*>(QObject::sender()))
        {
-               if(action->data().isValid() && (action->data().type() == QVariant::String))
-               {
-                       QFileInfo document(action->data().toString());
-                       QFileInfo resource(QString(":/doc/%1.html").arg(document.baseName()));
-                       if(document.exists() && document.isFile() && (document.size() == resource.size()))
-                       {
-                               QDesktopServices::openUrl(QUrl::fromLocalFile(document.canonicalFilePath()));
-                       }
-                       else
-                       {
-                               QFile source(resource.filePath());
-                               QFile output(QString("%1/%2.%3.html").arg(lamexp_temp_folder2(), document.baseName(), lamexp_rand_str().left(8)));
-                               if(source.open(QIODevice::ReadOnly) && output.open(QIODevice::ReadWrite))
-                               {
-                                       output.write(source.readAll());
-                                       action->setData(output.fileName());
-                                       source.close();
-                                       output.close();
-                                       QDesktopServices::openUrl(QUrl::fromLocalFile(output.fileName()));
-                               }
-                       }
-               }
+               openDocumentLink(action);
        }
 }
 
@@ -2148,14 +2380,10 @@ void MainWindow::documentActionActivated(void)
 void MainWindow::checkUpdatesActionActivated(void)
 {
        ABORT_IF_BUSY;
-       bool bFlag = false;
-
-       TEMP_HIDE_DROPBOX
-       (
-               bFlag = checkForUpdates();
-       );
+       WidgetHideHelper hiderHelper(m_dropBox.data());
        
-       if(bFlag)
+       bool haveNewVersion;
+       if(checkForUpdates(haveNewVersion))
        {
                QApplication::quit();
        }
@@ -2171,37 +2399,35 @@ void MainWindow::checkUpdatesActionActivated(void)
 void MainWindow::addFilesButtonClicked(void)
 {
        ABORT_IF_BUSY;
+       WidgetHideHelper hiderHelper(m_dropBox.data());
 
-       TEMP_HIDE_DROPBOX
-       (
-               if(lamexp_themes_enabled())
+       if(MUtils::GUI::themes_enabled() && (!MUTILS_DEBUG))
+       {
+               QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
+               QStringList selectedFiles = QFileDialog::getOpenFileNames(this, tr("Add file(s)"), m_settings->mostRecentInputPath(), fileTypeFilters.join(";;"));
+               if(!selectedFiles.isEmpty())
                {
-                       QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
-                       QStringList selectedFiles = QFileDialog::getOpenFileNames(this, tr("Add file(s)"), m_settings->mostRecentInputPath(), fileTypeFilters.join(";;"));
+                       m_settings->mostRecentInputPath(QFileInfo(selectedFiles.first()).canonicalPath());
+                       addFiles(selectedFiles);
+               }
+       }
+       else
+       {
+               QFileDialog dialog(this, tr("Add file(s)"));
+               QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
+               dialog.setFileMode(QFileDialog::ExistingFiles);
+               dialog.setNameFilter(fileTypeFilters.join(";;"));
+               dialog.setDirectory(m_settings->mostRecentInputPath());
+               if(dialog.exec())
+               {
+                       QStringList selectedFiles = dialog.selectedFiles();
                        if(!selectedFiles.isEmpty())
                        {
                                m_settings->mostRecentInputPath(QFileInfo(selectedFiles.first()).canonicalPath());
                                addFiles(selectedFiles);
                        }
                }
-               else
-               {
-                       QFileDialog dialog(this, tr("Add file(s)"));
-                       QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
-                       dialog.setFileMode(QFileDialog::ExistingFiles);
-                       dialog.setNameFilter(fileTypeFilters.join(";;"));
-                       dialog.setDirectory(m_settings->mostRecentInputPath());
-                       if(dialog.exec())
-                       {
-                               QStringList selectedFiles = dialog.selectedFiles();
-                               if(!selectedFiles.isEmpty())
-                               {
-                                       m_settings->mostRecentInputPath(QFileInfo(selectedFiles.first()).canonicalPath());
-                                       addFiles(selectedFiles);
-                               }
-                       }
-               }
-       );
+       }
 }
 
 /*
@@ -2214,29 +2440,49 @@ void MainWindow::openFolderActionActivated(void)
        
        if(QAction *action = dynamic_cast<QAction*>(QObject::sender()))
        {
-               TEMP_HIDE_DROPBOX
-               (
-                       if(lamexp_themes_enabled())
-                       {
-                               selectedFolder = QFileDialog::getExistingDirectory(this, tr("Add Folder"), m_settings->mostRecentInputPath());
-                       }
-                       else
-                       {
-                               QFileDialog dialog(this, tr("Add Folder"));
-                               dialog.setFileMode(QFileDialog::DirectoryOnly);
-                               dialog.setDirectory(m_settings->mostRecentInputPath());
-                               if(dialog.exec())
-                               {
-                                       selectedFolder = dialog.selectedFiles().first();
-                               }
-                       }
-                       
-                       if(!selectedFolder.isEmpty())
+               WidgetHideHelper hiderHelper(m_dropBox.data());
+               if(MUtils::GUI::themes_enabled())
+               {
+                       selectedFolder = QFileDialog::getExistingDirectory(this, tr("Add Folder"), m_settings->mostRecentInputPath());
+               }
+               else
+               {
+                       QFileDialog dialog(this, tr("Add Folder"));
+                       dialog.setFileMode(QFileDialog::DirectoryOnly);
+                       dialog.setDirectory(m_settings->mostRecentInputPath());
+                       if(dialog.exec())
                        {
-                               m_settings->mostRecentInputPath(QDir(selectedFolder).canonicalPath());
-                               addFolder(selectedFolder, action->data().toBool());
+                               selectedFolder = dialog.selectedFiles().first();
                        }
-               );
+               }
+
+               if(selectedFolder.isEmpty())
+               {
+                       return;
+               }
+
+               QStringList filterItems = DecoderRegistry::getSupportedExts();
+               filterItems.prepend("*.*");
+
+               bool okay;
+               QString filterStr = QInputDialog::getItem(this, tr("Filter Files"), tr("Select filename filter:"), filterItems, 0, false, &okay).trimmed();
+               if(!okay)
+               {
+                       return;
+               }
+
+               QRegExp regExp("\\*\\.([A-Za-z0-9]+)", Qt::CaseInsensitive);
+               if(regExp.lastIndexIn(filterStr) >= 0)
+               {
+                       filterStr = regExp.cap(1).trimmed();
+               }
+               else
+               {
+                       filterStr.clear();
+               }
+
+               m_settings->mostRecentInputPath(QDir(selectedFolder).canonicalPath());
+               addFolder(selectedFolder, action->data().toBool(), false, filterStr);
        }
 }
 
@@ -2245,11 +2491,33 @@ void MainWindow::openFolderActionActivated(void)
  */
 void MainWindow::removeFileButtonClicked(void)
 {
-       if(ui->sourceFileView->currentIndex().isValid())
+       const QItemSelectionModel *const selection = ui->sourceFileView->selectionModel();
+       if(selection && selection->hasSelection())
+       {
+               int firstRow = -1;
+               const QModelIndexList selectedRows = INVERT_LIST(selection->selectedRows());
+               if(!selectedRows.isEmpty())
+               {
+                       FileListBlockHelper fileListBlocker(m_fileListModel);
+                       firstRow = selectedRows.last().row();
+                       for(QModelIndexList::ConstIterator iter = selectedRows.constBegin(); iter != selectedRows.constEnd(); iter++)
+                       {
+                               if(!m_fileListModel->removeFile(*iter))
+                               {
+                                       break;
+                               }
+                       }
+               }
+               if(m_fileListModel->rowCount() > 0)
+               {
+                       const QModelIndex position = m_fileListModel->index(((firstRow >= 0) && (firstRow < m_fileListModel->rowCount())) ? firstRow : (m_fileListModel->rowCount() - 1), 0);
+                       ui->sourceFileView->selectRow(position.row());
+                       ui->sourceFileView->scrollTo(position, QAbstractItemView::PositionAtCenter);
+               }
+       }
+       else
        {
-               int iRow = ui->sourceFileView->currentIndex().row();
-               m_fileListModel->removeFile(ui->sourceFileView->currentIndex());
-               ui->sourceFileView->selectRow(iRow < m_fileListModel->rowCount() ? iRow : m_fileListModel->rowCount()-1);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
        }
 }
 
@@ -2258,7 +2526,14 @@ void MainWindow::removeFileButtonClicked(void)
  */
 void MainWindow::clearFilesButtonClicked(void)
 {
-       m_fileListModel->clearFiles();
+       if(m_fileListModel->rowCount() > 0)
+       {
+               m_fileListModel->clearFiles();
+       }
+       else
+       {
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
+       }
 }
 
 /*
@@ -2266,12 +2541,7 @@ void MainWindow::clearFilesButtonClicked(void)
  */
 void MainWindow::fileUpButtonClicked(void)
 {
-       if(ui->sourceFileView->currentIndex().isValid())
-       {
-               int iRow = ui->sourceFileView->currentIndex().row() - 1;
-               m_fileListModel->moveFile(ui->sourceFileView->currentIndex(), -1);
-               ui->sourceFileView->selectRow(iRow >= 0 ? iRow : 0);
-       }
+       moveSelectedFiles(true);
 }
 
 /*
@@ -2279,12 +2549,7 @@ void MainWindow::fileUpButtonClicked(void)
  */
 void MainWindow::fileDownButtonClicked(void)
 {
-       if(ui->sourceFileView->currentIndex().isValid())
-       {
-               int iRow = ui->sourceFileView->currentIndex().row() + 1;
-               m_fileListModel->moveFile(ui->sourceFileView->currentIndex(), 1);
-               ui->sourceFileView->selectRow(iRow < m_fileListModel->rowCount() ? iRow : m_fileListModel->rowCount()-1);
-       }
+       moveSelectedFiles(false);
 }
 
 /*
@@ -2295,39 +2560,47 @@ void MainWindow::showDetailsButtonClicked(void)
        ABORT_IF_BUSY;
 
        int iResult = 0;
-       MetaInfoDialog *metaInfoDialog = new MetaInfoDialog(this);
        QModelIndex index = ui->sourceFileView->currentIndex();
-
-       while(index.isValid())
+       
+       if(index.isValid())
        {
-               if(iResult > 0)
-               {
-                       index = m_fileListModel->index(index.row() + 1, index.column()); 
-                       ui->sourceFileView->selectRow(index.row());
-               }
-               if(iResult < 0)
+               ui->sourceFileView->selectRow(index.row());
+               QScopedPointer<MetaInfoDialog> metaInfoDialog(new MetaInfoDialog(this));
+               forever
                {
-                       index = m_fileListModel->index(index.row() - 1, index.column()); 
-                       ui->sourceFileView->selectRow(index.row());
-               }
-
-               AudioFileModel &file = (*m_fileListModel)[index];
-               TEMP_HIDE_DROPBOX
-               (
+                       AudioFileModel &file = (*m_fileListModel)[index];
+                       WidgetHideHelper hiderHelper(m_dropBox.data());
                        iResult = metaInfoDialog->exec(file, index.row() > 0, index.row() < m_fileListModel->rowCount() - 1);
-               );
                
-               if(iResult == INT_MAX)
-               {
-                       m_metaInfoModel->assignInfoFrom(file);
-                       ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabMetaData));
-                       break;
-               }
+                       //Copy all info to Meta Info tab
+                       if(iResult == INT_MAX)
+                       {
+                               m_metaInfoModel->assignInfoFrom(file);
+                               ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabMetaData));
+                               break;
+                       }
 
-               if(!iResult) break;
+                       if(iResult > 0)
+                       {
+                               index = m_fileListModel->index(index.row() + 1, index.column()); 
+                               ui->sourceFileView->selectRow(index.row());
+                               continue;
+                       }
+                       else if(iResult < 0)
+                       {
+                               index = m_fileListModel->index(index.row() - 1, index.column()); 
+                               ui->sourceFileView->selectRow(index.row());
+                               continue;
+                       }               
+
+                       break; /*close dilalog now*/
+               }
+       }
+       else
+       {
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
        }
 
-       LAMEXP_DELETE(metaInfoDialog);
        QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
        sourceFilesScrollbarMoved(0);
 }
@@ -2344,119 +2617,113 @@ void MainWindow::sourceFilesContextMenu(const QPoint &pos)
        {
                if(pos.x() <= sender->width() && pos.y() <= sender->height() && pos.x() >= 0 && pos.y() >= 0)
                {
-                       m_sourceFilesContextMenu->popup(sender->mapToGlobal(pos));
+                       m_sourceFilesContextMenu->popup(sender->mapToGlobal(pos));
+               }
+       }
+}
+
+/*
+ * Scrollbar of source files moved
+ */
+void MainWindow::sourceFilesScrollbarMoved(int)
+{
+       ui->sourceFileView->resizeColumnToContents(0);
+}
+
+/*
+ * Open selected file in external player
+ */
+void MainWindow::previewContextActionTriggered(void)
+{
+       QModelIndex index = ui->sourceFileView->currentIndex();
+       if(!index.isValid())
+       {
+               return;
+       }
+
+       if(!MUtils::OS::open_media_file(m_fileListModel->getFile(index).filePath()))
+       {
+               qDebug("Player not found, falling back to default application...");
+               QDesktopServices::openUrl(QString("file:///").append(m_fileListModel->getFile(index).filePath()));
+       }
+}
+
+/*
+ * Find selected file in explorer
+ */
+void MainWindow::findFileContextActionTriggered(void)
+{
+       QModelIndex index = ui->sourceFileView->currentIndex();
+       if(index.isValid())
+       {
+               const QString systemToolsPath = MUtils::OS::known_folder(MUtils::OS::FOLDER_SYSROOT);
+               if(!systemToolsPath.isEmpty())
+               {
+                       QFileInfo explorer(QString("%1/explorer.exe").arg(systemToolsPath));
+                       if(explorer.exists() && explorer.isFile())
+                       {
+                               QProcess::execute(explorer.canonicalFilePath(), QStringList() << "/select," << QDir::toNativeSeparators(m_fileListModel->getFile(index).filePath()));
+                               return;
+                       }
+               }
+               else
+               {
+                       qWarning("System tools directory could not be detected!");
                }
        }
 }
 
 /*
- * Scrollbar of source files moved
+ * Add all dropped files
  */
-void MainWindow::sourceFilesScrollbarMoved(int)
+void MainWindow::handleDroppedFiles(void)
 {
-       ui->sourceFileView->resizeColumnToContents(0);
-}
+       ABORT_IF_BUSY;
 
-/*
- * Open selected file in external player
- */
-void MainWindow::previewContextActionTriggered(void)
-{
-       const static wchar_t *registryPrefix[2] = { L"SOFTWARE\\", L"SOFTWARE\\Wow6432Node\\" };
-       const static wchar_t *registryKeys[3] = 
-       {
-               L"Microsoft\\Windows\\CurrentVersion\\Uninstall\\{97D341C8-B0D1-4E4A-A49A-C30B52F168E9}",
-               L"Microsoft\\Windows\\CurrentVersion\\Uninstall\\{DB9E4EAB-2717-499F-8D56-4CC8A644AB60}",
-               L"foobar2000"
-       };
-       const static wchar_t *appNames[4] = { L"smplayer_portable.exe", L"smplayer.exe", L"MPUI.exe", L"foobar2000.exe" };
-       const static wchar_t *valueNames[2] = { L"InstallLocation", L"InstallDir" };
+       static const int MIN_COUNT = 16;
+       const QString bannerText = tr("Loading dropped files or folders, please wait...");
+       bool bUseBanner = false;
 
-       QModelIndex index = ui->sourceFileView->currentIndex();
-       if(!index.isValid())
-       {
-               return;
-       }
+       showBanner(bannerText, bUseBanner, (m_droppedFileList->count() >= MIN_COUNT));
 
-       for(size_t i = 0; i < 3; i++)
+       QStringList droppedFiles;
+       while(!m_droppedFileList->isEmpty())
        {
-               for(size_t j = 0; j < 2; j++)
-               {
-                       QString mplayerPath;
-                       HKEY registryKeyHandle = NULL;
+               QFileInfo file(m_droppedFileList->takeFirst().toLocalFile());
+               QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
 
-                       const QString currentKey = WCHAR2QSTR(registryPrefix[j]).append(WCHAR2QSTR(registryKeys[i]));
-                       if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, QWCHAR(currentKey), 0, KEY_READ, &registryKeyHandle) == ERROR_SUCCESS)
+               if(file.exists())
+               {
+                       if(file.isFile())
                        {
-                               for(size_t k = 0; k < 2; k++)
-                               {
-                                       wchar_t Buffer[4096];
-                                       DWORD BuffSize = sizeof(wchar_t*) * 4096;
-                                       DWORD DataType = REG_NONE;
-                                       if(RegQueryValueExW(registryKeyHandle, valueNames[k], 0, &DataType, reinterpret_cast<BYTE*>(Buffer), &BuffSize) == ERROR_SUCCESS)
-                                       {
-                                               if((DataType == REG_SZ) || (DataType == REG_EXPAND_SZ) || (DataType == REG_LINK))
-                                               {
-                                                       mplayerPath = WCHAR2QSTR(Buffer);
-                                                       break;
-                                               }
-                                       }
-                               }
-                               RegCloseKey(registryKeyHandle);
+                               qDebug("Dropped File: %s", MUTILS_UTF8(file.canonicalFilePath()));
+                               droppedFiles << file.canonicalFilePath();
+                               continue;
                        }
-
-                       if(!mplayerPath.isEmpty())
+                       else if(file.isDir())
                        {
-                               QDir mplayerDir(mplayerPath);
-                               if(mplayerDir.exists())
+                               qDebug("Dropped Folder: %s", MUTILS_UTF8(file.canonicalFilePath()));
+                               QFileInfoList list = QDir(file.canonicalFilePath()).entryInfoList(QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks);
+                               if(list.count() > 0)
                                {
-                                       for(size_t k = 0; k < 4; k++)
+                                       showBanner(bannerText, bUseBanner, (list.count() >= MIN_COUNT));
+                                       for(QFileInfoList::ConstIterator iter = list.constBegin(); iter != list.constEnd(); iter++)
                                        {
-                                               if(mplayerDir.exists(WCHAR2QSTR(appNames[k])))
-                                               {
-                                                       qDebug("Player found at:\n%s\n", mplayerDir.absoluteFilePath(WCHAR2QSTR(appNames[k])).toUtf8().constData());
-                                                       QProcess::startDetached(mplayerDir.absoluteFilePath(WCHAR2QSTR(appNames[k])), QStringList() << QDir::toNativeSeparators(m_fileListModel->getFile(index).filePath()));
-                                                       return;
-                                               }
+                                               droppedFiles << (*iter).canonicalFilePath();
                                        }
                                }
                        }
                }
        }
        
-       qDebug("Player not found, falling back to default application...");
-       QDesktopServices::openUrl(QString("file:///").append(m_fileListModel->getFile(index).filePath()));
-}
-
-/*
- * Find selected file in explorer
- */
-void MainWindow::findFileContextActionTriggered(void)
-{
-       QModelIndex index = ui->sourceFileView->currentIndex();
-       if(index.isValid())
+       if(bUseBanner)
        {
-               QString systemRootPath;
-
-               QDir systemRoot(lamexp_known_folder(lamexp_folder_systemfolder));
-               if(systemRoot.exists() && systemRoot.cdUp())
-               {
-                       systemRootPath = systemRoot.canonicalPath();
-               }
+               m_banner->close();
+       }
 
-               if(!systemRootPath.isEmpty())
-               {
-                       QFileInfo explorer(QString("%1/explorer.exe").arg(systemRootPath));
-                       if(explorer.exists() && explorer.isFile())
-                       {
-                               QProcess::execute(explorer.canonicalFilePath(), QStringList() << "/select," << QDir::toNativeSeparators(m_fileListModel->getFile(index).filePath()));
-                               return;
-                       }
-               }
-               else
-               {
-                       qWarning("SystemRoot directory could not be detected!");
-               }
+       if(!droppedFiles.isEmpty())
+       {
+               addFiles(droppedFiles);
        }
 }
 
@@ -2472,15 +2739,20 @@ void MainWindow::handleDelayedFiles(void)
                return;
        }
 
-       if(m_banner->isVisible())
+       if(BANNER_VISIBLE)
        {
                m_delayedFileTimer->start(5000);
                return;
        }
-
+       
+       if(ui->tabWidget->currentIndex() != 0)
+       {
+               SignalBlockHelper signalBlockHelper(ui->tabWidget);
+               ui->tabWidget->setCurrentIndex(0);
+               tabPageChanged(ui->tabWidget->currentIndex(), true);
+       }
+       
        QStringList selectedFiles;
-       ui->tabWidget->setCurrentIndex(0);
-
        while(!m_delayedFileList->isEmpty())
        {
                QFileInfo currentFile = QFileInfo(m_delayedFileList->takeFirst());
@@ -2499,49 +2771,48 @@ void MainWindow::handleDelayedFiles(void)
  */
 void MainWindow::exportCsvContextActionTriggered(void)
 {
-       TEMP_HIDE_DROPBOX
-       (
-               QString selectedCsvFile;
-       
-               if(lamexp_themes_enabled())
-               {
-                       selectedCsvFile = QFileDialog::getSaveFileName(this, tr("Save CSV file"), m_settings->mostRecentInputPath(), QString("%1 (*.csv)").arg(tr("CSV File")));
-               }
-               else
+       ABORT_IF_BUSY;
+       WidgetHideHelper hiderHelper(m_dropBox.data());
+
+       QString selectedCsvFile;
+       if(MUtils::GUI::themes_enabled())
+       {
+               selectedCsvFile = QFileDialog::getSaveFileName(this, tr("Save CSV file"), m_settings->mostRecentInputPath(), QString("%1 (*.csv)").arg(tr("CSV File")));
+       }
+       else
+       {
+               QFileDialog dialog(this, tr("Save CSV file"));
+               dialog.setFileMode(QFileDialog::AnyFile);
+               dialog.setAcceptMode(QFileDialog::AcceptSave);
+               dialog.setNameFilter(QString("%1 (*.csv)").arg(tr("CSV File")));
+               dialog.setDirectory(m_settings->mostRecentInputPath());
+               if(dialog.exec())
                {
-                       QFileDialog dialog(this, tr("Save CSV file"));
-                       dialog.setFileMode(QFileDialog::AnyFile);
-                       dialog.setAcceptMode(QFileDialog::AcceptSave);
-                       dialog.setNameFilter(QString("%1 (*.csv)").arg(tr("CSV File")));
-                       dialog.setDirectory(m_settings->mostRecentInputPath());
-                       if(dialog.exec())
-                       {
-                               selectedCsvFile = dialog.selectedFiles().first();
-                       }
+                       selectedCsvFile = dialog.selectedFiles().first();
                }
+       }
 
-               if(!selectedCsvFile.isEmpty())
+       if(!selectedCsvFile.isEmpty())
+       {
+               m_settings->mostRecentInputPath(QFileInfo(selectedCsvFile).canonicalPath());
+               switch(m_fileListModel->exportToCsv(selectedCsvFile))
                {
-                       m_settings->mostRecentInputPath(QFileInfo(selectedCsvFile).canonicalPath());
-                       switch(m_fileListModel->exportToCsv(selectedCsvFile))
-                       {
-                       case FileListModel::CsvError_NoTags:
-                               QMessageBox::critical(this, tr("CSV Export"), NOBR(tr("Sorry, there are no meta tags that can be exported!")));
-                               break;
-                       case FileListModel::CsvError_FileOpen:
-                               QMessageBox::critical(this, tr("CSV Export"), NOBR(tr("Sorry, failed to open CSV file for writing!")));
-                               break;
-                       case FileListModel::CsvError_FileWrite:
-                               QMessageBox::critical(this, tr("CSV Export"), NOBR(tr("Sorry, failed to write to the CSV file!")));
-                               break;
-                       case FileListModel::CsvError_OK:
-                               QMessageBox::information(this, tr("CSV Export"), NOBR(tr("The CSV files was created successfully!")));
-                               break;
-                       default:
-                               qWarning("exportToCsv: Unknown return code!");
-                       }
+               case FileListModel::CsvError_NoTags:
+                       QMessageBox::critical(this, tr("CSV Export"), NOBREAK(tr("Sorry, there are no meta tags that can be exported!")));
+                       break;
+               case FileListModel::CsvError_FileOpen:
+                       QMessageBox::critical(this, tr("CSV Export"), NOBREAK(tr("Sorry, failed to open CSV file for writing!")));
+                       break;
+               case FileListModel::CsvError_FileWrite:
+                       QMessageBox::critical(this, tr("CSV Export"), NOBREAK(tr("Sorry, failed to write to the CSV file!")));
+                       break;
+               case FileListModel::CsvError_OK:
+                       QMessageBox::information(this, tr("CSV Export"), NOBREAK(tr("The CSV files was created successfully!")));
+                       break;
+               default:
+                       qWarning("exportToCsv: Unknown return code!");
                }
-       );
+       }
 }
 
 
@@ -2550,54 +2821,53 @@ void MainWindow::exportCsvContextActionTriggered(void)
  */
 void MainWindow::importCsvContextActionTriggered(void)
 {
-       TEMP_HIDE_DROPBOX
-       (
-               QString selectedCsvFile;
-       
-               if(lamexp_themes_enabled())
-               {
-                       selectedCsvFile = QFileDialog::getOpenFileName(this, tr("Open CSV file"), m_settings->mostRecentInputPath(), QString("%1 (*.csv)").arg(tr("CSV File")));
-               }
-               else
+       ABORT_IF_BUSY;
+       WidgetHideHelper hiderHelper(m_dropBox.data());
+
+       QString selectedCsvFile;
+       if(MUtils::GUI::themes_enabled())
+       {
+               selectedCsvFile = QFileDialog::getOpenFileName(this, tr("Open CSV file"), m_settings->mostRecentInputPath(), QString("%1 (*.csv)").arg(tr("CSV File")));
+       }
+       else
+       {
+               QFileDialog dialog(this, tr("Open CSV file"));
+               dialog.setFileMode(QFileDialog::ExistingFile);
+               dialog.setNameFilter(QString("%1 (*.csv)").arg(tr("CSV File")));
+               dialog.setDirectory(m_settings->mostRecentInputPath());
+               if(dialog.exec())
                {
-                       QFileDialog dialog(this, tr("Open CSV file"));
-                       dialog.setFileMode(QFileDialog::ExistingFile);
-                       dialog.setNameFilter(QString("%1 (*.csv)").arg(tr("CSV File")));
-                       dialog.setDirectory(m_settings->mostRecentInputPath());
-                       if(dialog.exec())
-                       {
-                               selectedCsvFile = dialog.selectedFiles().first();
-                       }
+                       selectedCsvFile = dialog.selectedFiles().first();
                }
+       }
 
-               if(!selectedCsvFile.isEmpty())
+       if(!selectedCsvFile.isEmpty())
+       {
+               m_settings->mostRecentInputPath(QFileInfo(selectedCsvFile).canonicalPath());
+               switch(m_fileListModel->importFromCsv(this, selectedCsvFile))
                {
-                       m_settings->mostRecentInputPath(QFileInfo(selectedCsvFile).canonicalPath());
-                       switch(m_fileListModel->importFromCsv(this, selectedCsvFile))
-                       {
-                       case FileListModel::CsvError_FileOpen:
-                               QMessageBox::critical(this, tr("CSV Import"), NOBR(tr("Sorry, failed to open CSV file for reading!")));
-                               break;
-                       case FileListModel::CsvError_FileRead:
-                               QMessageBox::critical(this, tr("CSV Import"), NOBR(tr("Sorry, failed to read from the CSV file!")));
-                               break;
-                       case FileListModel::CsvError_NoTags:
-                               QMessageBox::critical(this, tr("CSV Import"), NOBR(tr("Sorry, the CSV file does not contain any known fields!")));
-                               break;
-                       case FileListModel::CsvError_Incomplete:
-                               QMessageBox::warning(this, tr("CSV Import"), NOBR(tr("CSV file is incomplete. Not all files were updated!")));
-                               break;
-                       case FileListModel::CsvError_OK:
-                               QMessageBox::information(this, tr("CSV Import"), NOBR(tr("The CSV files was imported successfully!")));
-                               break;
-                       case FileListModel::CsvError_Aborted:
-                               /* User aborted, ignore! */
-                               break;
-                       default:
-                               qWarning("exportToCsv: Unknown return code!");
-                       }
+               case FileListModel::CsvError_FileOpen:
+                       QMessageBox::critical(this, tr("CSV Import"), NOBREAK(tr("Sorry, failed to open CSV file for reading!")));
+                       break;
+               case FileListModel::CsvError_FileRead:
+                       QMessageBox::critical(this, tr("CSV Import"), NOBREAK(tr("Sorry, failed to read from the CSV file!")));
+                       break;
+               case FileListModel::CsvError_NoTags:
+                       QMessageBox::critical(this, tr("CSV Import"), NOBREAK(tr("Sorry, the CSV file does not contain any known fields!")));
+                       break;
+               case FileListModel::CsvError_Incomplete:
+                       QMessageBox::warning(this, tr("CSV Import"), NOBREAK(tr("CSV file is incomplete. Not all files were updated!")));
+                       break;
+               case FileListModel::CsvError_OK:
+                       QMessageBox::information(this, tr("CSV Import"), NOBREAK(tr("The CSV files was imported successfully!")));
+                       break;
+               case FileListModel::CsvError_Aborted:
+                       /* User aborted, ignore! */
+                       break;
+               default:
+                       qWarning("exportToCsv: Unknown return code!");
                }
-       );
+       }
 }
 
 /*
@@ -2659,13 +2929,13 @@ void MainWindow::gotoDesktopButtonClicked(void)
                return;
        }
        
-       QString desktopPath = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
+       const QString desktopPath = MUtils::OS::known_folder(MUtils::OS::FOLDER_DESKTOP_USER);
        
        if(!desktopPath.isEmpty() && QDir(desktopPath).exists())
        {
                ui->outputFolderView->setCurrentIndex(m_fileSystemModel->index(desktopPath));
                outputFolderViewClicked(ui->outputFolderView->currentIndex());
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
        else
        {
@@ -2684,13 +2954,13 @@ void MainWindow::gotoHomeFolderButtonClicked(void)
                return;
        }
 
-       QString homePath = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);
-       
+       const QString homePath = MUtils::OS::known_folder(MUtils::OS::FOLDER_PROFILE_USER);
+
        if(!homePath.isEmpty() && QDir(homePath).exists())
        {
                ui->outputFolderView->setCurrentIndex(m_fileSystemModel->index(homePath));
                outputFolderViewClicked(ui->outputFolderView->currentIndex());
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
        else
        {
@@ -2709,13 +2979,13 @@ void MainWindow::gotoMusicFolderButtonClicked(void)
                return;
        }
 
-       QString musicPath = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
+       const QString musicPath = MUtils::OS::known_folder(MUtils::OS::FOLDER_MUSIC_USER);
        
        if(!musicPath.isEmpty() && QDir(musicPath).exists())
        {
                ui->outputFolderView->setCurrentIndex(m_fileSystemModel->index(musicPath));
                outputFolderViewClicked(ui->outputFolderView->currentIndex());
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
        else
        {
@@ -2743,11 +3013,11 @@ void MainWindow::gotoFavoriteFolder(void)
                {
                        ui->outputFolderView->setCurrentIndex(m_fileSystemModel->index(path.canonicalPath()));
                        outputFolderViewClicked(ui->outputFolderView->currentIndex());
-                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
                }
                else
                {
-                       MessageBeep(MB_ICONERROR);
+                       MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
                        m_outputFolderFavoritesMenu->removeAction(item);
                        item->deleteLater();
                }
@@ -2761,7 +3031,7 @@ void MainWindow::makeFolderButtonClicked(void)
 {
        ABORT_IF_BUSY;
 
-       if(!m_fileSystemModel)
+       if(m_fileSystemModel.isNull())
        {
                qWarning("File system model not initialized yet!");
                return;
@@ -2770,43 +3040,45 @@ void MainWindow::makeFolderButtonClicked(void)
        QDir basePath(m_fileSystemModel->fileInfo(ui->outputFolderView->currentIndex()).absoluteFilePath());
        QString suggestedName = tr("New Folder");
 
-       if(!m_metaData->fileArtist().isEmpty() && !m_metaData->fileAlbum().isEmpty())
+       if(!m_metaData->artist().isEmpty() && !m_metaData->album().isEmpty())
        {
-               suggestedName = QString("%1 - %2").arg(m_metaData->fileArtist(), m_metaData->fileAlbum());
+               suggestedName = QString("%1 - %2").arg(m_metaData->artist(),m_metaData->album());
        }
-       else if(!m_metaData->fileArtist().isEmpty())
+       else if(!m_metaData->artist().isEmpty())
        {
-               suggestedName = m_metaData->fileArtist();
+               suggestedName = m_metaData->artist();
        }
-       else if(!m_metaData->fileAlbum().isEmpty())
+       else if(!m_metaData->album().isEmpty())
        {
-               suggestedName = m_metaData->fileAlbum();
+               suggestedName = m_metaData->album();
        }
        else
        {
                for(int i = 0; i < m_fileListModel->rowCount(); i++)
                {
-                       AudioFileModel audioFile = m_fileListModel->getFile(m_fileListModel->index(i, 0));
-                       if(!audioFile.fileAlbum().isEmpty() || !audioFile.fileArtist().isEmpty())
+                       const AudioFileModel &audioFile = m_fileListModel->getFile(m_fileListModel->index(i, 0));
+                       const AudioFileModel_MetaInfo &fileMetaInfo = audioFile.metaInfo();
+
+                       if(!fileMetaInfo.album().isEmpty() || !fileMetaInfo.artist().isEmpty())
                        {
-                               if(!audioFile.fileArtist().isEmpty() && !audioFile.fileAlbum().isEmpty())
+                               if(!fileMetaInfo.artist().isEmpty() && !fileMetaInfo.album().isEmpty())
                                {
-                                       suggestedName = QString("%1 - %2").arg(audioFile.fileArtist(), audioFile.fileAlbum());
+                                       suggestedName = QString("%1 - %2").arg(fileMetaInfo.artist(), fileMetaInfo.album());
                                }
-                               else if(!audioFile.fileArtist().isEmpty())
+                               else if(!fileMetaInfo.artist().isEmpty())
                                {
-                                       suggestedName = audioFile.fileArtist();
+                                       suggestedName = fileMetaInfo.artist();
                                }
-                               else if(!audioFile.fileAlbum().isEmpty())
+                               else if(!fileMetaInfo.album().isEmpty())
                                {
-                                       suggestedName = audioFile.fileAlbum();
+                                       suggestedName = fileMetaInfo.album();
                                }
                                break;
                        }
                }
        }
        
-       suggestedName = lamexp_clean_filename(suggestedName);
+       suggestedName = MUtils::clean_file_name(suggestedName, true);
 
        while(true)
        {
@@ -2815,11 +3087,11 @@ void MainWindow::makeFolderButtonClicked(void)
 
                if(bApplied)
                {
-                       folderName = lamexp_clean_filepath(folderName.simplified());
+                       folderName = MUtils::clean_file_path(folderName.simplified(), true);
 
                        if(folderName.isEmpty())
                        {
-                               MessageBeep(MB_ICONERROR);
+                               MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
                                continue;
                        }
 
@@ -2839,12 +3111,12 @@ void MainWindow::makeFolderButtonClicked(void)
                                        QModelIndex newIndex = m_fileSystemModel->index(createdDir.canonicalPath());
                                        ui->outputFolderView->setCurrentIndex(newIndex);
                                        outputFolderViewClicked(newIndex);
-                                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+                                       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
                                }
                        }
                        else
                        {
-                               QMessageBox::warning(this, tr("Failed to create folder"), QString("%1<br><nobr>%2</nobr><br><br>%3").arg(tr("The new folder could not be created:"), basePath.absoluteFilePath(newFolder), tr("Drive is read-only or insufficient access rights!")));
+                               QMessageBox::warning(this, tr("Failed to create folder"), NOBREAK(QString("%1<br>%2<br><br>%3").arg(tr("The new folder could not be created:"), basePath.absoluteFilePath(newFolder), tr("Drive is read-only or insufficient access rights!"))));
                        }
                }
                break;
@@ -2894,7 +3166,7 @@ void MainWindow::showFolderContextActionTriggered(void)
 
        QString path = QDir::toNativeSeparators(m_fileSystemModel->filePath(ui->outputFolderView->currentIndex()));
        if(!path.endsWith(QDir::separator())) path.append(QDir::separator());
-       ShellExecuteW(reinterpret_cast<HWND>(this->winId()), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW);
+       MUtils::OS::shell_open(this, path, true);
 }
 
 /*
@@ -2923,9 +3195,9 @@ void MainWindow::goUpFolderContextActionTriggered(void)
                }
                else
                {
-                       MessageBeep(MB_ICONWARNING);
+                       MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
                }
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
 }
 
@@ -2944,7 +3216,7 @@ void MainWindow::addFavoriteFolderActionTriggered(void)
        }
        else
        {
-               MessageBeep(MB_ICONWARNING);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
        }
 
        m_settings->favoriteOutputFolders(favorites.join("|"));
@@ -3010,8 +3282,8 @@ void MainWindow::outputFolderEditFinished(void)
        ui->outputFolderLabel->setVisible(true);
        ui->outputFolderView->setEnabled(true);
 
-       if(!ok) MessageBeep(MB_ICONERROR);
-       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+       if(!ok) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
+       CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
 }
 
 /*
@@ -3028,17 +3300,17 @@ void MainWindow::initOutputFolderModel(void)
                if(m_fileSystemModel)
                {
                        SET_MODEL(ui->outputFolderView, NULL);
-                       LAMEXP_DELETE(m_fileSystemModel);
                        ui->outputFolderView->repaint();
                }
 
-               if(m_fileSystemModel = new QFileSystemModelEx())
+               m_fileSystemModel.reset(new QFileSystemModelEx());
+               if(!m_fileSystemModel.isNull())
                {
                        m_fileSystemModel->installEventFilter(this);
-                       connect(m_fileSystemModel, SIGNAL(directoryLoaded(QString)), this, SLOT(outputFolderDirectoryLoaded(QString)));
-                       connect(m_fileSystemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(outputFolderRowsInserted(QModelIndex,int,int)));
+                       connect(m_fileSystemModel.data(), SIGNAL(directoryLoaded(QString)),          this, SLOT(outputFolderDirectoryLoaded(QString)));
+                       connect(m_fileSystemModel.data(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(outputFolderRowsInserted(QModelIndex,int,int)));
 
-                       SET_MODEL(ui->outputFolderView, m_fileSystemModel);
+                       SET_MODEL(ui->outputFolderView, m_fileSystemModel.data());
                        ui->outputFolderView->header()->setStretchLastSection(true);
                        ui->outputFolderView->header()->hideSection(1);
                        ui->outputFolderView->header()->hideSection(2);
@@ -3050,7 +3322,7 @@ void MainWindow::initOutputFolderModel(void)
                        outputFolderViewClicked(ui->outputFolderView->currentIndex());
                }
 
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
                QTimer::singleShot(125, this, SLOT(initOutputFolderModel_doAsync()));
        }
 }
@@ -3067,7 +3339,7 @@ void MainWindow::initOutputFolderModel_doAsync(void)
        }
        else
        {
-               QTimer::singleShot(125, m_outputFolderNoteBox, SLOT(hide()));
+               QTimer::singleShot(125, m_outputFolderNoteBox.data(), SLOT(hide()));
                ui->outputFolderView->setFocus();
        }
 }
@@ -3105,7 +3377,7 @@ void MainWindow::outputFolderDirectoryLoaded(const QString &path)
 {
        if(m_outputFolderViewCentering)
        {
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
 }
 
@@ -3116,7 +3388,7 @@ void MainWindow::outputFolderRowsInserted(const QModelIndex &parent, int start,
 {
        if(m_outputFolderViewCentering)
        {
-               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED;
+               CENTER_CURRENT_OUTPUT_FOLDER_DELAYED();
        }
 }
 
@@ -3165,7 +3437,7 @@ void MainWindow::outputFolderMouseEventOccurred(QWidget *sender, QEvent *event)
                        {
                                QString path = ui->outputFolderLabel->text();
                                if(!path.endsWith(QDir::separator())) path.append(QDir::separator());
-                               ShellExecuteW(reinterpret_cast<HWND>(this->winId()), L"explore", QWCHAR(path), NULL, NULL, SW_SHOW);
+                               MUtils::OS::shell_open(this, path, true);
                        }
                        break;
                case QEvent::Enter:
@@ -3226,7 +3498,7 @@ void MainWindow::outputFolderMouseEventOccurred(QWidget *sender, QEvent *event)
                                }
                                else
                                {
-                                       throw "Oups, this is not supposed to happen!";
+                                       MUTILS_THROW("Oups, this is not supposed to happen!");
                                }
                        }
                }
@@ -3252,7 +3524,7 @@ void MainWindow::editMetaButtonClicked(void)
        
                if(index.row() == 4)
                {
-                       m_settings->metaInfoPosition(m_metaData->filePosition());
+                       m_settings->metaInfoPosition(m_metaData->position());
                }
        }
 }
@@ -3305,7 +3577,7 @@ void MainWindow::updateEncoder(int id)
        if(ui->radioButtonModeQuality->isEnabled())             ui->radioButtonModeQuality->setChecked(true);
        else if(ui->radioButtonModeAverageBitrate->isEnabled()) ui->radioButtonModeAverageBitrate->setChecked(true);
        else if(ui->radioButtonConstBitrate->isEnabled())       ui->radioButtonConstBitrate->setChecked(true);
-       else throw "It appears that the encoder does not support *any* RC mode!";
+       else MUTILS_THROW("It appears that the encoder does not support *any* RC mode!");
 
        //Apply current RC mode
        const int currentRCMode = EncoderRegistry::loadEncoderMode(m_settings, id);
@@ -3314,7 +3586,7 @@ void MainWindow::updateEncoder(int id)
                case SettingsModel::VBRMode: if(ui->radioButtonModeQuality->isEnabled())        ui->radioButtonModeQuality->setChecked(true);        break;
                case SettingsModel::ABRMode: if(ui->radioButtonModeAverageBitrate->isEnabled()) ui->radioButtonModeAverageBitrate->setChecked(true); break;
                case SettingsModel::CBRMode: if(ui->radioButtonConstBitrate->isEnabled())       ui->radioButtonConstBitrate->setChecked(true);       break;
-               default: throw "updateEncoder(): Unknown rc-mode encountered!";
+               default: MUTILS_THROW("updateEncoder(): Unknown rc-mode encountered!");
        }
 
        //Display encoder description
@@ -3358,15 +3630,17 @@ void MainWindow::updateRCMode(int id)
        //Update slider min/max values
        if(valueCount > 0)
        {
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setEnabled, true);
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setMinimum, 0);
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setMaximum, valueCount-1);
+               SignalBlockHelper signalBlockHelper(ui->sliderBitrate);
+               ui->sliderBitrate->setEnabled(true);
+               ui->sliderBitrate->setMinimum(0);
+               ui->sliderBitrate->setMaximum(valueCount-1);
        }
        else
        {
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setEnabled, false);
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setMinimum, 0);
-               WITH_BLOCKED_SIGNALS(ui->sliderBitrate, setMaximum, 2);
+               SignalBlockHelper signalBlockHelper(ui->sliderBitrate);
+               ui->sliderBitrate->setEnabled(false);
+               ui->sliderBitrate->setMinimum(0);
+               ui->sliderBitrate->setMaximum(2);
        }
 
        //Now update bitrate/quality value!
@@ -3422,9 +3696,12 @@ void MainWindow::updateBitrate(int value)
        case AbstractEncoderInfo::TYPE_APPROX_BITRATE:
                ui->labelBitrate->setText(QString("&asymp; %1 kbps").arg(QString::number(displayValue)));
                break;
-       case AbstractEncoderInfo::TYPE_QUALITY_LEVEL:
+       case AbstractEncoderInfo::TYPE_QUALITY_LEVEL_INT:
                ui->labelBitrate->setText(tr("Quality Level %1").arg(QString::number(displayValue)));
                break;
+       case AbstractEncoderInfo::TYPE_QUALITY_LEVEL_FLT:
+               ui->labelBitrate->setText(tr("Quality Level %1").arg(QString().sprintf("%.2f", double(displayValue)/100.0)));
+               break;
        case AbstractEncoderInfo::TYPE_COMPRESSION_LEVEL:
                ui->labelBitrate->setText(tr("Compression %1").arg(QString::number(displayValue)));
                break;
@@ -3432,7 +3709,7 @@ void MainWindow::updateBitrate(int value)
                ui->labelBitrate->setText(tr("Uncompressed"));
                break;
        default:
-               throw "Unknown display value type encountered!";
+               MUTILS_THROW("Unknown display value type encountered!");
                break;
        }
 }
@@ -3450,11 +3727,7 @@ void MainWindow::compressionTabEventOccurred(QWidget *sender, QEvent *event)
        }
        else if((sender == ui->labelResetEncoders) && (event->type() == QEvent::MouseButtonPress))
        {
-               if(m_settings->soundsEnabled())
-               {
-                       PlaySound(MAKEINTRESOURCE(IDR_WAVE_BLAST), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
-               }
-
+               PLAY_SOUND_OPTIONAL("blast", true);
                EncoderRegistry::resetAllEncoders(m_settings);
                m_settings->compressionEncoder(SettingsModel::MP3Encoder);
                ui->radioButtonEncoderMP3->setChecked(true);
@@ -3624,6 +3897,16 @@ void MainWindow::opusSettingsChanged(void)
 void MainWindow::normalizationEnabledChanged(bool checked)
 {
        m_settings->normalizationFilterEnabled(checked);
+       normalizationDynamicChanged(ui->checkBoxNormalizationFilterDynamic->isChecked());
+}
+
+/*
+ * Dynamic normalization enabled changed
+ */
+void MainWindow::normalizationDynamicChanged(bool checked)
+{
+       ui->spinBoxNormalizationFilterSize->setEnabled(ui->checkBoxNormalizationFilterEnabled->isChecked() && checked);
+       m_settings->normalizationFilterDynamic(checked);
 }
 
 /*
@@ -3637,9 +3920,30 @@ void MainWindow::normalizationMaxVolumeChanged(double value)
 /*
  * Normalization equalization mode changed
  */
-void MainWindow::normalizationModeChanged(int mode)
+void MainWindow::normalizationCoupledChanged(bool checked)
+{
+       m_settings->normalizationFilterCoupled(checked);
+}
+
+/*
+ * Normalization filter size changed
+ */
+void MainWindow::normalizationFilterSizeChanged(int value)
+{
+       m_settings->normalizationFilterSize(value);
+}
+
+/*
+ * Normalization filter size editing finished
+ */
+void MainWindow::normalizationFilterSizeFinished(void)
 {
-       m_settings->normalizationFilterEQMode(mode);
+       const int value = ui->spinBoxNormalizationFilterSize->value();
+       if((value % 2) != 1)
+       {
+               bool rnd = MUtils::parity(MUtils::next_rand_u32());
+               ui->spinBoxNormalizationFilterSize->setValue(rnd ? value+1 : value-1);
+       }
 }
 
 /*
@@ -3704,11 +4008,29 @@ void MainWindow::customParamsChanged(void)
 }
 
 /*
+ * One of the rename buttons has been clicked
+ */
+void MainWindow::renameButtonClicked(bool checked)
+{
+       if(QPushButton *const button  = dynamic_cast<QPushButton*>(QObject::sender()))
+       {
+               QWidget *pages[]       = { ui->pageRename_Rename,   ui->pageRename_RegExp,   ui->pageRename_FileEx   };
+               QPushButton *buttons[] = { ui->buttonRename_Rename, ui->buttonRename_RegExp, ui->buttonRename_FileEx };
+               for(int i = 0; i < 3; i++)
+               {
+                       const bool match = (button == buttons[i]);
+                       buttons[i]->setChecked(match);
+                       if(match && checked) ui->stackedWidget->setCurrentWidget(pages[i]);
+               }
+       }
+}
+
+/*
  * Rename output files enabled changed
  */
-void MainWindow::renameOutputEnabledChanged(bool checked)
+void MainWindow::renameOutputEnabledChanged(const bool &checked)
 {
-       m_settings->renameOutputFilesEnabled(checked);
+       m_settings->renameFiles_renameEnabled(checked);
 }
 
 /*
@@ -3717,14 +4039,14 @@ void MainWindow::renameOutputEnabledChanged(bool checked)
 void MainWindow::renameOutputPatternChanged(void)
 {
        QString temp = ui->lineEditRenamePattern->text().simplified();
-       ui->lineEditRenamePattern->setText(temp.isEmpty() ? m_settings->renameOutputFilesPatternDefault() : temp);
-       m_settings->renameOutputFilesPattern(ui->lineEditRenamePattern->text());
+       ui->lineEditRenamePattern->setText(temp.isEmpty() ? m_settings->renameFiles_renamePatternDefault() : temp);
+       m_settings->renameFiles_renamePattern(ui->lineEditRenamePattern->text());
 }
 
 /*
  * Rename output files patterm changed
  */
-void MainWindow::renameOutputPatternChanged(const QString &text, bool silent)
+void MainWindow::renameOutputPatternChanged(const QString &text, const bool &silent)
 {
        QString pattern(text.simplified());
        
@@ -3736,13 +4058,13 @@ void MainWindow::renameOutputPatternChanged(const QString &text, bool silent)
        pattern.replace("<Year>", "2001", Qt::CaseInsensitive);
        pattern.replace("<Comment>", "Encoded by LameXP", Qt::CaseInsensitive);
 
-       const QString patternClean = lamexp_clean_filename(pattern);
+       const QString patternClean = MUtils::clean_file_name(pattern, false);
 
        if(pattern.compare(patternClean))
        {
                if(ui->lineEditRenamePattern->palette().color(QPalette::Text) != Qt::red)
                {
-                       if(!silent) MessageBeep(MB_ICONERROR);
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
                        SET_TEXT_COLOR(ui->lineEditRenamePattern, Qt::red);
                }
        }
@@ -3750,7 +4072,7 @@ void MainWindow::renameOutputPatternChanged(const QString &text, bool silent)
        {
                if(ui->lineEditRenamePattern->palette() != QPalette())
                {
-                       if(!silent) MessageBeep(MB_ICONINFORMATION);
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
                        ui->lineEditRenamePattern->setPalette(QPalette());
                }
        }
@@ -3759,13 +4081,107 @@ void MainWindow::renameOutputPatternChanged(const QString &text, bool silent)
 }
 
 /*
+ * Regular expression enabled changed
+ */
+void MainWindow::renameRegExpEnabledChanged(const bool &checked)
+{
+       m_settings->renameFiles_regExpEnabled(checked);
+}
+
+/*
+ * Regular expression value has changed
+ */
+void  MainWindow::renameRegExpValueChanged(void)
+{
+       const QString search  = ui->lineEditRenameRegExp_Search->text() .trimmed();
+       const QString replace = ui->lineEditRenameRegExp_Replace->text().simplified();
+       ui->lineEditRenameRegExp_Search ->setText(search.isEmpty()  ? m_settings->renameFiles_regExpSearchDefault()  : search);
+       ui->lineEditRenameRegExp_Replace->setText(replace.isEmpty() ? m_settings->renameFiles_regExpReplaceDefault() : replace);
+       m_settings->renameFiles_regExpSearch (ui->lineEditRenameRegExp_Search ->text());
+       m_settings->renameFiles_regExpReplace(ui->lineEditRenameRegExp_Replace->text());
+}
+
+/*
+ * Regular expression search pattern has changed
+ */
+void  MainWindow::renameRegExpSearchChanged(const QString &text, const bool &silent)
+{
+       const QString pattern(text.trimmed());
+
+       if((!pattern.isEmpty()) && (!QRegExp(pattern.trimmed()).isValid()))
+       {
+               if(ui->lineEditRenameRegExp_Search->palette().color(QPalette::Text) != Qt::red)
+               {
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
+                       SET_TEXT_COLOR(ui->lineEditRenameRegExp_Search, Qt::red);
+               }
+       }
+       else
+       {
+               if(ui->lineEditRenameRegExp_Search->palette() != QPalette())
+               {
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
+                       ui->lineEditRenameRegExp_Search->setPalette(QPalette());
+               }
+       }
+
+       renameRegExpReplaceChanged(ui->lineEditRenameRegExp_Replace->text(), silent);
+}
+
+/*
+ * Regular expression replacement string changed
+ */
+void  MainWindow::renameRegExpReplaceChanged(const QString &text, const bool &silent)
+{
+       QString replacement(text.simplified());
+       const QString search(ui->lineEditRenameRegExp_Search->text().trimmed());
+
+       if(!search.isEmpty())
+       {
+               const QRegExp regexp(search);
+               if(regexp.isValid())
+               {
+                       const int count = regexp.captureCount();
+                       const QString blank; 
+                       for(int i = 0; i < count; i++)
+                       {
+                               replacement.replace(QString("\\%0").arg(QString::number(i+1)), blank);
+                       }
+               }
+       }
+
+       if(replacement.compare(MUtils::clean_file_name(replacement, false)))
+       {
+               if(ui->lineEditRenameRegExp_Replace->palette().color(QPalette::Text) != Qt::red)
+               {
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
+                       SET_TEXT_COLOR(ui->lineEditRenameRegExp_Replace, Qt::red);
+               }
+       }
+       else
+       {
+               if(ui->lineEditRenameRegExp_Replace->palette() != QPalette())
+               {
+                       if(!silent) MUtils::Sound::beep(MUtils::Sound::BEEP_NFO);
+                       ui->lineEditRenameRegExp_Replace->setPalette(QPalette());
+               }
+       }
+}
+
+/*
  * Show list of rename macros
  */
 void MainWindow::showRenameMacros(const QString &text)
 {
        if(text.compare("reset", Qt::CaseInsensitive) == 0)
        {
-               ui->lineEditRenamePattern->setText(m_settings->renameOutputFilesPatternDefault());
+               ui->lineEditRenamePattern->setText(m_settings->renameFiles_renamePatternDefault());
+               return;
+       }
+
+       if(text.compare("regexp", Qt::CaseInsensitive) == 0)
+       {
+               MUtils::OS::shell_open(this, "http://www.regular-expressions.info/quickstart.html");
                return;
        }
 
@@ -3786,6 +4202,38 @@ void MainWindow::showRenameMacros(const QString &text)
        QMessageBox::information(this, tr("Rename Macros"), message, tr("Discard"));
 }
 
+void MainWindow::fileExtAddButtonClicked(void)
+{
+       if(FileExtsModel *const model = dynamic_cast<FileExtsModel*>(ui->tableViewFileExts->model()))
+       {
+               model->addOverwrite(this);
+       }
+}
+
+void MainWindow::fileExtRemoveButtonClicked(void)
+{
+       if(FileExtsModel *const model = dynamic_cast<FileExtsModel*>(ui->tableViewFileExts->model()))
+       {
+               const QModelIndex selected = ui->tableViewFileExts->currentIndex();
+               if(selected.isValid())
+               {
+                       model->removeOverwrite(selected);
+               }
+               else
+               {
+                       MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
+               }
+       }
+}
+
+void MainWindow::fileExtModelChanged(void)
+{
+       if(FileExtsModel *const model = dynamic_cast<FileExtsModel*>(ui->tableViewFileExts->model()))
+       {
+               m_settings->renameFiles_fileExtension(model->exportItems());
+       }
+}
+
 void MainWindow::forceStereoDownmixEnabledChanged(bool checked)
 {
        m_settings->forceStereoDownmix(checked);
@@ -3794,18 +4242,19 @@ void MainWindow::forceStereoDownmixEnabledChanged(bool checked)
 /*
  * Maximum number of instances changed
  */
-void MainWindow::updateMaximumInstances(int value)
+void MainWindow::updateMaximumInstances(const int value)
 {
-       ui->labelMaxInstances->setText(tr("%n Instance(s)", "", value));
-       m_settings->maximumInstances(ui->checkBoxAutoDetectInstances->isChecked() ? NULL : value);
+       const quint32 instances = decodeInstances(qBound(1U, static_cast<quint32>(value), 32U));
+       m_settings->maximumInstances(ui->checkBoxAutoDetectInstances->isChecked() ? 0U : instances);
+       ui->labelMaxInstances->setText(tr("%n Instance(s)", "", static_cast<int>(instances)));
 }
 
 /*
  * Auto-detect number of instances
  */
-void MainWindow::autoDetectInstancesChanged(bool checked)
+void MainWindow::autoDetectInstancesChanged(const bool checked)
 {
-       m_settings->maximumInstances(checked ? NULL : ui->sliderMaxInstances->value());
+       m_settings->maximumInstances(checked ? 0U : decodeInstances(qBound(1U, static_cast<quint32>(ui->sliderMaxInstances->value()), 32U)));
 }
 
 /*
@@ -3815,7 +4264,7 @@ void MainWindow::browseCustomTempFolderButtonClicked(void)
 {
        QString newTempFolder;
 
-       if(lamexp_themes_enabled())
+       if(MUtils::GUI::themes_enabled())
        {
                newTempFolder = QFileDialog::getExistingDirectory(this, QString(), m_settings->customTempPath());
        }
@@ -3832,7 +4281,7 @@ void MainWindow::browseCustomTempFolderButtonClicked(void)
 
        if(!newTempFolder.isEmpty())
        {
-               QFile writeTest(QString("%1/~%2.tmp").arg(newTempFolder, lamexp_rand_str()));
+               QFile writeTest(QString("%1/~%2.tmp").arg(newTempFolder, MUtils::next_rand_str()));
                if(writeTest.open(QIODevice::ReadWrite))
                {
                        writeTest.remove();
@@ -3880,22 +4329,23 @@ void MainWindow::customParamsHelpRequested(QWidget *obj, QEvent *event)
                }
        }
 
-       if(obj == ui->helpCustomParamLAME)         showCustomParamsHelpScreen("lame.exe", "--longhelp");
+       if(obj == ui->helpCustomParamLAME)         showCustomParamsHelpScreen("lame.exe",    "--longhelp");
        else if(obj == ui->helpCustomParamOggEnc)  showCustomParamsHelpScreen("oggenc2.exe", "--help");
        else if(obj == ui->helpCustomParamNeroAAC)
        {
                switch(EncoderRegistry::getAacEncoder())
                {
-                       case SettingsModel::AAC_ENCODER_QAAC: showCustomParamsHelpScreen("qaac.exe", "--help"); break;
-                       case SettingsModel::AAC_ENCODER_FHG : showCustomParamsHelpScreen("fhgaacenc.exe", ""); break;
-                       case SettingsModel::AAC_ENCODER_NERO: showCustomParamsHelpScreen("neroAacEnc.exe", "-help"); break;
-                       default: MessageBeep(MB_ICONERROR); break;
+                       case SettingsModel::AAC_ENCODER_QAAC: showCustomParamsHelpScreen("qaac64.exe|qaac.exe", "--help"); break;
+                       case SettingsModel::AAC_ENCODER_FHG : showCustomParamsHelpScreen("fhgaacenc.exe",       ""      ); break;
+                       case SettingsModel::AAC_ENCODER_FDK : showCustomParamsHelpScreen("fdkaac.exe",          "--help"); break;
+                       case SettingsModel::AAC_ENCODER_NERO: showCustomParamsHelpScreen("neroAacEnc.exe",      "-help" ); break;
+                       default: MUtils::Sound::beep(MUtils::Sound::BEEP_ERR); break;
                }
        }
-       else if(obj == ui->helpCustomParamFLAC)    showCustomParamsHelpScreen("flac.exe", "--help");
-       else if(obj == ui->helpCustomParamAften)   showCustomParamsHelpScreen("aften.exe", "-h");
+       else if(obj == ui->helpCustomParamFLAC)    showCustomParamsHelpScreen("flac.exe",    "--help");
+       else if(obj == ui->helpCustomParamAften)   showCustomParamsHelpScreen("aften.exe",   "-h"    );
        else if(obj == ui->helpCustomParamOpus)    showCustomParamsHelpScreen("opusenc.exe", "--help");
-       else MessageBeep(MB_ICONERROR);
+       else MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
 }
 
 /*
@@ -3903,38 +4353,49 @@ void MainWindow::customParamsHelpRequested(QWidget *obj, QEvent *event)
  */
 void MainWindow::showCustomParamsHelpScreen(const QString &toolName, const QString &command)
 {
-       const QString binary = lamexp_lookup_tool(toolName);
+       const QStringList toolNames = toolName.split('|', QString::SkipEmptyParts);
+       QString binary;
+       for(QStringList::ConstIterator iter = toolNames.constBegin(); iter != toolNames.constEnd(); iter++)
+       {
+               if(lamexp_tools_check(*iter))
+               {
+                       binary = lamexp_tools_lookup(*iter);
+                       break;
+               }
+       }
+
        if(binary.isEmpty())
        {
-               MessageBeep(MB_ICONERROR);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
                qWarning("customParamsHelpRequested: Binary could not be found!");
                return;
        }
 
-       QProcess *process = new QProcess();
-       process->setProcessChannelMode(QProcess::MergedChannels);
-       process->setReadChannel(QProcess::StandardOutput);
-       process->start(binary, command.isEmpty() ? QStringList() : QStringList() << command);
+       QProcess process;
+       MUtils::init_process(process, QFileInfo(binary).absolutePath());
+
+       process.start(binary, command.isEmpty() ? QStringList() : QStringList() << command);
+
        qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
 
-       if(process->waitForStarted(15000))
+       if(process.waitForStarted(15000))
        {
                qApp->processEvents();
-               process->waitForFinished(15000);
+               process.waitForFinished(15000);
        }
        
-       if(process->state() != QProcess::NotRunning)
+       if(process.state() != QProcess::NotRunning)
        {
-               process->kill();
-               process->waitForFinished(-1);
+               process.kill();
+               process.waitForFinished(-1);
        }
 
        qApp->restoreOverrideCursor();
        QStringList output; bool spaceFlag = true;
 
-       while(process->canReadLine())
+       while(process.canReadLine())
        {
-               QString temp = QString::fromUtf8(process->readLine());
+               QString temp = QString::fromUtf8(process.readLine());
                TRIM_STRING_RIGHT(temp);
                if(temp.isEmpty())
                {
@@ -3946,19 +4407,21 @@ void MainWindow::showCustomParamsHelpScreen(const QString &toolName, const QStri
                }
        }
 
-       LAMEXP_DELETE(process);
-
        if(output.count() < 1)
        {
                qWarning("Empty output, cannot show help screen!");
-               MessageBeep(MB_ICONERROR);
+               MUtils::Sound::beep(MUtils::Sound::BEEP_ERR);
        }
 
-       LogViewDialog *dialog = new LogViewDialog(this);
-       TEMP_HIDE_DROPBOX( dialog->exec(output); );
-       LAMEXP_DELETE(dialog);
+       WidgetHideHelper hiderHelper(m_dropBox.data());
+       QScopedPointer<LogViewDialog> dialog(new LogViewDialog(this));
+       dialog->exec(output);
 }
 
+/*
+* File overwrite mode has changed
+*/
+
 void MainWindow::overwriteModeChanged(int id)
 {
        if((id == SettingsModel::Overwrite_Replaces) && (m_settings->overwriteMode() != SettingsModel::Overwrite_Replaces))
@@ -3975,55 +4438,74 @@ void MainWindow::overwriteModeChanged(int id)
 }
 
 /*
+* Keep original date/time opertion changed
+*/
+void MainWindow::keepOriginalDateTimeChanged(bool checked)
+{
+       m_settings->keepOriginalDataTime(checked);
+}
+
+/*
  * Reset all advanced options to their defaults
  */
 void MainWindow::resetAdvancedOptionsButtonClicked(void)
 {
-       if(m_settings->soundsEnabled())
-       {
-               PlaySound(MAKEINTRESOURCE(IDR_WAVE_BLAST), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
-       }
-
-       ui->sliderLameAlgoQuality->setValue(m_settings->lameAlgoQualityDefault());
-       ui->spinBoxBitrateManagementMin->setValue(m_settings->bitrateManagementMinRateDefault());
-       ui->spinBoxBitrateManagementMax->setValue(m_settings->bitrateManagementMaxRateDefault());
-       ui->spinBoxNormalizationFilter->setValue(static_cast<double>(m_settings->normalizationFilterMaxVolumeDefault()) / 100.0);
-       ui->spinBoxToneAdjustBass->setValue(static_cast<double>(m_settings->toneAdjustBassDefault()) / 100.0);
-       ui->spinBoxToneAdjustTreble->setValue(static_cast<double>(m_settings->toneAdjustTrebleDefault()) / 100.0);
-       ui->spinBoxAftenSearchSize->setValue(m_settings->aftenExponentSearchSizeDefault());
-       ui->spinBoxOpusComplexity->setValue(m_settings->opusComplexityDefault());
-       ui->comboBoxMP3ChannelMode->setCurrentIndex(m_settings->lameChannelModeDefault());
-       ui->comboBoxSamplingRate->setCurrentIndex(m_settings->samplingRateDefault());
-       ui->comboBoxAACProfile->setCurrentIndex(m_settings->aacEncProfileDefault());
-       ui->comboBoxAftenCodingMode->setCurrentIndex(m_settings->aftenAudioCodingModeDefault());
-       ui->comboBoxAftenDRCMode->setCurrentIndex(m_settings->aftenDynamicRangeCompressionDefault());
-       ui->comboBoxNormalizationMode->setCurrentIndex(m_settings->normalizationFilterEQModeDefault());
-       ui->comboBoxOpusFramesize->setCurrentIndex(m_settings->opusFramesizeDefault());
-
-       SET_CHECKBOX_STATE(ui->checkBoxBitrateManagement, m_settings->bitrateManagementEnabledDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxNeroAAC2PassMode, m_settings->neroAACEnable2PassDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilter, m_settings->normalizationFilterEnabledDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxAutoDetectInstances, (m_settings->maximumInstancesDefault() < 1));
-       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder, !m_settings->customTempPathEnabledDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxAftenFastAllocation, m_settings->aftenFastBitAllocationDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxRenameOutput, m_settings->renameOutputFilesEnabledDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxForceStereoDownmix, m_settings->forceStereoDownmixDefault());
-       SET_CHECKBOX_STATE(ui->checkBoxOpusDisableResample, m_settings->opusDisableResampleDefault());
-       
-       ui->lineEditCustomParamLAME   ->setText(m_settings->customParametersLAMEDefault());
-       ui->lineEditCustomParamOggEnc ->setText(m_settings->customParametersOggEncDefault());
-       ui->lineEditCustomParamNeroAAC->setText(m_settings->customParametersAacEncDefault());
-       ui->lineEditCustomParamFLAC   ->setText(m_settings->customParametersFLACDefault());
-       ui->lineEditCustomParamOpus   ->setText(m_settings->customParametersOpusEncDefault());
-       ui->lineEditCustomTempFolder  ->setText(QDir::toNativeSeparators(m_settings->customTempPathDefault()));
-       ui->lineEditRenamePattern     ->setText(m_settings->renameOutputFilesPatternDefault());
+       PLAY_SOUND_OPTIONAL("blast", true);
+
+       ui->sliderLameAlgoQuality         ->setValue(m_settings->lameAlgoQualityDefault());
+       ui->spinBoxBitrateManagementMin   ->setValue(m_settings->bitrateManagementMinRateDefault());
+       ui->spinBoxBitrateManagementMax   ->setValue(m_settings->bitrateManagementMaxRateDefault());
+       ui->spinBoxNormalizationFilterPeak->setValue(static_cast<double>(m_settings->normalizationFilterMaxVolumeDefault()) / 100.0);
+       ui->spinBoxNormalizationFilterSize->setValue(m_settings->normalizationFilterSizeDefault());
+       ui->spinBoxToneAdjustBass         ->setValue(static_cast<double>(m_settings->toneAdjustBassDefault()) / 100.0);
+       ui->spinBoxToneAdjustTreble       ->setValue(static_cast<double>(m_settings->toneAdjustTrebleDefault()) / 100.0);
+       ui->spinBoxAftenSearchSize        ->setValue(m_settings->aftenExponentSearchSizeDefault());
+       ui->spinBoxOpusComplexity         ->setValue(m_settings->opusComplexityDefault());
+       ui->comboBoxMP3ChannelMode        ->setCurrentIndex(m_settings->lameChannelModeDefault());
+       ui->comboBoxSamplingRate          ->setCurrentIndex(m_settings->samplingRateDefault());
+       ui->comboBoxAACProfile            ->setCurrentIndex(m_settings->aacEncProfileDefault());
+       ui->comboBoxAftenCodingMode       ->setCurrentIndex(m_settings->aftenAudioCodingModeDefault());
+       ui->comboBoxAftenDRCMode          ->setCurrentIndex(m_settings->aftenDynamicRangeCompressionDefault());
+       ui->comboBoxOpusFramesize         ->setCurrentIndex(m_settings->opusFramesizeDefault());
+
+       SET_CHECKBOX_STATE(ui->checkBoxBitrateManagement,          m_settings->bitrateManagementEnabledDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxNeroAAC2PassMode,           m_settings->neroAACEnable2PassDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterEnabled, m_settings->normalizationFilterEnabledDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterDynamic, m_settings->normalizationFilterDynamicDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxNormalizationFilterCoupled, m_settings->normalizationFilterCoupledDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxAutoDetectInstances,        (m_settings->maximumInstancesDefault() < 1));
+       SET_CHECKBOX_STATE(ui->checkBoxUseSystemTempFolder,        (!m_settings->customTempPathEnabledDefault()));
+       SET_CHECKBOX_STATE(ui->checkBoxAftenFastAllocation,        m_settings->aftenFastBitAllocationDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxRename_Rename,              m_settings->renameFiles_renameEnabledDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxRename_RegExp,              m_settings->renameFiles_regExpEnabledDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxForceStereoDownmix,         m_settings->forceStereoDownmixDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxOpusDisableResample,        m_settings->opusDisableResampleDefault());
+       SET_CHECKBOX_STATE(ui->checkBoxKeepOriginalDateTime,       m_settings->keepOriginalDataTimeDefault());
+
+       ui->lineEditCustomParamLAME     ->setText(m_settings->customParametersLAMEDefault());
+       ui->lineEditCustomParamOggEnc   ->setText(m_settings->customParametersOggEncDefault());
+       ui->lineEditCustomParamNeroAAC  ->setText(m_settings->customParametersAacEncDefault());
+       ui->lineEditCustomParamFLAC     ->setText(m_settings->customParametersFLACDefault());
+       ui->lineEditCustomParamOpus     ->setText(m_settings->customParametersOpusEncDefault());
+       ui->lineEditCustomTempFolder    ->setText(QDir::toNativeSeparators(m_settings->customTempPathDefault()));
+       ui->lineEditRenamePattern       ->setText(m_settings->renameFiles_renamePatternDefault());
+       ui->lineEditRenameRegExp_Search ->setText(m_settings->renameFiles_regExpSearchDefault());
+       ui->lineEditRenameRegExp_Replace->setText(m_settings->renameFiles_regExpReplaceDefault());
 
        if(m_settings->overwriteModeDefault() == SettingsModel::Overwrite_KeepBoth) ui->radioButtonOverwriteModeKeepBoth->click();
        if(m_settings->overwriteModeDefault() == SettingsModel::Overwrite_SkipFile) ui->radioButtonOverwriteModeSkipFile->click();
        if(m_settings->overwriteModeDefault() == SettingsModel::Overwrite_Replaces) ui->radioButtonOverwriteModeReplaces->click();
 
-       customParamsChanged();
+       if(FileExtsModel *const model = dynamic_cast<FileExtsModel*>(ui->tableViewFileExts->model()))
+       {
+               model->importItems(m_settings->renameFiles_fileExtensionDefault());
+       }
+
        ui->scrollArea->verticalScrollBar()->setValue(0);
+       ui->buttonRename_Rename->click();
+       customParamsChanged();
+       renameOutputPatternChanged();
+       renameRegExpValueChanged();
 }
 
 // =========================================================
@@ -4035,7 +4517,7 @@ void MainWindow::resetAdvancedOptionsButtonClicked(void)
  */
 void MainWindow::notifyOtherInstance(void)
 {
-       if(!m_banner->isVisible())
+       if(!(BANNER_VISIBLE))
        {
                QMessageBox msgBox(QMessageBox::Warning, tr("Already Running"), tr("LameXP is already running, please use the running instance!"), QMessageBox::NoButton, this, Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowStaysOnTopHint);
                msgBox.exec();
@@ -4049,13 +4531,13 @@ void MainWindow::addFileDelayed(const QString &filePath, bool tryASAP)
 {
        if(tryASAP && !m_delayedFileTimer->isActive())
        {
-               qDebug("Received file: %s", filePath.toUtf8().constData());
+               qDebug("Received file: %s", MUTILS_UTF8(filePath));
                m_delayedFileList->append(filePath);
                QTimer::singleShot(0, this, SLOT(handleDelayedFiles()));
        }
        
        m_delayedFileTimer->stop();
-       qDebug("Received file: %s", filePath.toUtf8().constData());
+       qDebug("Received file: %s", MUTILS_UTF8(filePath));
        m_delayedFileList->append(filePath);
        m_delayedFileTimer->start(5000);
 }
@@ -4065,7 +4547,7 @@ void MainWindow::addFileDelayed(const QString &filePath, bool tryASAP)
  */
 void MainWindow::addFilesDelayed(const QStringList &filePaths, bool tryASAP)
 {
-       if(tryASAP && !m_delayedFileTimer->isActive())
+       if(tryASAP && (!m_delayedFileTimer->isActive()))
        {
                qDebug("Received %d file(s).", filePaths.count());
                m_delayedFileList->append(filePaths);
@@ -4085,7 +4567,7 @@ void MainWindow::addFilesDelayed(const QStringList &filePaths, bool tryASAP)
  */
 void MainWindow::addFolderDelayed(const QString &folderPath, bool recursive)
 {
-       if(!m_banner->isVisible())
+       if(!(BANNER_VISIBLE))
        {
                addFolder(folderPath, recursive, true);
        }