Plugins/PluginWizardE5MessageBox.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3020
542e97d4ecb3
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
67 67
68 def __initAction(self): 68 def __initAction(self):
69 """ 69 """
70 Private method to initialize the action. 70 Private method to initialize the action.
71 """ 71 """
72 self.action = E5Action(self.trUtf8('E5MessageBox Wizard'), 72 self.action = E5Action(
73 self.trUtf8('E5MessageBox Wizard'),
73 self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self, 74 self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self,
74 'wizards_e5messagebox') 75 'wizards_e5messagebox')
75 self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard')) 76 self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard'))
76 self.action.setWhatsThis(self.trUtf8( 77 self.action.setWhatsThis(self.trUtf8(
77 """<b>E5MessageBox Wizard</b>""" 78 """<b>E5MessageBox Wizard</b>"""
117 Private method to handle the wizards action. 118 Private method to handle the wizards action.
118 """ 119 """
119 editor = e5App().getObject("ViewManager").activeWindow() 120 editor = e5App().getObject("ViewManager").activeWindow()
120 121
121 if editor == None: 122 if editor == None:
122 E5MessageBox.critical(self.__ui, 123 E5MessageBox.critical(
123 self.trUtf8('No current editor'), 124 self.__ui,
124 self.trUtf8('Please open or create a file first.')) 125 self.trUtf8('No current editor'),
126 self.trUtf8('Please open or create a file first.'))
125 else: 127 else:
126 code, ok = self.__callForm(editor) 128 code, ok = self.__callForm(editor)
127 if ok: 129 if ok:
128 line, index = editor.getCursorPosition() 130 line, index = editor.getCursorPosition()
129 # It should be done on this way to allow undo 131 # It should be done on this way to allow undo

eric ide

mercurial