Hack out silly mac command line when Clementine is opened via "open" or GUI.

This commit is contained in:
John Maguire 2010-07-11 19:20:21 +00:00
parent aa2d69f1bf
commit bcc84911b8
1 changed files with 8 additions and 0 deletions

View File

@ -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");