70 def __initAction(self): |
70 def __initAction(self): |
71 """ |
71 """ |
72 Private method to initialize the action. |
72 Private method to initialize the action. |
73 """ |
73 """ |
74 self.action = E5Action( |
74 self.action = E5Action( |
75 self.trUtf8('QFileDialog Wizard'), |
75 self.tr('QFileDialog Wizard'), |
76 self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, |
76 self.tr('Q&FileDialog Wizard...'), 0, 0, self, |
77 'wizards_qfiledialog') |
77 'wizards_qfiledialog') |
78 self.action.setStatusTip(self.trUtf8('QFileDialog Wizard')) |
78 self.action.setStatusTip(self.tr('QFileDialog Wizard')) |
79 self.action.setWhatsThis(self.trUtf8( |
79 self.action.setWhatsThis(self.tr( |
80 """<b>QFileDialog Wizard</b>""" |
80 """<b>QFileDialog Wizard</b>""" |
81 """<p>This wizard opens a dialog for entering all the parameters""" |
81 """<p>This wizard opens a dialog for entering all the parameters""" |
82 """ needed to create a QFileDialog. The generated code is""" |
82 """ needed to create a QFileDialog. The generated code is""" |
83 """ inserted at the current cursor position.</p>""" |
83 """ inserted at the current cursor position.</p>""" |
84 )) |
84 )) |
128 editor = e5App().getObject("ViewManager").activeWindow() |
128 editor = e5App().getObject("ViewManager").activeWindow() |
129 |
129 |
130 if editor is None: |
130 if editor is None: |
131 E5MessageBox.critical( |
131 E5MessageBox.critical( |
132 self.__ui, |
132 self.__ui, |
133 self.trUtf8('No current editor'), |
133 self.tr('No current editor'), |
134 self.trUtf8('Please open or create a file first.')) |
134 self.tr('Please open or create a file first.')) |
135 else: |
135 else: |
136 code, ok = self.__callForm(editor) |
136 code, ok = self.__callForm(editor) |
137 if ok: |
137 if ok: |
138 line, index = editor.getCursorPosition() |
138 line, index = editor.getCursorPosition() |
139 # It should be done on this way to allow undo |
139 # It should be done on this way to allow undo |