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 """ |