# # # patch "src/GuitoneCore.cpp" # from [c3115fc07f0c4a4e3e7f84e5d72696ccd56c1cfc] # to [54e94d1ab775f27cf2ca1549d83a16e6abd12b20] # # patch "src/GuitoneCore.h" # from [286c2f55e77fb3947a6ec3b10689793f6179913d] # to [1a12a556d0277cd0b796653e7db3af726352a523] # # patch "src/GuitoneStandalone.cpp" # from [57f444eedb64ceb8350c25332042c6fee61cb91d] # to [8f682fe3e52514f8300b20adb8ef161cae3756b9] # ============================================================ --- src/GuitoneCore.cpp c3115fc07f0c4a4e3e7f84e5d72696ccd56c1cfc +++ src/GuitoneCore.cpp 54e94d1ab775f27cf2ca1549d83a16e6abd12b20 @@ -46,6 +46,11 @@ GuitoneCore::GuitoneCore(int & argc, cha monotoneManager = new MonotoneManager(); + connect( + monotoneManager, SIGNAL(threadAborted(const QString &)), + this, SLOT(threadAborted(const QString &)) + ); + QTimer::singleShot(0, this, SLOT(setMonotoneBinaryPath())); } @@ -133,3 +138,13 @@ void GuitoneCore::checkForApplicationUpd #endif } +void GuitoneCore::threadAborted(const QString & message) +{ + QMessageBox::critical( + NULL, + tr("Error"), + message, + QMessageBox::Ok, 0, 0 + ); +} + ============================================================ --- src/GuitoneCore.h 286c2f55e77fb3947a6ec3b10689793f6179913d +++ src/GuitoneCore.h 1a12a556d0277cd0b796653e7db3af726352a523 @@ -43,6 +43,9 @@ public slots: void checkForApplicationUpdates(bool silent = false); virtual void quit(); +protected slots: + virtual void threadAborted(const QString &); + private slots: void setMonotoneBinaryPath(); ============================================================ --- src/GuitoneStandalone.cpp 57f444eedb64ceb8350c25332042c6fee61cb91d +++ src/GuitoneStandalone.cpp 8f682fe3e52514f8300b20adb8ef161cae3756b9 @@ -51,6 +51,7 @@ void GuitoneStandalone::loadSomething() } void GuitoneStandalone::loadSomething() +{ // if something was already loaded, skip this if (somethingLoaded) return; @@ -286,6 +287,8 @@ void GuitoneStandalone::quit() { if (!closeAllWindows()) return; GuitoneCore::quit(); +} + /*! Ensures somewhat that new windows do not overdraw current ones by adding a little x/y offset the original position of the window @@ -336,3 +339,15 @@ void GuitoneStandalone::raiseAllWindows( wnd->raise(); } } + +void GuitoneStandalone::threadAborted(const QString & message) +{ + if (openPrompt) + { + openPrompt->setEnabled(true); + openPrompt->raise(); + } + + GuitoneCore::threadAborted(message); +} +