Helpviewer/AdBlock/AdBlockDialog.py

changeset 461
34528aaedf1c
parent 134
c2dd2bf92ece
child 483
ca7d8599a575
equal deleted inserted replaced
460:6a3899e91d76 461:34528aaedf1c
46 self.adBlockGroup.setChecked(manager.isEnabled()) 46 self.adBlockGroup.setChecked(manager.isEnabled())
47 self.connect(self.adBlockGroup, SIGNAL("toggled(bool)"), 47 self.connect(self.adBlockGroup, SIGNAL("toggled(bool)"),
48 manager.setEnabled) 48 manager.setEnabled)
49 49
50 menu = QMenu(self) 50 menu = QMenu(self)
51 self.connect(menu, SIGNAL("aboutToShow()"), self.__aboutToShowActionMenu) 51 menu.aboutToShow.connect(self.__aboutToShowActionMenu)
52 self.actionButton.setMenu(menu) 52 self.actionButton.setMenu(menu)
53 self.actionButton.setIcon(UI.PixmapCache.getIcon("adBlockAction.png")) 53 self.actionButton.setIcon(UI.PixmapCache.getIcon("adBlockAction.png"))
54 self.actionButton.setPopupMode(QToolButton.InstantPopup) 54 self.actionButton.setPopupMode(QToolButton.InstantPopup)
55 55
56 if self.adBlockGroup.isChecked(): 56 if self.adBlockGroup.isChecked():
57 subscription = manager.customRules() 57 subscription = manager.customRules()
58 subscriptionIndex = self.__adBlockModel.subscriptionIndex(subscription) 58 subscriptionIndex = self.__adBlockModel.subscriptionIndex(subscription)
59 self.subscriptionsTree.expand(self.__proxyModel.mapFromSource(subscriptionIndex)) 59 self.subscriptionsTree.expand(
60 self.__proxyModel.mapFromSource(subscriptionIndex))
60 61
61 def model(self): 62 def model(self):
62 """ 63 """
63 Public method to return a reference to the subscriptions tree model. 64 Public method to return a reference to the subscriptions tree model.
64 """ 65 """

eric ide

mercurial