diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/WebBrowser/AdBlock/AdBlockIcon.py --- a/src/eric7/WebBrowser/AdBlock/AdBlockIcon.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/WebBrowser/AdBlock/AdBlockIcon.py Tue Oct 18 16:06:21 2022 +0200 @@ -10,9 +10,9 @@ from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QMenu -from EricWidgets.EricClickableLabel import EricClickableLabel +from eric7.EricWidgets.EricClickableLabel import EricClickableLabel -import UI.PixmapCache +from eric7.EricGui import EricPixmapCache class AdBlockIcon(EricClickableLabel): @@ -53,7 +53,7 @@ if enabled: self.currentChanged() else: - self.setPixmap(UI.PixmapCache.getPixmap("adBlockPlusDisabled16")) + self.setPixmap(EricPixmapCache.getPixmap("adBlockPlusDisabled16")) def __aboutToShowMenu(self): """ @@ -65,37 +65,37 @@ if manager.isEnabled(): act = self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlusDisabled"), + EricPixmapCache.getIcon("adBlockPlusDisabled"), self.tr("Disable AdBlock"), ) act.triggered.connect(lambda: self.__enableAdBlock(False)) else: act = self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlus"), self.tr("Enable AdBlock") + EricPixmapCache.getIcon("adBlockPlus"), self.tr("Enable AdBlock") ) act.triggered.connect(lambda: self.__enableAdBlock(True)) self.__menu.addSeparator() if manager.isEnabled() and self.__mw.currentBrowser().url().host(): if self.__isCurrentHostExcepted(): act = self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlus"), + EricPixmapCache.getIcon("adBlockPlus"), self.tr("Remove AdBlock Exception"), ) act.triggered.connect(lambda: self.__setException(False)) else: act = self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlusGreen"), + EricPixmapCache.getIcon("adBlockPlusGreen"), self.tr("Add AdBlock Exception"), ) act.triggered.connect(lambda: self.__setException(True)) self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlusGreen"), + EricPixmapCache.getIcon("adBlockPlusGreen"), self.tr("AdBlock Exceptions..."), manager.showExceptionsDialog, ) self.__menu.addSeparator() self.__menu.addAction( - UI.PixmapCache.getIcon("adBlockPlus"), + EricPixmapCache.getIcon("adBlockPlus"), self.tr("AdBlock Configuration..."), manager.showDialog, ) @@ -108,9 +108,9 @@ @rtype QMenu """ if self.__enabled: - self.__menu.setIcon(UI.PixmapCache.getIcon("adBlockPlus")) + self.__menu.setIcon(EricPixmapCache.getIcon("adBlockPlus")) else: - self.__menu.setIcon(UI.PixmapCache.getIcon("adBlockPlusDisabled")) + self.__menu.setIcon(EricPixmapCache.getIcon("adBlockPlusDisabled")) return self.__menu @@ -154,9 +154,9 @@ """ if self.__enabled: if self.__isCurrentHostExcepted(): - self.setPixmap(UI.PixmapCache.getPixmap("adBlockPlusGreen16")) + self.setPixmap(EricPixmapCache.getPixmap("adBlockPlusGreen16")) else: - self.setPixmap(UI.PixmapCache.getPixmap("adBlockPlus16")) + self.setPixmap(EricPixmapCache.getPixmap("adBlockPlus16")) def __setException(self, enable): """