Plugins/PluginWizardE5MessageBox.py

changeset 3190
a9a94491c4fd
parent 3180
2ed66f1e69fd
child 3345
071afe8be2a1
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
66 def __initAction(self): 66 def __initAction(self):
67 """ 67 """
68 Private method to initialize the action. 68 Private method to initialize the action.
69 """ 69 """
70 self.action = E5Action( 70 self.action = E5Action(
71 self.trUtf8('E5MessageBox Wizard'), 71 self.tr('E5MessageBox Wizard'),
72 self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self, 72 self.tr('&E5MessageBox Wizard...'), 0, 0, self,
73 'wizards_e5messagebox') 73 'wizards_e5messagebox')
74 self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard')) 74 self.action.setStatusTip(self.tr('E5MessageBox Wizard'))
75 self.action.setWhatsThis(self.trUtf8( 75 self.action.setWhatsThis(self.tr(
76 """<b>E5MessageBox Wizard</b>""" 76 """<b>E5MessageBox Wizard</b>"""
77 """<p>This wizard opens a dialog for entering all the parameters""" 77 """<p>This wizard opens a dialog for entering all the parameters"""
78 """ needed to create an E5MessageBox. The generated code is""" 78 """ needed to create an E5MessageBox. The generated code is"""
79 """ inserted at the current cursor position.</p>""" 79 """ inserted at the current cursor position.</p>"""
80 )) 80 ))
118 editor = e5App().getObject("ViewManager").activeWindow() 118 editor = e5App().getObject("ViewManager").activeWindow()
119 119
120 if editor is None: 120 if editor is None:
121 E5MessageBox.critical( 121 E5MessageBox.critical(
122 self.__ui, 122 self.__ui,
123 self.trUtf8('No current editor'), 123 self.tr('No current editor'),
124 self.trUtf8('Please open or create a file first.')) 124 self.tr('Please open or create a file first.'))
125 else: 125 else:
126 code, ok = self.__callForm(editor) 126 code, ok = self.__callForm(editor)
127 if ok: 127 if ok:
128 line, index = editor.getCursorPosition() 128 line, index = editor.getCursorPosition()
129 # It should be done on this way to allow undo 129 # It should be done on this way to allow undo

eric ide

mercurial