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])