eric7/CondaInterface/CondaExportDialog.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8327
666c2b81cbb7
child 8358
144a6b854f70
diff -r 8a7677a63c8d -r 68ec9c3d4de5 eric7/CondaInterface/CondaExportDialog.py
--- a/eric7/CondaInterface/CondaExportDialog.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/CondaInterface/CondaExportDialog.py	Sat May 22 18:51:46 2021 +0200
@@ -14,10 +14,10 @@
     QDialog, QDialogButtonBox, QAbstractButton, QApplication
 )
 
-from E5Gui import E5MessageBox, E5FileDialog
-from E5Gui.E5PathPicker import E5PathPickerModes
-from E5Gui.E5Application import e5App
-from E5Gui.E5OverrideCursor import E5OverrideCursor
+from E5Gui import EricMessageBox, EricFileDialog
+from E5Gui.EricPathPicker import EricPathPickerModes
+from E5Gui.EricApplication import ericApp
+from E5Gui.EricOverrideCursor import EricOverrideCursor
 
 from .Ui_CondaExportDialog import Ui_CondaExportDialog
 
@@ -48,7 +48,7 @@
         self.__refreshButton = self.buttonBox.addButton(
             self.tr("&Refresh"), QDialogButtonBox.ButtonRole.ActionRole)
         
-        self.requirementsFilePicker.setMode(E5PathPickerModes.SAVE_FILE_MODE)
+        self.requirementsFilePicker.setMode(EricPathPickerModes.SAVE_FILE_MODE)
         self.requirementsFilePicker.setFilters(
             self.tr("Text Files (*.txt);;All Files (*)"))
         
@@ -108,7 +108,7 @@
         Private slot to refresh the displayed list.
         """
         ok = (
-            E5MessageBox.yesNo(
+            EricMessageBox.yesNo(
                 self,
                 self.tr("Generate Requirements"),
                 self.tr("""The requirements were changed. Do you want"""
@@ -133,7 +133,7 @@
             self.__prefix,
         ]
         
-        with E5OverrideCursor():
+        with EricOverrideCursor():
             success, output = self.__conda.runProcess(args)
             
             if success:
@@ -158,7 +158,7 @@
         self.saveToButton.setEnabled(self.__requirementsAvailable)
         self.copyButton.setEnabled(self.__requirementsAvailable)
         
-        aw = e5App().getObject("ViewManager").activeWindow()
+        aw = ericApp().getObject("ViewManager").activeWindow()
         if aw and self.__requirementsAvailable:
             self.insertButton.setEnabled(True)
             self.replaceAllButton.setEnabled(True)
@@ -177,7 +177,7 @@
         @type str
         """
         if os.path.exists(fileName):
-            ok = E5MessageBox.warning(
+            ok = EricMessageBox.warning(
                 self,
                 self.tr("Generate Requirements"),
                 self.tr("""The file <b>{0}</b> already exists. Do you want"""
@@ -189,7 +189,7 @@
             with open(fileName, "w") as f:
                 f.write(self.requirementsEdit.toPlainText())
         except OSError as err:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Generate Requirements"),
                 self.tr("""<p>The requirements could not be written"""
@@ -209,13 +209,13 @@
         """
         Private slot to write the requirements text to a new file.
         """
-        fileName, selectedFilter = E5FileDialog.getSaveFileNameAndFilter(
+        fileName, selectedFilter = EricFileDialog.getSaveFileNameAndFilter(
             self,
             self.tr("Generate Requirements"),
             os.path.expanduser("~"),
             self.tr("Text Files (*.txt);;All Files (*)"),
             None,
-            E5FileDialog.DontConfirmOverwrite
+            EricFileDialog.DontConfirmOverwrite
         )
         if fileName:
             ext = os.path.splitext(fileName)[1]
@@ -240,7 +240,7 @@
         Private slot to insert the requirements text at the cursor position
         of the current editor.
         """
-        aw = e5App().getObject("ViewManager").activeWindow()
+        aw = ericApp().getObject("ViewManager").activeWindow()
         if aw:
             aw.beginUndoAction()
             cline, cindex = aw.getCursorPosition()
@@ -253,7 +253,7 @@
         Private slot to replace the selected text of the current editor
         with the requirements text.
         """
-        aw = e5App().getObject("ViewManager").activeWindow()
+        aw = ericApp().getObject("ViewManager").activeWindow()
         if aw:
             aw.beginUndoAction()
             aw.replaceSelectedText(self.requirementsEdit.toPlainText())
@@ -265,6 +265,6 @@
         Private slot to replace the text of the current editor with the
         requirements text.
         """
-        aw = e5App().getObject("ViewManager").activeWindow()
+        aw = ericApp().getObject("ViewManager").activeWindow()
         if aw:
             aw.setText(self.requirementsEdit.toPlainText())

eric ide

mercurial