From 8e38c1d3e2e2d39a366fafec37074faa56cf3bb1 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Wed, 22 Dec 2010 01:01:01 +0100 Subject: [PATCH] Implemented the DropBox widget. --- LameXP.rc | 1 + LameXP.vcproj | 76 +++++++++++++++++++ gui/DropBox.ui | 53 +++++++++++++ gui/MainWindow.ui | 12 +++ res/Images.qrc | 11 +-- res/images/DropBox.png | Bin 0 -> 9954 bytes res/sounds/woohoo.wav | Bin 0 -> 6759 bytes src/Config.h | 2 +- src/Dialog_DropBox.cpp | 154 ++++++++++++++++++++++++++++++++++++++ src/Dialog_DropBox.h | 65 ++++++++++++++++ src/Dialog_MainWindow.cpp | 48 +++++++++++- src/Dialog_MainWindow.h | 3 + src/Global.cpp | 6 +- src/Main.cpp | 6 +- src/Model_Settings.cpp | 2 + src/Model_Settings.h | 1 + src/Resource.h | 1 + src/Thread_Process.cpp | 2 +- 18 files changed, 428 insertions(+), 15 deletions(-) create mode 100644 gui/DropBox.ui create mode 100644 res/images/DropBox.png create mode 100644 res/sounds/woohoo.wav create mode 100644 src/Dialog_DropBox.cpp create mode 100644 src/Dialog_DropBox.h diff --git a/LameXP.rc b/LameXP.rc index 46b7c7b4..3336b87a 100644 --- a/LameXP.rc +++ b/LameXP.rc @@ -110,6 +110,7 @@ IDR_WAVE_SUCCESS WAVE "res\\sounds\\success.wav" IDR_WAVE_ERROR WAVE "res\\sounds\\error.wav" IDR_WAVE_ABORTED WAVE "res\\sounds\\aborted.wav" IDR_WAVE_WHAMMY WAVE "res\\sounds\\whammy.wav" +IDR_WAVE_WOOHOO WAVE "res\\sounds\\woohoo.wav" ///////////////////////////////////////////////////////////////////////////// // diff --git a/LameXP.vcproj b/LameXP.vcproj index cbc53f41..8ae4fd54 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -326,6 +326,10 @@ RelativePath=".\src\Dialog_About.cpp" > + + @@ -564,6 +568,40 @@ /> + + + + + + + + + + + @@ -1404,6 +1442,10 @@ RelativePath=".\tmp\MOC_Dialog_About.cpp" > + + @@ -1664,6 +1706,40 @@ + + + + + + + + + + + diff --git a/gui/DropBox.ui b/gui/DropBox.ui new file mode 100644 index 00000000..bbe476ca --- /dev/null +++ b/gui/DropBox.ui @@ -0,0 +1,53 @@ + + + DropBox + + + + 0 + 0 + 102 + 102 + + + + LameXP - DropBox + + + + :/icons/package.png:/icons/package.png + + + + 0 + + + + + + + 0 + + + + + + :/images/DropBox.png + + + Qt::AlignCenter + + + + + + + + + + + + + + + diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index bc53f5bb..89d8bc5d 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -1201,6 +1201,7 @@ + @@ -1397,6 +1398,15 @@ Disable WMA Decoder Notifications + + + + :/icons/package.png:/icons/package.png + + + Show DropBox + + @@ -1500,6 +1510,8 @@ + + diff --git a/res/Images.qrc b/res/Images.qrc index 5bc1ac2e..cce78efb 100644 --- a/res/Images.qrc +++ b/res/Images.qrc @@ -2,19 +2,20 @@ images/Busy.gif - images/HeaderIcon_MetaInfo.png + images/Cogwheels.png + images/Construction.gif + images/DropBox.png images/HeaderIcon_LogFile.png + images/HeaderIcon_MetaInfo.png images/Label.png images/Loading.gif images/Logo.png images/Logo_Contributors.png images/Logo_Software.png + images/Qt.svg images/Splash.png images/Thumb.png - images/Construction.gif - images/Cogwheels.png - images/Qt.svg - images/Working.gif images/Wizard.png + images/Working.gif diff --git a/res/images/DropBox.png b/res/images/DropBox.png new file mode 100644 index 0000000000000000000000000000000000000000..be4575075843ddbced93abf5782e6098c6f5d841 GIT binary patch literal 9954 zcmV<8CLP&{P)g`K!ucxQGXX6Y<6g8x1Ql=;y zk_|1e0sRQjhdu?tfCc+UfPcJv8juXw@P}>a$ATBdGPAO_-ey>MC?xXb7B_F)<=k_l@H@Z#$3#RVL`1~&{r^Bm z+lq%C38?D#=P9@~Y9gX^BLELM-ZqbwPD!WDKWFTdj#O1WnY4sxRAci^Bt+auq&|@+_S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|bQbUL+!Y^vfa@%4wKDtD;#qB%H&@GA5HK^t=0ojXxpDV}3+oHZ zOJ$JycZc|6ulxWJ`LZenDvS`TszePTPXEYOQo1VOj1})RJ=x{i}3nKT@(>X_ur zSx~QI<7IJS<c;`A8DJ!>P=nJk*wQG2sp zc|+S7T3@oLUAukwfa9x!E5se-N5>eJOi zn-ku4tb?8mv+J&1cxLMo!x4j&8O^VsJXVvJP5cdRC(?5~Al0o`05a>!&ceopSAtvI z+r3u~PbPoeY2xMRjBv7%o1qW+*XCyZ>H-!P7B|jp_14bi-Hv6W&{XgNDZr9iib$tI z9Msi6eHtEo`tEcWSI<0adTXm^`^n-yMjk&&6RY(F9}=oOeV0+pm}S|*!ot$ZO3GW& z+?`q}FJYE_uf1U{Oje3o1zUJXK-h@PTD!Eg++A3RK8VQJnx9V9 gJw?S^Qv?0~2aD79q(n{W>;M1&07*qoM6N<$g6{1}xBvhE literal 0 HcmV?d00001 diff --git a/res/sounds/woohoo.wav b/res/sounds/woohoo.wav new file mode 100644 index 0000000000000000000000000000000000000000..837241a4b2dc9a44bfa9ac3e85575e3941a12fe2 GIT binary patch literal 6759 zcmY*;S8yXqdgkcuo=$ghCn=-|o%R&BQjErI+nH{%n@u)72|5sTAV7lf-U9`cuR;|( z3f=<*K!60jw{6&N+KgR|c4tPrcN3CAd)kM4)3Y8f!MRYxWx34%|MPd5Rax;Rf3UA_ z@z36SZ>DRyS81^S>_5Ht-g|!lj{p3@dso*Vy!Rj8lP}qq+JOvtRS5FxAP52{aIAHJ z0&X}UkOV4upSRZkeJ&IxgaOxf?))~2pk2y z8JcB-{$PNmQQQqd4x7W_fB+lDNsAsLNN;j=d$k;P*^M@n!R&N6oDgI-sZAC)$#Og2 zeSg%*VvBsyl0>028x;bH+Ce1CYX{F?e)-+2JmXp%9=Lm}H- zyB}ZG!kPzv_5RO3Y8zd&TPz5}#8w`^`Tqa>@3SBxx%=Ub_uC(Qa&KjzZ%0KmCvY?Z5nN$f&11K7ZIz`R9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7t3a{DL-P<$QH#ijT0f*NRTB-miGG-`9eJ6LBQupC|y!oF^UU#85Tuo0AplR z@gVN7DWpo3%HhI&5rzQ}F^STC4+x&};IPAD(wl6U7l09{+W|Q-3TG*g*UvH(iCuxr zFa+CLNHO>_fJlNI$3;Ru4~al-hu!Ifaey#W7>&`C*Xs}XeO@mDP;89BaSV1Mb_e8k zK^Vz+Jit}P1Ev9qA_U@gxtx&Q;&3@^P^+sy;H7cWLs1?QhwNq>c-h^M&5q!V-xmZt z4~CHd6(?~5g`JQMAP5NK^MLUqNRk2&IY}ZE4SKq)POA&7G6aqTj;CdoL;;YFAQ0qq zLtp{&`dBXmV008FV3ee3uLnb&RtJItZ48M5$h@TvbOty&0z!abv<1Nf8if;ZYeZ<8 z!Qob}+%OD;04z^{xeX*J3P|Ayhzx?~82Mh+-mjK3ElK~6`xPkP5 z?TePVmc1)-OW-F5fNOx$x&dhdY-)g@Kxt802Sv9Yt*Ba8%h6UsT00|G{MPtjt*~3W zCs+F=K)jV%97DnFiU%?Qpezt4C_m9aAJC~)00mU9OauKt5rE>BY-<{UYO7DH-Kw=H zS7uwSe`mG?e!8xNTIO4_Ee%(d|JS-A|3tdd*s8Xaw)9*nZ%Km_)c^m=RSWdKdj8b- EzlZ+z-T(jq literal 0 HcmV?d00001 diff --git a/src/Config.h b/src/Config.h index cbd2cfac..c640278c 100644 --- a/src/Config.h +++ b/src/Config.h @@ -25,7 +25,7 @@ #define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 0 -#define VER_LAMEXP_BUILD 175 +#define VER_LAMEXP_BUILD 179 #define VER_LAMEXP_SUFFIX TechPreview /* diff --git a/src/Dialog_DropBox.cpp b/src/Dialog_DropBox.cpp new file mode 100644 index 00000000..c9ff7311 --- /dev/null +++ b/src/Dialog_DropBox.cpp @@ -0,0 +1,154 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2010 LoRd_MuldeR +// +// 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 +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#include "Dialog_DropBox.h" + +#include "Global.h" +#include "Model_Settings.h" + +#include +#include +#include +#include +#include + +#define EPS (1.0E-5) +#define SET_FONT_BOLD(WIDGET,BOLD) { QFont _font = WIDGET.font(); _font.setBold(BOLD); WIDGET.setFont(_font); } + +//////////////////////////////////////////////////////////// +// Constructor +//////////////////////////////////////////////////////////// + +DropBox::DropBox(QWidget *parent, QAbstractItemModel *model, SettingsModel *settings) +: + QDialog(parent, Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint), + m_counterLabel(this), + m_model(model), + m_settings(settings), + m_firstShow(true) +{ + //Init the dialog, from the .ui file + setupUi(this); + + //Init counter + m_counterLabel.setParent(dropBoxLabel); + m_counterLabel.setText("0"); + m_counterLabel.setAlignment(Qt::AlignHCenter | Qt::AlignTop); + SET_FONT_BOLD(m_counterLabel, true); + + //Prevent close + m_canClose = false; + + //Make transparent + setWindowOpacity(0.8); +} + +//////////////////////////////////////////////////////////// +// Destructor +//////////////////////////////////////////////////////////// + +DropBox::~DropBox(void) +{ +} + +//////////////////////////////////////////////////////////// +// PUBLIC SLOTS +//////////////////////////////////////////////////////////// + +void DropBox::modelChanged(void) +{ + if(m_model) + { + m_counterLabel.setText(QString::number(m_model->rowCount())); + } +} + +//////////////////////////////////////////////////////////// +// EVENTS +//////////////////////////////////////////////////////////// + +void DropBox::showEvent(QShowEvent *event) +{ + QRect screenGeometry = QApplication::desktop()->availableGeometry(); + + resize(dropBoxLabel->pixmap()->size()); + setMaximumSize(dropBoxLabel->pixmap()->size()); + + m_counterLabel.setGeometry(0, dropBoxLabel->height() - 30, dropBoxLabel->width(), 25); + + if(m_firstShow) + { + m_firstShow = false; + int max_x = screenGeometry.width() - frameGeometry().width(); + int max_y = screenGeometry.height() - frameGeometry().height(); + move(max_x, max_y); + } +} + +void DropBox::keyPressEvent(QKeyEvent *event) +{ + event->ignore(); +} + +void DropBox::keyReleaseEvent(QKeyEvent *event) +{ + event->ignore(); +} + +void DropBox::closeEvent(QCloseEvent *event) +{ + if(!m_canClose) event->ignore(); +} + +void DropBox::mousePressEvent(QMouseEvent *event) +{ + if(event->button() == Qt::RightButton) + { + hide(); + if(m_settings) m_settings->dropBoxWidgetEnabled(false); + return; + } + + QApplication::setOverrideCursor(Qt::SizeAllCursor); + m_windowReferencePoint = this->pos(); + m_mouseReferencePoint = event->globalPos(); +} + +void DropBox::mouseReleaseEvent(QMouseEvent *event) +{ + QApplication::restoreOverrideCursor(); +} + +void DropBox::mouseMoveEvent(QMouseEvent *event) +{ + QRect screenGeometry = QApplication::desktop()->availableGeometry(); + + int delta_x = m_mouseReferencePoint.x() - event->globalX(); + int delta_y = m_mouseReferencePoint.y() - event->globalY(); + + int max_x = screenGeometry.width() - frameGeometry().width(); + int max_y = screenGeometry.height() - frameGeometry().height(); + + int new_x = min(max_x, max(0, m_windowReferencePoint.x() - delta_x)); + int new_y = min(max_y, max(0, m_windowReferencePoint.y() - delta_y)); + + move(new_x, new_y); +} diff --git a/src/Dialog_DropBox.h b/src/Dialog_DropBox.h new file mode 100644 index 00000000..9b67cfc3 --- /dev/null +++ b/src/Dialog_DropBox.h @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2010 LoRd_MuldeR +// +// 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 +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "../tmp/UIC_DropBox.h" + +#include + +class QDragEnterEvent; +class QMouseEvent; +class QAbstractItemModel; +class SettingsModel; + +//////////////////////////////////////////////////////////// +// Splash Frame +//////////////////////////////////////////////////////////// + +class DropBox: public QDialog, private Ui::DropBox +{ + Q_OBJECT + +public: + DropBox(QWidget *parent = 0, QAbstractItemModel *model = 0, SettingsModel *settings = 0); + ~DropBox(void); + +private: + bool m_canClose; + QPoint m_mouseReferencePoint; + QPoint m_windowReferencePoint; + QLabel m_counterLabel; + QAbstractItemModel *m_model; + SettingsModel *m_settings; + bool m_firstShow; + +protected: + void keyPressEvent(QKeyEvent *event); + void keyReleaseEvent(QKeyEvent *event); + void closeEvent(QCloseEvent *event); + void showEvent(QShowEvent *event); + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + +public slots: + void modelChanged(void); +}; diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 5b4ccd02..0075369d 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -28,6 +28,7 @@ #include "Dialog_MetaInfo.h" #include "Dialog_About.h" #include "Dialog_Update.h" +#include "Dialog_DropBox.h" #include "Thread_FileAnalyzer.h" #include "Thread_MessageHandler.h" #include "Model_MetaInfo.h" @@ -259,6 +260,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S connect(actionInstallWMADecoder, SIGNAL(triggered(bool)), this, SLOT(installWMADecoderActionTriggered(bool))); connect(actionDisableNeroAacNotifications, SIGNAL(triggered(bool)), this, SLOT(disableNeroAacNotificationsActionTriggered(bool))); connect(actionDisableWmaDecoderNotifications, SIGNAL(triggered(bool)), this, SLOT(disableWmaDecoderNotificationsActionTriggered(bool))); + connect(actionShowDropBoxWidget, SIGNAL(triggered(bool)), this, SLOT(showDropBoxWidgetActionTriggered(bool))); //Activate help menu actions connect(actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated())); @@ -273,6 +275,12 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S //Create banner m_banner = new WorkingBanner(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())); + //Create message handler thread m_messageHandler = new MessageHandlerThread(); m_delayedFileList = new QStringList(); @@ -320,6 +328,7 @@ MainWindow::~MainWindow(void) LAMEXP_DELETE(m_encoderButtonGroup); LAMEXP_DELETE(m_encoderButtonGroup); LAMEXP_DELETE(m_sourceFilesContextMenu); + LAMEXP_DELETE(m_dropBox); } //////////////////////////////////////////////////////////// @@ -371,6 +380,11 @@ void MainWindow::showEvent(QShowEvent *event) m_firstTimeShown = false; QTimer::singleShot(0, this, SLOT(windowShown())); } + + if(m_settings->dropBoxWidgetEnabled()) + { + m_dropBox->setVisible(true); + } } void MainWindow::dragEnterEvent(QDragEnterEvent *event) @@ -422,6 +436,11 @@ void MainWindow::closeEvent(QCloseEvent *event) MessageBeep(MB_ICONEXCLAMATION); event->ignore(); } + + if(m_dropBox) + { + m_dropBox->hide(); + } } void MainWindow::resizeEvent(QResizeEvent *event) @@ -470,12 +489,14 @@ void MainWindow::windowShown(void) if(iAccepted <= 0) { m_settings->licenseAccepted(-1); + QApplication::processEvents(); PlaySound(MAKEINTRESOURCE(IDR_WAVE_WHAMMY), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC); QMessageBox::critical(this, "License Declined", "You have declined the license. Consequently the application will exit now!"); QApplication::quit(); return; } - + + PlaySound(MAKEINTRESOURCE(IDR_WAVE_WOOHOO), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC); m_settings->licenseAccepted(1); } @@ -575,6 +596,7 @@ void MainWindow::windowShown(void) } } + //Start delayed files timer if(!m_delayedFileList->isEmpty() && !m_delayedFileTimer->isActive()) { m_delayedFileTimer->start(5000); @@ -587,9 +609,11 @@ void MainWindow::windowShown(void) void MainWindow::aboutButtonClicked(void) { ABORT_IF_BUSY; + if(m_dropBox->isVisible()) m_dropBox->hide(); AboutDialog *aboutBox = new AboutDialog(m_settings, this); aboutBox->exec(); LAMEXP_DELETE(aboutBox); + if(m_settings->dropBoxWidgetEnabled()) m_dropBox->show(); } /* @@ -1021,7 +1045,8 @@ void MainWindow::visitHomepageActionActivated(void) void MainWindow::checkUpdatesActionActivated(void) { ABORT_IF_BUSY; - + + if(m_dropBox->isVisible()) m_dropBox->hide(); UpdateDialog *updateDialog = new UpdateDialog(m_settings, this); updateDialog->exec(); @@ -1031,6 +1056,7 @@ void MainWindow::checkUpdatesActionActivated(void) } LAMEXP_DELETE(updateDialog); + if(m_settings->dropBoxWidgetEnabled()) m_dropBox->show(); } /* @@ -1610,3 +1636,21 @@ void MainWindow::installWMADecoderActionTriggered(bool checked) } } +void MainWindow::showDropBoxWidgetActionTriggered(bool checked) +{ + m_settings->dropBoxWidgetEnabled(true); + + if(!m_dropBox->isVisible()) + { + m_dropBox->show(); + } + + FLASHWINFO flashInfo; + memset(&flashInfo, 0, sizeof(FLASHWINFO)); + flashInfo.cbSize = sizeof(FLASHWINFO); + flashInfo.dwFlags = FLASHW_ALL; + flashInfo.uCount = 12; + flashInfo.dwTimeout = 125; + flashInfo.hwnd = m_dropBox->winId(); + FlashWindowEx(&flashInfo); +} diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index bdb684af..4a49f382 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -34,6 +34,7 @@ class QButtonGroup; class FileListModel; class AbstractEncoder; class QMenu; +class DropBox; class MainWindow: public QMainWindow, private Ui::MainWindow { @@ -91,6 +92,7 @@ private slots: void installWMADecoderActionTriggered(bool checked); void disableNeroAacNotificationsActionTriggered(bool checked); void disableWmaDecoderNotificationsActionTriggered(bool checked); + void showDropBoxWidgetActionTriggered(bool checked); protected: void showEvent(QShowEvent *event); @@ -121,4 +123,5 @@ private: QLabel *m_dropNoteLabel; QMenu *m_sourceFilesContextMenu; QMenu *m_outputFolderContextMenu; + DropBox *m_dropBox; }; diff --git a/src/Global.cpp b/src/Global.cpp index 36d6b54c..1438ff1d 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -223,12 +223,12 @@ void lamexp_message_handler(QtMsgType type, const char *msg) fflush(stdout); fflush(stderr); SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_INTENSITY); - fwprintf(stderr, L"\nCRITICAL ERROR !!!\n%S\n\n", msg); - MessageBoxW(NULL, (wchar_t*) QString::fromUtf8(msg).utf16(), L"LameXP - CRITICAL ERROR", MB_ICONERROR | MB_TOPMOST | MB_TASKMODAL); + fwprintf(stderr, L"\nGURU MEDITATION !!!\n%S\n\n", msg); + MessageBoxW(NULL, (wchar_t*) QString::fromUtf8(msg).utf16(), L"LameXP - GURU MEDITATION", MB_ICONERROR | MB_TOPMOST | MB_TASKMODAL); break; case QtWarningMsg: SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY); - //MessageBoxW(NULL, (wchar_t*) QString::fromUtf8(msg).utf16(), L"LameXP - CRITICAL ERROR", MB_ICONWARNING | MB_TOPMOST | MB_TASKMODAL); + //MessageBoxW(NULL, (wchar_t*) QString::fromUtf8(msg).utf16(), L"LameXP - GURU MEDITATION", MB_ICONWARNING | MB_TOPMOST | MB_TASKMODAL); fwprintf(stderr, L"%S\n", msg); fflush(stderr); break; diff --git a/src/Main.cpp b/src/Main.cpp index be110950..6922d6f4 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -186,7 +186,7 @@ int main(int argc, char* argv[]) { fflush(stdout); fflush(stderr); - fprintf(stderr, "\nEXCEPTION ERROR: %s\n", error); + fprintf(stderr, "\nGURU MEDITATION: %s\n", error); FatalAppExit(0, L"Unhandeled exception error, application will exit!"); TerminateProcess(GetCurrentProcess(), -1); } @@ -194,7 +194,7 @@ int main(int argc, char* argv[]) { fflush(stdout); fflush(stderr); - fprintf(stderr, "\nEXCEPTION ERROR: Error code 0x%X\n", error); + fprintf(stderr, "\nGURU MEDITATION: Error code 0x%X\n", error); FatalAppExit(0, L"Unhandeled exception error, application will exit!"); TerminateProcess(GetCurrentProcess(), -1); } @@ -202,7 +202,7 @@ int main(int argc, char* argv[]) { fflush(stdout); fflush(stderr); - fprintf(stderr, "\nEXCEPTION ERROR !!!\n"); + fprintf(stderr, "\nGURU MEDITATION !!!\n"); FatalAppExit(0, L"Unhandeled exception error, application will exit!"); TerminateProcess(GetCurrentProcess(), -1); } diff --git a/src/Model_Settings.cpp b/src/Model_Settings.cpp index 4e70b5d6..2baa9fae 100644 --- a/src/Model_Settings.cpp +++ b/src/Model_Settings.cpp @@ -46,6 +46,7 @@ static const char *g_settingsId_autoUpdateEnabled = "AutoUpdate/Enabled"; static const char *g_settingsId_soundsEnabled = "Flags/EnableSounds"; static const char *g_settingsId_neroAacNotificationsEnabled = "Flags/EnableNeroAacNotifications"; static const char *g_settingsId_wmaDecoderNotificationsEnabled = "Flags/EnableWmaDecoderNotifications"; +static const char *g_settingsId_dropBoxWidgetEnabled = "Flags/EnableDropBoxWidget"; //Macros #define MAKE_OPTION1(OPT,DEF) \ @@ -132,3 +133,4 @@ MAKE_OPTION3(autoUpdateEnabled, true) MAKE_OPTION3(soundsEnabled, true) MAKE_OPTION3(neroAacNotificationsEnabled, true) MAKE_OPTION3(wmaDecoderNotificationsEnabled, true) +MAKE_OPTION3(dropBoxWidgetEnabled, true) diff --git a/src/Model_Settings.h b/src/Model_Settings.h index 962a85d9..e6ccd189 100644 --- a/src/Model_Settings.h +++ b/src/Model_Settings.h @@ -77,6 +77,7 @@ public: MAKE_OPTION_DEC3(soundsEnabled); MAKE_OPTION_DEC3(neroAacNotificationsEnabled) MAKE_OPTION_DEC3(wmaDecoderNotificationsEnabled) + MAKE_OPTION_DEC3(dropBoxWidgetEnabled) //Misc void validate(void); diff --git a/src/Resource.h b/src/Resource.h index d99ab915..58c21e5a 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -30,6 +30,7 @@ #define IDR_WAVE_ERROR 668 #define IDR_WAVE_ABORTED 669 #define IDR_WAVE_WHAMMY 670 +#define IDR_WAVE_WOOHOO 671 /* * Next default values for new objects diff --git a/src/Thread_Process.cpp b/src/Thread_Process.cpp index 7f5b9ef7..99c16d70 100644 --- a/src/Thread_Process.cpp +++ b/src/Thread_Process.cpp @@ -86,7 +86,7 @@ void ProcessThread::run() { fflush(stdout); fflush(stderr); - fprintf(stderr, "\nEXCEPTION ERROR !!!\n"); + fprintf(stderr, "\nGURU MEDITATION !!!\n"); FatalAppExit(0, L"Unhandeled exception error, application will exit!"); TerminateProcess(GetCurrentProcess(), -1); }