6 """ |
6 """ |
7 Module implementing the QFontDialog wizard plugin. |
7 Module implementing the QFontDialog wizard plugin. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import QObject |
10 from PyQt4.QtCore import QObject |
11 from PyQt4.QtGui import QDialog, QMessageBox |
11 from PyQt4.QtGui import QDialog |
12 |
12 |
13 from E5Gui.E5Application import e5App |
13 from E5Gui.E5Application import e5App |
14 from E5Gui.E5Action import E5Action |
14 from E5Gui.E5Action import E5Action |
|
15 from E5Gui import E5MessageBox |
15 |
16 |
16 from WizardPlugins.FontDialogWizard.FontDialogWizardDialog import \ |
17 from WizardPlugins.FontDialogWizard.FontDialogWizardDialog import \ |
17 FontDialogWizardDialog |
18 FontDialogWizardDialog |
18 |
19 |
19 # Start-Of-Header |
20 # Start-Of-Header |
114 Private method to handle the wizards action |
115 Private method to handle the wizards action |
115 """ |
116 """ |
116 editor = e5App().getObject("ViewManager").activeWindow() |
117 editor = e5App().getObject("ViewManager").activeWindow() |
117 |
118 |
118 if editor == None: |
119 if editor == None: |
119 QMessageBox.critical(None, |
120 E5MessageBox.critical(self.__ui, |
120 self.trUtf8('No current editor'), |
121 self.trUtf8('No current editor'), |
121 self.trUtf8('Please open or create a file first.')) |
122 self.trUtf8('Please open or create a file first.')) |
122 else: |
123 else: |
123 code, ok = self.__callForm(editor) |
124 code, ok = self.__callForm(editor) |
124 if ok: |
125 if ok: |