src/eric7/Cooperation/ChatWidget.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/Cooperation/ChatWidget.py
--- a/src/eric7/Cooperation/ChatWidget.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/Cooperation/ChatWidget.py	Tue Oct 18 16:06:21 2022 +0200
@@ -13,17 +13,17 @@
 from PyQt6.QtGui import QColor
 from PyQt6.QtWidgets import QWidget, QListWidgetItem, QMenu, QApplication
 
-from EricWidgets.EricApplication import ericApp
-from EricWidgets import EricMessageBox, EricFileDialog
+from eric7.EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets import EricMessageBox, EricFileDialog
 
-from Globals import recentNameHosts
+from eric7.Globals import recentNameHosts
 
 from .CooperationClient import CooperationClient
 
 from .Ui_ChatWidget import Ui_ChatWidget
 
-import Preferences
-import UI.PixmapCache
+from eric7 import Preferences
+from eric7.EricGui import EricPixmapCache
 
 
 class ChatWidget(QWidget, Ui_ChatWidget):
@@ -59,10 +59,10 @@
         super().__init__(parent)
         self.setupUi(self)
 
-        self.shareButton.setIcon(UI.PixmapCache.getIcon("sharedEditDisconnected"))
-        self.startEditButton.setIcon(UI.PixmapCache.getIcon("sharedEditStart"))
-        self.sendEditButton.setIcon(UI.PixmapCache.getIcon("sharedEditSend"))
-        self.cancelEditButton.setIcon(UI.PixmapCache.getIcon("sharedEditCancel"))
+        self.shareButton.setIcon(EricPixmapCache.getIcon("sharedEditDisconnected"))
+        self.startEditButton.setIcon(EricPixmapCache.getIcon("sharedEditStart"))
+        self.sendEditButton.setIcon(EricPixmapCache.getIcon("sharedEditSend"))
+        self.cancelEditButton.setIcon(EricPixmapCache.getIcon("sharedEditCancel"))
 
         self.hostEdit.lineEdit().setClearButtonEnabled(True)
 
@@ -176,7 +176,7 @@
         self.chatEdit.setTextColor(color)
 
         QListWidgetItem(
-            UI.PixmapCache.getIcon(
+            EricPixmapCache.getIcon(
                 "chatUser{0}".format(1 + self.usersList.count() % 6)
             ),
             nick,
@@ -188,7 +188,7 @@
 
         if not self.isVisible():
             self.__ui.showNotification(
-                UI.PixmapCache.getPixmap("cooperation48"),
+                EricPixmapCache.getPixmap("cooperation48"),
                 self.tr("New User"),
                 self.tr("{0} has joined.").format(nick),
             )
@@ -221,7 +221,7 @@
 
         if not self.isVisible():
             self.__ui.showNotification(
-                UI.PixmapCache.getPixmap("cooperation48"),
+                EricPixmapCache.getPixmap("cooperation48"),
                 self.tr("User Left"),
                 self.tr("{0} has left.").format(nick),
             )
@@ -248,7 +248,7 @@
 
         if not self.isVisible():
             self.__ui.showNotification(
-                UI.PixmapCache.getPixmap("cooperation48"),
+                EricPixmapCache.getPixmap("cooperation48"),
                 self.tr("Message from <{0}>").format(from_),
                 message,
             )
@@ -407,7 +407,7 @@
         """
         self.editorCommand.emit(hashStr, fileName, message)
 
-        from QScintilla.Editor import Editor
+        from eric7.QScintilla.Editor import Editor
 
         if message.startswith(
             Editor.StartEditToken + Editor.Separator
@@ -425,9 +425,9 @@
         @param checked flag indicating the button state (boolean)
         """
         if checked:
-            self.shareButton.setIcon(UI.PixmapCache.getIcon("sharedEditConnected"))
+            self.shareButton.setIcon(EricPixmapCache.getIcon("sharedEditConnected"))
         else:
-            self.shareButton.setIcon(UI.PixmapCache.getIcon("sharedEditDisconnected"))
+            self.shareButton.setIcon(EricPixmapCache.getIcon("sharedEditDisconnected"))
         self.startEditButton.setEnabled(checked)
 
         self.shareEditor.emit(checked)
@@ -483,9 +483,9 @@
 
         self.shareButton.setChecked(sharing)
         if sharing:
-            self.shareButton.setIcon(UI.PixmapCache.getIcon("sharedEditConnected"))
+            self.shareButton.setIcon(EricPixmapCache.getIcon("sharedEditConnected"))
         else:
-            self.shareButton.setIcon(UI.PixmapCache.getIcon("sharedEditDisconnected"))
+            self.shareButton.setIcon(EricPixmapCache.getIcon("sharedEditDisconnected"))
         self.startEditButton.setChecked(editing)
 
         self.shareButton.setEnabled(shareable and not editing)
@@ -499,22 +499,22 @@
         """
         self.__chatMenu = QMenu(self)
         self.__copyChatAct = self.__chatMenu.addAction(
-            UI.PixmapCache.getIcon("editCopy"), self.tr("Copy"), self.__copyChat
+            EricPixmapCache.getIcon("editCopy"), self.tr("Copy"), self.__copyChat
         )
         self.__chatMenu.addSeparator()
         self.__cutAllChatAct = self.__chatMenu.addAction(
-            UI.PixmapCache.getIcon("editCut"), self.tr("Cut all"), self.__cutAllChat
+            EricPixmapCache.getIcon("editCut"), self.tr("Cut all"), self.__cutAllChat
         )
         self.__copyAllChatAct = self.__chatMenu.addAction(
-            UI.PixmapCache.getIcon("editCopy"), self.tr("Copy all"), self.__copyAllChat
+            EricPixmapCache.getIcon("editCopy"), self.tr("Copy all"), self.__copyAllChat
         )
         self.__chatMenu.addSeparator()
         self.__clearChatAct = self.__chatMenu.addAction(
-            UI.PixmapCache.getIcon("editDelete"), self.tr("Clear"), self.__clearChat
+            EricPixmapCache.getIcon("editDelete"), self.tr("Clear"), self.__clearChat
         )
         self.__chatMenu.addSeparator()
         self.__saveChatAct = self.__chatMenu.addAction(
-            UI.PixmapCache.getIcon("fileSave"), self.tr("Save"), self.__saveChat
+            EricPixmapCache.getIcon("fileSave"), self.tr("Save"), self.__saveChat
         )
 
         self.on_chatEdit_copyAvailable(False)
@@ -625,15 +625,15 @@
         """
         self.__usersMenu = QMenu(self)
         self.__kickUserAct = self.__usersMenu.addAction(
-            UI.PixmapCache.getIcon("chatKickUser"),
+            EricPixmapCache.getIcon("chatKickUser"),
             self.tr("Kick User"),
             self.__kickUser,
         )
         self.__banUserAct = self.__usersMenu.addAction(
-            UI.PixmapCache.getIcon("chatBanUser"), self.tr("Ban User"), self.__banUser
+            EricPixmapCache.getIcon("chatBanUser"), self.tr("Ban User"), self.__banUser
         )
         self.__banKickUserAct = self.__usersMenu.addAction(
-            UI.PixmapCache.getIcon("chatBanKickUser"),
+            EricPixmapCache.getIcon("chatBanKickUser"),
             self.tr("Ban and Kick User"),
             self.__banKickUser,
         )

eric ide

mercurial