src/eric7/Tools/TrayStarter.py

branch
eric7
changeset 9413
80c06d472826
parent 9377
b9c8dc3b7da1
child 9473
3f23dbf37dbe
--- a/src/eric7/Tools/TrayStarter.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/Tools/TrayStarter.py	Tue Oct 18 16:06:21 2022 +0200
@@ -16,15 +16,12 @@
 from PyQt6.QtGui import QCursor
 from PyQt6.QtWidgets import QSystemTrayIcon, QMenu, QDialog, QApplication
 
-from EricWidgets import EricMessageBox
-from EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets import EricMessageBox
+from eric7.EricWidgets.EricApplication import ericApp
 
-import Globals
-import UI.PixmapCache
-from UI.Info import Version, Program
-
-import Utilities
-import Preferences
+from eric7 import Globals, Preferences, Utilities
+from eric7.EricGui import EricPixmapCache
+from eric7.UI.Info import Version, Program
 
 
 class TrayStarter(QSystemTrayIcon):
@@ -40,7 +37,7 @@
         @type str
         """
         super().__init__(
-            UI.PixmapCache.getIcon(Preferences.getTrayStarter("TrayStarterIcon"))
+            EricPixmapCache.getIcon(Preferences.getTrayStarter("TrayStarterIcon"))
         )
 
         self.settingsDir = settingsDir
@@ -97,111 +94,111 @@
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("uiPreviewer"),
+            EricPixmapCache.getIcon("uiPreviewer"),
             self.tr("UI Previewer"),
             self.__startUIPreviewer,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("trPreviewer"),
+            EricPixmapCache.getIcon("trPreviewer"),
             self.tr("Translations Previewer"),
             self.__startTRPreviewer,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("unittest"), self.tr("Testing"), self.__startTesting
+            EricPixmapCache.getIcon("unittest"), self.tr("Testing"), self.__startTesting
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("diffFiles"),
+            EricPixmapCache.getIcon("diffFiles"),
             self.tr("Compare Files"),
             self.__startDiff,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("compareFiles"),
+            EricPixmapCache.getIcon("compareFiles"),
             self.tr("Compare Files side by side"),
             self.__startCompare,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("sqlBrowser"),
+            EricPixmapCache.getIcon("sqlBrowser"),
             self.tr("SQL Browser"),
             self.__startSqlBrowser,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("ericSnap"),
+            EricPixmapCache.getIcon("ericSnap"),
             self.tr("Snapshot"),
             self.__startSnapshot,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("iconEditor"),
+            EricPixmapCache.getIcon("iconEditor"),
             self.tr("Icon Editor"),
             self.__startIconEditor,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("pluginInstall"),
+            EricPixmapCache.getIcon("pluginInstall"),
             self.tr("Install Plugin"),
             self.__startPluginInstall,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("pluginUninstall"),
+            EricPixmapCache.getIcon("pluginUninstall"),
             self.tr("Uninstall Plugin"),
             self.__startPluginUninstall,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("pluginRepository"),
+            EricPixmapCache.getIcon("pluginRepository"),
             self.tr("Plugin Repository"),
             self.__startPluginRepository,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("virtualenv"),
+            EricPixmapCache.getIcon("virtualenv"),
             self.tr("Virtual Environments"),
             self.__startVirtualenvManager,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("configure"),
+            EricPixmapCache.getIcon("configure"),
             self.tr("Preferences"),
             self.__startPreferences,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("editor"),
+            EricPixmapCache.getIcon("editor"),
             self.tr("eric Mini Editor"),
             self.__startMiniEditor,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("hexEditor"),
+            EricPixmapCache.getIcon("hexEditor"),
             self.tr("eric Hex Editor"),
             self.__startHexEditor,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("shell"),
+            EricPixmapCache.getIcon("shell"),
             self.tr("eric Shell Window"),
             self.__startShell,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("ericWeb"),
+            EricPixmapCache.getIcon("ericWeb"),
             self.tr("eric Web Browser"),
             self.__startWebBrowser,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("ericWeb"),
+            EricPixmapCache.getIcon("ericWeb"),
             self.tr("eric Web Browser (with QtHelp)"),
             self.__startWebBrowserQtHelp,
         )
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("ericWeb"),
+            EricPixmapCache.getIcon("ericWeb"),
             self.tr("eric Web Browser (Private Mode)"),
             self.__startWebBrowserPrivate,
         )
@@ -218,19 +215,19 @@
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("erict"), self.tr("eric IDE"), self.__startEric
+            EricPixmapCache.getIcon("erict"), self.tr("eric IDE"), self.__startEric
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("configure"),
+            EricPixmapCache.getIcon("configure"),
             self.tr("Configure Tray Starter"),
             self.__showPreferences,
         )
         self.__menu.addSeparator()
 
         self.__menu.addAction(
-            UI.PixmapCache.getIcon("exit"), self.tr("Quit"), ericApp().quit
+            EricPixmapCache.getIcon("exit"), self.tr("Quit"), ericApp().quit
         )
 
     def __loadRecentProjects(self):
@@ -534,7 +531,7 @@
         """
         Private slot to set the preferences.
         """
-        from Preferences.ConfigurationDialog import (
+        from eric7.Preferences.ConfigurationDialog import (
             ConfigurationDialog,
             ConfigurationMode,
         )
@@ -561,14 +558,14 @@
         Public slot to handle a change of preferences.
         """
         self.setIcon(
-            UI.PixmapCache.getIcon(Preferences.getTrayStarter("TrayStarterIcon"))
+            EricPixmapCache.getIcon(Preferences.getTrayStarter("TrayStarterIcon"))
         )
 
     def __about(self):
         """
         Private slot to handle the About dialog.
         """
-        from Plugins.AboutPlugin.AboutDialog import AboutDialog
+        from eric7.Plugins.AboutPlugin.AboutDialog import AboutDialog
 
         dlg = AboutDialog()
         dlg.exec()
@@ -612,7 +609,7 @@
 
         # webengine (chromium) version
         with contextlib.suppress(ImportError):
-            from WebBrowser.Tools import WebBrowserTools
+            from eric7.WebBrowser.Tools import WebBrowserTools
 
             (
                 chromiumVersion,

eric ide

mercurial