src/eric7/Toolbox/Startup.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9448
ea215f7afab3
--- a/src/eric7/Toolbox/Startup.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/Toolbox/Startup.py	Tue Oct 18 16:06:21 2022 +0200
@@ -13,11 +13,11 @@
 from PyQt6.QtCore import QTranslator, QLocale, QLibraryInfo, QDir
 from PyQt6.QtWidgets import QApplication
 
-from EricWidgets.EricApplication import EricApplication
+from eric7.EricWidgets.EricApplication import EricApplication
 
-import Globals
+from eric7 import Globals
 
-import UI.PixmapCache
+from eric7.EricGui import EricPixmapCache
 
 from eric7config import getConfig
 
@@ -120,16 +120,16 @@
     @param application reference to the application object
     @type EricApplication
     """
-    import Preferences
+    from eric7 import Preferences
 
     defaultIconPaths = getDefaultIconPaths(application)
     iconPaths = Preferences.getIcons("Path")
     for iconPath in iconPaths:
         if iconPath:
-            UI.PixmapCache.addSearchPath(iconPath)
+            EricPixmapCache.addSearchPath(iconPath)
     for defaultIconPath in defaultIconPaths:
         if defaultIconPath not in iconPaths:
-            UI.PixmapCache.addSearchPath(defaultIconPath)
+            EricPixmapCache.addSearchPath(defaultIconPath)
 
 
 def getDefaultIconPaths(application):
@@ -141,7 +141,7 @@
     @return list of default icon paths
     @rtype list of str
     """
-    import Preferences
+    from eric7 import Preferences
 
     defaultIconsPath = Preferences.getIcons("DefaultIconsPath")
     if defaultIconsPath == "automatic":
@@ -190,7 +190,7 @@
         be loaded (tuple of strings)
     @return the requested locale (string)
     """
-    import Preferences
+    from eric7 import Preferences
 
     global loaded_translators
 
@@ -276,13 +276,13 @@
     app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
 
     # the following code depends upon a valid application object
-    import Preferences
+    from eric7 import Preferences
 
     # set the application style sheet
     app.setStyleSheetFile(Preferences.getUI("StyleSheet"))
 
     initializeResourceSearchPath(app)
-    QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric"))
+    QApplication.setWindowIcon(EricPixmapCache.getIcon("eric"))
 
     qtTransDir = Preferences.getQtTranslationsDir()
     if not qtTransDir:
@@ -302,7 +302,7 @@
 
     if installErrorHandler:
         # generate a graphical error handler
-        from EricWidgets import EricErrorMessage
+        from eric7.EricWidgets import EricErrorMessage
 
         eMsg = EricErrorMessage.qtHandler()
         eMsg.setMinimumSize(600, 400)

eric ide

mercurial