From 221fa3b8b6a086f44d36f7d04c984c492b473a00 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Mon, 28 Mar 2011 21:46:31 +0100 Subject: [PATCH] Disable commandline parsing for Windows, it don't work --- openlp.pyw | 2 ++ openlp/core/ui/mainwindow.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openlp.pyw b/openlp.pyw index c9c5294b5..ca61cbcf4 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -116,6 +116,8 @@ class OpenLP(QtGui.QApplication): # make sure Qt really display the splash screen self.processEvents() # start the main app window + print self.applicationFilePath() + print self.arguments()[1] self.mainWindow = MainWindow(screens, self.clipboard(), self.arguments()) self.mainWindow.show() diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 2dc42da95..d5b5957be 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -663,7 +663,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): if self.liveController.display.isVisible(): self.liveController.display.setFocus() self.activateWindow() - if len(self.arguments) > 0: + # On Windows, arguments contains the entire commandline + # So args[0]=='python' args[1]=='openlp.pyw' + # Therefore this approach is not going to work + # Bypass for now. + if len(self.arguments) and os.name != u'nt': args = [] for a in self.arguments: args.extend([a])