forked from openlp/openlp
Modify loading file from the command line to only load files ending with osz, oszl, or otz.
This commit is contained in:
parent
6ca37531a0
commit
d26b34aee0
@ -597,9 +597,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow, RegistryProperties):
|
|||||||
args = []
|
args = []
|
||||||
for a in self.arguments:
|
for a in self.arguments:
|
||||||
args.extend([a])
|
args.extend([a])
|
||||||
filename = args[0]
|
for arg in args:
|
||||||
|
filename = arg
|
||||||
if not isinstance(filename, str):
|
if not isinstance(filename, str):
|
||||||
filename = str(filename, sys.getfilesystemencoding())
|
filename = str(filename, sys.getfilesystemencoding())
|
||||||
|
if filename.endswith(('.osz', '.oszl', '.otz')):
|
||||||
self.service_manager_contents.load_file(filename)
|
self.service_manager_contents.load_file(filename)
|
||||||
elif Settings().value(self.general_settings_section + '/auto open'):
|
elif Settings().value(self.general_settings_section + '/auto open'):
|
||||||
self.service_manager_contents.load_Last_file()
|
self.service_manager_contents.load_Last_file()
|
||||||
|
Loading…
Reference in New Issue
Block a user