# # # patch "res/osx/Info.plist.in" # from [9617529f934ca113ee7e114f5168c32bb51ae5b6] # to [4330a55391cb758cfef61c4a9a88e976a9617565] # # patch "src/GuitoneCore.cpp" # from [e1f324153ab0ada4abfae0ce70dee234353648e8] # to [fad92ebfe422feb6f2dd20195cc1b6641e0dad58] # # patch "src/GuitoneCore.h" # from [1a12a556d0277cd0b796653e7db3af726352a523] # to [66587547a89b3d1501a46a48b91001522b610ffc] # # patch "src/GuitoneDriver.cpp" # from [425b1ad3ec9d37453807d17761df4cafd4f45dd0] # to [d4441384aad7e8e44484f8a4b22c9744887ac7ea] # # patch "src/GuitoneStandalone.cpp" # from [8f682fe3e52514f8300b20adb8ef161cae3756b9] # to [50b0c665667b9d8f90c033cc0658b70fbcd6aab7] # ============================================================ --- res/osx/Info.plist.in 9617529f934ca113ee7e114f5168c32bb51ae5b6 +++ res/osx/Info.plist.in 4330a55391cb758cfef61c4a9a88e976a9617565 @@ -46,5 +46,7 @@ + LSUIElement + 1 ============================================================ --- src/GuitoneCore.cpp e1f324153ab0ada4abfae0ce70dee234353648e8 +++ src/GuitoneCore.cpp fad92ebfe422feb6f2dd20195cc1b6641e0dad58 @@ -29,8 +29,8 @@ #include #include -GuitoneCore::GuitoneCore(int & argc, char** argv, QApplication::Type type) - : QApplication(argc, argv, type), monotoneManager(0) +GuitoneCore::GuitoneCore(int & argc, char ** argv) + : QApplication(argc, argv), monotoneManager(0) { #ifndef Q_WS_MACX updateDialog = 0; ============================================================ --- src/GuitoneCore.h 1a12a556d0277cd0b796653e7db3af726352a523 +++ src/GuitoneCore.h 66587547a89b3d1501a46a48b91001522b610ffc @@ -32,7 +32,7 @@ public: { Q_OBJECT public: - GuitoneCore(int &, char**, QApplication::Type); + GuitoneCore(int &, char **); ~GuitoneCore(); inline MonotoneManager * manager() { return monotoneManager; } ============================================================ --- src/GuitoneDriver.cpp 425b1ad3ec9d37453807d17761df4cafd4f45dd0 +++ src/GuitoneDriver.cpp d4441384aad7e8e44484f8a4b22c9744887ac7ea @@ -24,7 +24,7 @@ GuitoneDriver::GuitoneDriver(int & argc, #include "WorkspaceDialogManager.h" GuitoneDriver::GuitoneDriver(int & argc, char** argv) - : GuitoneCore(argc, argv, QApplication::GuiClient), dialogManager(0) + : GuitoneCore(argc, argv), dialogManager(0) { connect( this, SIGNAL(monotoneBinaryPathSet()), ============================================================ --- src/GuitoneStandalone.cpp 8f682fe3e52514f8300b20adb8ef161cae3756b9 +++ src/GuitoneStandalone.cpp 50b0c665667b9d8f90c033cc0658b70fbcd6aab7 @@ -28,10 +28,30 @@ #include #include +#ifdef Q_WS_MACX +#include +#endif + GuitoneStandalone::GuitoneStandalone(int & argc, char** argv) - : GuitoneCore(argc, argv, QApplication::GuiClient), + : GuitoneCore(argc, argv), openPrompt(0), somethingLoaded(false) { +#ifdef Q_WS_MACX + // this is kind of backwards, but there is no other way to do it: + // to hide an application from the doc on Mac OS X, you have to + // set LSUIElement to 1 in its Info.plist - this is done globally + // for guitone so we don't get an application menu if we're running + // in driver mode; however this also hides the app in standalone mode! + // so, as a little trick we're doing what Qt does inside + // qapplication_mac.cpp: we're explicitely foregrounding the + // standalone version, and therefor ignoring the plist setting + ProcessSerialNumber psn; + if (GetCurrentProcess(&psn) == noErr) + { + TransformProcessType(&psn, kProcessTransformToForegroundApplication); + } +#endif + setQuitOnLastWindowClosed(false); connect(