Helpviewer/AdBlock/AdBlockDialog.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3035
36e9f388958b
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
110 def __aboutToShowActionMenu(self): 110 def __aboutToShowActionMenu(self):
111 """ 111 """
112 Private slot to show the actions menu. 112 Private slot to show the actions menu.
113 """ 113 """
114 subscriptionEditable = self.__currentSubscription and \ 114 subscriptionEditable = self.__currentSubscription and \
115 self.__currentSubscription.canEditRules() 115 self.__currentSubscription.canEditRules()
116 subscriptionRemovable = self.__currentSubscription and \ 116 subscriptionRemovable = self.__currentSubscription and \
117 self.__currentSubscription.canBeRemoved() 117 self.__currentSubscription.canBeRemoved()
118 subscriptionEnabled = self.__currentSubscription and \ 118 subscriptionEnabled = self.__currentSubscription and \
119 self.__currentSubscription.isEnabled() 119 self.__currentSubscription.isEnabled()
120 120
121 menu = self.actionButton.menu() 121 menu = self.actionButton.menu()
122 menu.clear() 122 menu.clear()
123 123
124 menu.addAction(self.trUtf8("Add Rule"), self.__addCustomRule)\ 124 menu.addAction(self.trUtf8("Add Rule"), self.__addCustomRule)\
213 if requiresTitles: 213 if requiresTitles:
214 message = self.trUtf8( 214 message = self.trUtf8(
215 "<p>Do you really want to remove subscription" 215 "<p>Do you really want to remove subscription"
216 " <b>{0}</b> and all subscriptions requiring it?</p>" 216 " <b>{0}</b> and all subscriptions requiring it?</p>"
217 "<ul><li>{1}</li></ul>").format( 217 "<ul><li>{1}</li></ul>").format(
218 self.__currentSubscription.title(), 218 self.__currentSubscription.title(),
219 "</li><li>".join(requiresTitles)) 219 "</li><li>".join(requiresTitles))
220 else: 220 else:
221 message = self.trUtf8( 221 message = self.trUtf8(
222 "<p>Do you really want to remove subscription" 222 "<p>Do you really want to remove subscription"
223 " <b>{0}</b>?</p>").format(self.__currentSubscription.title()) 223 " <b>{0}</b>?</p>").format(self.__currentSubscription.title())
224 res = E5MessageBox.yesNo( 224 res = E5MessageBox.yesNo(

eric ide

mercurial