Plugins/PluginWizardE5MessageBox.py

changeset 3020
542e97d4ecb3
parent 3004
c4bf32c791d0
child 3034
7ce719013078
child 3058
0a02c433f52d
equal deleted inserted replaced
3019:7912530a33e2 3020:542e97d4ecb3
65 65
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(self.trUtf8('E5MessageBox Wizard'), 70 self.action = E5Action(
71 self.trUtf8('E5MessageBox Wizard'),
71 self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self, 72 self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self,
72 'wizards_e5messagebox') 73 'wizards_e5messagebox')
73 self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard')) 74 self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard'))
74 self.action.setWhatsThis(self.trUtf8( 75 self.action.setWhatsThis(self.trUtf8(
75 """<b>E5MessageBox Wizard</b>""" 76 """<b>E5MessageBox Wizard</b>"""
115 Private method to handle the wizards action. 116 Private method to handle the wizards action.
116 """ 117 """
117 editor = e5App().getObject("ViewManager").activeWindow() 118 editor = e5App().getObject("ViewManager").activeWindow()
118 119
119 if editor == None: 120 if editor == None:
120 E5MessageBox.critical(self.__ui, 121 E5MessageBox.critical(
121 self.trUtf8('No current editor'), 122 self.__ui,
122 self.trUtf8('Please open or create a file first.')) 123 self.trUtf8('No current editor'),
124 self.trUtf8('Please open or create a file first.'))
123 else: 125 else:
124 code, ok = self.__callForm(editor) 126 code, ok = self.__callForm(editor)
125 if ok: 127 if ok:
126 line, index = editor.getCursorPosition() 128 line, index = editor.getCursorPosition()
127 # It should be done on this way to allow undo 129 # It should be done on this way to allow undo

eric ide

mercurial