4901 if not ext: |
4901 if not ext: |
4902 ex = selectedFilter.split("(*")[1].split(")")[0] |
4902 ex = selectedFilter.split("(*")[1].split(")")[0] |
4903 if ex: |
4903 if ex: |
4904 fn += ex |
4904 fn += ex |
4905 |
4905 |
4906 res = Shortcuts.exportShortcuts(fn) |
4906 Shortcuts.exportShortcuts(fn) |
4907 if not res: |
|
4908 E5MessageBox.critical(self, |
|
4909 self.trUtf8("Export Keyboard Shortcuts"), |
|
4910 self.trUtf8("<p>The keyboard shortcuts could not be written to file" |
|
4911 " <b>{0}</b>.</p>").format(fn)) |
|
4912 |
4907 |
4913 def __importShortcuts(self): |
4908 def __importShortcuts(self): |
4914 """ |
4909 """ |
4915 Private slot to import the keyboard shortcuts. |
4910 Private slot to import the keyboard shortcuts. |
4916 """ |
4911 """ |
5051 return |
5046 return |
5052 f = QFile(fn) |
5047 f = QFile(fn) |
5053 if f.open(QIODevice.ReadOnly): |
5048 if f.open(QIODevice.ReadOnly): |
5054 reader = TasksReader(f, viewer = self.taskViewer) |
5049 reader = TasksReader(f, viewer = self.taskViewer) |
5055 reader.readXML() |
5050 reader.readXML() |
|
5051 f.close() |
5056 else: |
5052 else: |
5057 E5MessageBox.critical(self, |
5053 E5MessageBox.critical(self, |
5058 self.trUtf8("Read tasks"), |
5054 self.trUtf8("Read tasks"), |
5059 self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>") |
5055 self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>") |
5060 .format(fn)) |
5056 .format(fn)) |