8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSlot |
10 from PyQt4.QtCore import pyqtSlot |
11 from PyQt4.QtGui import QDialog, QSortFilterProxyModel, QCompleter, QFont, QFontMetrics |
11 from PyQt4.QtGui import QDialog, QSortFilterProxyModel, QCompleter, QFont, QFontMetrics |
12 |
12 |
13 from .CookieJar import CookieJar |
|
14 from .CookieExceptionsModel import CookieExceptionsModel |
13 from .CookieExceptionsModel import CookieExceptionsModel |
15 from .CookieModel import CookieModel |
14 from .CookieModel import CookieModel |
16 |
15 |
17 from .Ui_CookiesExceptionsDialog import Ui_CookiesExceptionsDialog |
16 from .Ui_CookiesExceptionsDialog import Ui_CookiesExceptionsDialog |
18 |
17 |
85 @pyqtSlot() |
84 @pyqtSlot() |
86 def on_blockButton_clicked(self): |
85 def on_blockButton_clicked(self): |
87 """ |
86 """ |
88 Private slot to block cookies of a domain. |
87 Private slot to block cookies of a domain. |
89 """ |
88 """ |
|
89 from .CookieJar import CookieJar |
90 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Block) |
90 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Block) |
91 |
91 |
92 @pyqtSlot() |
92 @pyqtSlot() |
93 def on_allowForSessionButton_clicked(self): |
93 def on_allowForSessionButton_clicked(self): |
94 """ |
94 """ |
95 Private slot to allow cookies of a domain for the current session only. |
95 Private slot to allow cookies of a domain for the current session only. |
96 """ |
96 """ |
|
97 from .CookieJar import CookieJar |
97 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.AllowForSession) |
98 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.AllowForSession) |
98 |
99 |
99 @pyqtSlot() |
100 @pyqtSlot() |
100 def on_allowButton_clicked(self): |
101 def on_allowButton_clicked(self): |
101 """ |
102 """ |
102 Private slot to allow cookies of a domain. |
103 Private slot to allow cookies of a domain. |
103 """ |
104 """ |
|
105 from .CookieJar import CookieJar |
104 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Allow) |
106 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Allow) |