eric7/Project/ProjectResourcesBrowser.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8336
d566c2970f39
child 8358
144a6b854f70
diff -r 8a7677a63c8d -r 68ec9c3d4de5 eric7/Project/ProjectResourcesBrowser.py
--- a/eric7/Project/ProjectResourcesBrowser.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Project/ProjectResourcesBrowser.py	Sat May 22 18:51:46 2021 +0200
@@ -13,9 +13,9 @@
 from PyQt6.QtCore import QThread, QFileInfo, pyqtSignal, QProcess
 from PyQt6.QtWidgets import QDialog, QApplication, QMenu
 
-from E5Gui.E5Application import e5App
-from E5Gui import E5MessageBox, E5FileDialog
-from E5Gui.E5ProgressDialog import E5ProgressDialog
+from E5Gui.EricApplication import ericApp
+from E5Gui import EricMessageBox, EricFileDialog
+from E5Gui.EricProgressDialog import EricProgressDialog
 
 from .ProjectBrowserModel import (
     ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem,
@@ -465,13 +465,13 @@
         if self.hooks["newResource"] is not None:
             self.hooks["newResource"](path)
         else:
-            fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter(
+            fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter(
                 self,
                 self.tr("New Resource"),
                 path,
                 self.tr("Qt Resource Files (*.qrc)"),
                 "",
-                E5FileDialog.DontConfirmOverwrite)
+                EricFileDialog.DontConfirmOverwrite)
             
             if not fname:
                 # user aborted or didn't enter a filename
@@ -484,11 +484,11 @@
                     fname += ex
             
             if os.path.exists(fname):
-                res = E5MessageBox.yesNo(
+                res = EricMessageBox.yesNo(
                     self,
                     self.tr("New Resource"),
                     self.tr("The file already exists! Overwrite it?"),
-                    icon=E5MessageBox.Warning)
+                    icon=EricMessageBox.Warning)
                 if not res:
                     # user selected to not overwrite
                     return
@@ -504,7 +504,7 @@
                     rcfile.write('</qresource>\n')
                     rcfile.write('</RCC>\n')
             except OSError as e:
-                E5MessageBox.critical(
+                EricMessageBox.critical(
                     self,
                     self.tr("New Resource"),
                     self.tr(
@@ -590,8 +590,8 @@
         @param exitStatus exit status of the process (QProcess.ExitStatus)
         """
         self.compileRunning = False
-        e5App().getObject("ViewManager").enableEditorsCheckFocusIn(True)
-        ui = e5App().getObject("UserInterface")
+        ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True)
+        ui = ericApp().getObject("UserInterface")
         if (
             exitStatus == QProcess.ExitStatus.NormalExit and
             exitCode == 0 and
@@ -613,7 +613,7 @@
                             " was successful."))
             except OSError as msg:
                 if not self.noDialog:
-                    E5MessageBox.information(
+                    EricMessageBox.information(
                         self,
                         self.tr("Resource Compilation"),
                         self.tr(
@@ -701,13 +701,13 @@
         procStarted = self.compileProc.waitForStarted(5000)
         if procStarted:
             self.compileRunning = True
-            e5App().getObject("ViewManager").enableEditorsCheckFocusIn(False)
+            ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(False)
             return self.compileProc
         else:
             self.compileRunning = False
             if progress is not None:
                 progress.cancel()
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
                 self.tr(
@@ -736,7 +736,7 @@
             self.hooks["compileAllResources"](self.project.pdata["RESOURCES"])
         else:
             numResources = len(self.project.pdata["RESOURCES"])
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Compiling resources..."),
                 self.tr("Abort"), 0, numResources,
                 self.tr("%v/%m Resources"), self)
@@ -770,7 +770,7 @@
             self.hooks["compileSelectedResources"](files)
         else:
             numResources = len(files)
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Compiling resources..."),
                 self.tr("Abort"), 0, numResources,
                 self.tr("%v/%m Resources"), self)
@@ -841,7 +841,7 @@
             self.hooks["compileChangedResources"](
                 self.project.pdata["RESOURCES"])
         else:
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Determining changed resources..."),
                 self.tr("Abort"), 0, 100, self.tr("%v/%m Resources"))
             progress.setMinimumDuration(0)

eric ide

mercurial