1151 @param args list of files to open<br /> |
1151 @param args list of files to open<br /> |
1152 The args are processed one at a time. All arguments after a |
1152 The args are processed one at a time. All arguments after a |
1153 '--' option are considered debug arguments to the program |
1153 '--' option are considered debug arguments to the program |
1154 for the debugger. All files named before the '--' option |
1154 for the debugger. All files named before the '--' option |
1155 are opened in a text editor, unless the argument ends in |
1155 are opened in a text editor, unless the argument ends in |
1156 .e4p or .e4pz, then it is opened as a project file. |
1156 .e4p, then it is opened as a project file. If it ends in |
1157 If it ends in .e4m or .e4mz, it is opened as a multiproject. |
1157 .e4m, it is opened as a multiproject. |
1158 """ |
1158 """ |
1159 # no args, return |
1159 # no args, return |
1160 if args is None: |
1160 if args is None: |
1161 if not self.__noOpenAtStartup: |
1161 if not self.__noOpenAtStartup: |
1162 self.__openOnStartup() |
1162 self.__openOnStartup() |
1193 continue |
1193 continue |
1194 |
1194 |
1195 ext = os.path.splitext(arg)[1] |
1195 ext = os.path.splitext(arg)[1] |
1196 ext = os.path.normcase(ext) |
1196 ext = os.path.normcase(ext) |
1197 |
1197 |
1198 if ext in ['.e4p', '.e4pz']: |
1198 if ext in ['.e4p']: |
1199 self.project.openProject(arg) |
1199 self.project.openProject(arg) |
1200 opens += 1 |
1200 opens += 1 |
1201 elif ext in ['.e4m', '.e4mz']: |
1201 elif ext in ['.e4m']: |
1202 self.multiProject.openMultiProject(arg) |
1202 self.multiProject.openMultiProject(arg) |
1203 opens += 1 |
1203 opens += 1 |
1204 else: |
1204 else: |
1205 self.viewmanager.openFiles(arg) |
1205 self.viewmanager.openFiles(arg) |
1206 opens += 1 |
1206 opens += 1 |
4883 """ |
4883 """ |
4884 fn, selectedFilter = QFileDialog.getSaveFileNameAndFilter( |
4884 fn, selectedFilter = QFileDialog.getSaveFileNameAndFilter( |
4885 None, |
4885 None, |
4886 self.trUtf8("Export Keyboard Shortcuts"), |
4886 self.trUtf8("Export Keyboard Shortcuts"), |
4887 "", |
4887 "", |
4888 self.trUtf8("Keyboard shortcut file (*.e4k);;" |
4888 self.trUtf8("Keyboard shortcut file (*.e4k)"), |
4889 "Compressed keyboard shortcut file (*.e4kz)"), |
|
4890 "", |
4889 "", |
4891 QFileDialog.Options(QFileDialog.DontConfirmOverwrite)) |
4890 QFileDialog.Options(QFileDialog.DontConfirmOverwrite)) |
4892 |
4891 |
4893 if not fn: |
4892 if not fn: |
4894 return |
4893 return |
4907 """ |
4906 """ |
4908 fn = QFileDialog.getOpenFileName( |
4907 fn = QFileDialog.getOpenFileName( |
4909 None, |
4908 None, |
4910 self.trUtf8("Import Keyboard Shortcuts"), |
4909 self.trUtf8("Import Keyboard Shortcuts"), |
4911 "", |
4910 "", |
4912 self.trUtf8("Keyboard shortcut file (*.e4k *.e4kz)")) |
4911 self.trUtf8("Keyboard shortcut file (*.e4k)")) |
4913 |
4912 |
4914 if fn: |
4913 if fn: |
4915 Shortcuts.importShortcuts(fn) |
4914 Shortcuts.importShortcuts(fn) |
4916 |
4915 |
4917 def __newProject(self): |
4916 def __newProject(self): |