--- a/src/eric7/WebBrowser/AdBlock/AdBlockDialog.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/WebBrowser/AdBlock/AdBlockDialog.py Tue Oct 18 16:06:21 2022 +0200 @@ -10,12 +10,12 @@ from PyQt6.QtCore import pyqtSlot, Qt, QTimer, QCoreApplication from PyQt6.QtWidgets import QDialog, QMenu, QToolButton -from EricWidgets import EricMessageBox +from eric7.EricWidgets import EricMessageBox from .Ui_AdBlockDialog import Ui_AdBlockDialog -import UI.PixmapCache -import Preferences +from eric7.EricGui import EricPixmapCache +from eric7 import Preferences class AdBlockDialog(QDialog, Ui_AdBlockDialog): @@ -38,7 +38,7 @@ self.__manager = manager - self.iconLabel.setPixmap(UI.PixmapCache.getPixmap("adBlockPlus48")) + self.iconLabel.setPixmap(EricPixmapCache.getPixmap("adBlockPlus48")) self.updateSpinBox.setValue(Preferences.getWebBrowser("AdBlockUpdatePeriod")) @@ -57,7 +57,7 @@ menu = QMenu(self) menu.aboutToShow.connect(self.__aboutToShowActionMenu) self.actionButton.setMenu(menu) - self.actionButton.setIcon(UI.PixmapCache.getIcon("adBlockAction")) + self.actionButton.setIcon(EricPixmapCache.getIcon("adBlockAction")) self.actionButton.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup) self.__load() @@ -84,9 +84,9 @@ for subscription in self.__manager.subscriptions(): tree = AdBlockTreeWidget(subscription, self.subscriptionsTabWidget) icon = ( - UI.PixmapCache.getIcon("adBlockPlus") + EricPixmapCache.getIcon("adBlockPlus") if subscription.isEnabled() - else UI.PixmapCache.getIcon("adBlockPlusDisabled") + else EricPixmapCache.getIcon("adBlockPlusDisabled") ) self.subscriptionsTabWidget.addTab(tree, icon, subscription.title()) @@ -205,7 +205,7 @@ """ Private slot to browse the list of available AdBlock subscriptions. """ - from WebBrowser.WebBrowserWindow import WebBrowserWindow + from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow mw = WebBrowserWindow.mainWindow() mw.newTab("http://adblockplus.org/en/subscriptions") @@ -215,7 +215,7 @@ """ Private slot to show the web page about how to write filters. """ - from WebBrowser.WebBrowserWindow import WebBrowserWindow + from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow mw = WebBrowserWindow.mainWindow() mw.newTab("http://adblockplus.org/en/filters") @@ -279,13 +279,13 @@ # enable required one as well sub = self.__manager.subscription(subscription.requiresLocation()) requiresSubscriptions = [] if sub is None else [sub] - icon = UI.PixmapCache.getIcon("adBlockPlus") + icon = EricPixmapCache.getIcon("adBlockPlus") else: # disable dependent ones as well requiresSubscriptions = self.__manager.getRequiresSubscriptions( subscription ) - icon = UI.PixmapCache.getIcon("adBlockPlusDisabled") + icon = EricPixmapCache.getIcon("adBlockPlusDisabled") requiresSubscriptions.append(subscription) for sub in requiresSubscriptions: sub.setEnabled(enable) @@ -308,7 +308,7 @@ if value != Preferences.getWebBrowser("AdBlockUpdatePeriod"): Preferences.setWebBrowser("AdBlockUpdatePeriod", value) - from WebBrowser.WebBrowserWindow import WebBrowserWindow + from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow manager = WebBrowserWindow.adBlockManager() for subscription in manager.subscriptions():