From bcc84911b87e19f00679caa2acb19decd56ec167 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Sun, 11 Jul 2010 19:20:21 +0000 Subject: [PATCH] Hack out silly mac command line when Clementine is opened via "open" or GUI. --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 0f3be71a3..055d7c952 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -85,6 +85,14 @@ int main(int argc, char *argv[]) { // Do Mac specific startup to get media keys working. // This must go before QApplication initialisation. mac::MacMain(); + + // Strip mac command line option. + for (int i = 0; i < argc; ++i) { + QString arg(argv[i]); + if (arg.startsWith("-psn")) { + argv[i][0] = '\0'; + } + } #endif QCoreApplication::setApplicationName("Clementine");