Disable commandline parsing for Windows, it don't work

This commit is contained in:
Jonathan Corwin 2011-03-28 21:46:31 +01:00
parent 2cce748d20
commit 221fa3b8b6
2 changed files with 7 additions and 1 deletions

View File

@ -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()

View File

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