src/eric7/WebBrowser/AdBlock/AdBlockExceptionsDialog.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
10 from PyQt6.QtCore import pyqtSlot, Qt 10 from PyQt6.QtCore import pyqtSlot, Qt
11 from PyQt6.QtWidgets import QDialog 11 from PyQt6.QtWidgets import QDialog
12 12
13 from .Ui_AdBlockExceptionsDialog import Ui_AdBlockExceptionsDialog 13 from .Ui_AdBlockExceptionsDialog import Ui_AdBlockExceptionsDialog
14 14
15 import UI.PixmapCache 15 from eric7.EricGui import EricPixmapCache
16 16
17 17
18 class AdBlockExceptionsDialog(QDialog, Ui_AdBlockExceptionsDialog): 18 class AdBlockExceptionsDialog(QDialog, Ui_AdBlockExceptionsDialog):
19 """ 19 """
20 Class implementing a dialog to configure the AdBlock exceptions. 20 Class implementing a dialog to configure the AdBlock exceptions.
29 """ 29 """
30 super().__init__(parent) 30 super().__init__(parent)
31 self.setupUi(self) 31 self.setupUi(self)
32 self.setWindowFlags(Qt.WindowType.Window) 32 self.setWindowFlags(Qt.WindowType.Window)
33 33
34 self.iconLabel.setPixmap(UI.PixmapCache.getPixmap("adBlockPlusGreen48")) 34 self.iconLabel.setPixmap(EricPixmapCache.getPixmap("adBlockPlusGreen48"))
35 35
36 self.buttonBox.setFocus() 36 self.buttonBox.setFocus()
37 37
38 def load(self, hosts): 38 def load(self, hosts):
39 """ 39 """
86 """ 86 """
87 hosts = [] 87 hosts = []
88 for row in range(self.hostList.count()): 88 for row in range(self.hostList.count()):
89 hosts.append(self.hostList.item(row).text()) 89 hosts.append(self.hostList.item(row).text())
90 90
91 from WebBrowser.WebBrowserWindow import WebBrowserWindow 91 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow
92 92
93 WebBrowserWindow.adBlockManager().setExceptions(hosts) 93 WebBrowserWindow.adBlockManager().setExceptions(hosts)
94 94
95 super().accept() 95 super().accept()

eric ide

mercurial