src/eric7/WebBrowser/CookieJar/CookiesExceptionsDialog.py

branch
eric7
changeset 10485
287a3ae95e00
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10484:ad7a6d699a0d 10485:287a3ae95e00
89 @pyqtSlot() 89 @pyqtSlot()
90 def on_blockButton_clicked(self): 90 def on_blockButton_clicked(self):
91 """ 91 """
92 Private slot to block cookies of a domain. 92 Private slot to block cookies of a domain.
93 """ 93 """
94 from .CookieJar import CookieJar 94 from .CookieJar import CookieExceptionRuleType
95 95
96 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Block) 96 self.__exceptionsModel.addRule(
97 self.domainEdit.text(), CookieExceptionRuleType.Block
98 )
97 self.domainEdit.clear() 99 self.domainEdit.clear()
98 100
99 @pyqtSlot() 101 @pyqtSlot()
100 def on_allowForSessionButton_clicked(self): 102 def on_allowForSessionButton_clicked(self):
101 """ 103 """
102 Private slot to allow cookies of a domain for the current session only. 104 Private slot to allow cookies of a domain for the current session only.
103 """ 105 """
104 from .CookieJar import CookieJar 106 from .CookieJar import CookieExceptionRuleType
105 107
106 self.__exceptionsModel.addRule( 108 self.__exceptionsModel.addRule(
107 self.domainEdit.text(), CookieJar.AllowForSession 109 self.domainEdit.text(), CookieExceptionRuleType.AllowForSession
108 ) 110 )
109 self.domainEdit.clear() 111 self.domainEdit.clear()
110 112
111 @pyqtSlot() 113 @pyqtSlot()
112 def on_allowButton_clicked(self): 114 def on_allowButton_clicked(self):
113 """ 115 """
114 Private slot to allow cookies of a domain. 116 Private slot to allow cookies of a domain.
115 """ 117 """
116 from .CookieJar import CookieJar 118 from .CookieJar import CookieExceptionRuleType
117 119
118 self.__exceptionsModel.addRule(self.domainEdit.text(), CookieJar.Allow) 120 self.__exceptionsModel.addRule(
121 self.domainEdit.text(), CookieExceptionRuleType.Allow
122 )
119 self.domainEdit.clear() 123 self.domainEdit.clear()

eric ide

mercurial