Helpviewer/AdBlock/AdBlockDialog.py

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

eric ide

mercurial