134 |
134 |
135 def __handle(self): |
135 def __handle(self): |
136 """ |
136 """ |
137 Private method to handle the wizards action. |
137 Private method to handle the wizards action. |
138 """ |
138 """ |
|
139 from WizardDataUriEncoder.DataUriEncoderWizardDialog import ( |
|
140 DataUriEncoderWizardDialog, |
|
141 ) |
|
142 |
139 editor = ericApp().getObject("ViewManager").activeWindow() |
143 editor = ericApp().getObject("ViewManager").activeWindow() |
140 |
144 |
141 if editor is None: |
145 if editor is None: |
142 EricMessageBox.critical( |
146 EricMessageBox.critical( |
143 self.__ui, |
147 self.__ui, |
144 self.tr("No current editor"), |
148 self.tr("No current editor"), |
145 self.tr("Please open or create a file first."), |
149 self.tr("Please open or create a file first."), |
146 ) |
150 ) |
147 else: |
151 else: |
148 from WizardDataUriEncoder.DataUriEncoderWizardDialog import ( |
|
149 DataUriEncoderWizardDialog, |
|
150 ) |
|
151 |
|
152 dlg = DataUriEncoderWizardDialog(None) |
152 dlg = DataUriEncoderWizardDialog(None) |
153 if dlg.exec() == QDialog.DialogCode.Accepted: |
153 if dlg.exec() == QDialog.DialogCode.Accepted: |
154 code = dlg.getCode() |
154 code = dlg.getCode() |
155 if code: |
155 if code: |
156 line, index = editor.getCursorPosition() |
156 line, index = editor.getCursorPosition() |