eric7/Plugins/PluginWizardDotDesktop.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
--- a/eric7/Plugins/PluginWizardDotDesktop.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Plugins/PluginWizardDotDesktop.py	Sat May 22 18:51:46 2021 +0200
@@ -10,9 +10,9 @@
 from PyQt6.QtCore import QObject
 from PyQt6.QtWidgets import QDialog
 
-from E5Gui.E5Application import e5App
-from E5Gui.E5Action import E5Action
-from E5Gui import E5MessageBox
+from E5Gui.EricApplication import ericApp
+from E5Gui.EricAction import EricAction
+from E5Gui import EricMessageBox
 
 import UI.Info
 
@@ -74,13 +74,13 @@
         menu = self.__ui.getMenu("wizards")
         if menu:
             menu.removeAction(self.__action)
-        self.__ui.removeE5Actions([self.__action], 'wizards')
+        self.__ui.removeEricActions([self.__action], 'wizards')
     
     def __initAction(self):
         """
         Private method to initialize the action.
         """
-        self.__action = E5Action(
+        self.__action = EricAction(
             self.tr('.desktop Wizard'),
             self.tr('.&desktop Wizard...'),
             0, 0, self,
@@ -95,7 +95,7 @@
         ))
         self.__action.triggered.connect(self.__handle)
         
-        self.__ui.addE5Actions([self.__action], 'wizards')
+        self.__ui.addEricActions([self.__action], 'wizards')
 
     def __initMenu(self):
         """
@@ -109,24 +109,24 @@
         """
         Private method to handle the wizards action.
         """
-        editor = e5App().getObject("ViewManager").activeWindow()
+        editor = ericApp().getObject("ViewManager").activeWindow()
         
         if editor is None:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self.__ui,
                 self.tr('No current editor'),
                 self.tr('Please open or create a file first.'))
         else:
             if editor.text():
-                ok = E5MessageBox.yesNo(
+                ok = EricMessageBox.yesNo(
                     self.__ui,
                     self.tr(".desktop Wizard"),
                     self.tr("""The current editor contains text."""
                             """ Shall this be replaced?"""),
-                    icon=E5MessageBox.Critical)
+                    icon=EricMessageBox.Critical)
                 if not ok:
-                    e5App().getObject("ViewManager").newEditor()
-                    editor = e5App().getObject("ViewManager").activeWindow()
+                    ericApp().getObject("ViewManager").newEditor()
+                    editor = ericApp().getObject("ViewManager").activeWindow()
             
             from WizardPlugins.DotDesktopWizard.DotDesktopWizardDialog import (
                 DotDesktopWizardDialog

eric ide

mercurial