diff -r 2e7f691cade9 -r 9c5b3235abf9 Helpviewer/HelpWindow.py --- a/Helpviewer/HelpWindow.py Sun Jul 29 13:40:11 2012 +0200 +++ b/Helpviewer/HelpWindow.py Sun Jul 29 15:41:58 2012 +0200 @@ -44,6 +44,7 @@ from .Passwords.PasswordManager import PasswordManager from .Network.NetworkAccessManager import NetworkAccessManager, SSL_AVAILABLE from .AdBlock.AdBlockManager import AdBlockManager +from .AdBlock.AdBlockIcon import AdBlockIcon from .OfflineStorage.OfflineStorageConfigDialog import OfflineStorageConfigDialog from .UserAgent.UserAgentMenu import UserAgentMenu from .UserAgent.UserAgentManager import UserAgentManager @@ -205,6 +206,10 @@ self.__setIconDatabasePath() self.__initWebSettings() + self.__adBlockIcon = AdBlockIcon(self) + self.statusBar().addPermanentWidget(self.__adBlockIcon) + self.__adBlockIcon.setEnabled(Preferences.getHelp("AdBlockEnabled")) + self.__initActions() self.__initMenus() self.__initToolbars() @@ -2437,7 +2442,7 @@ progressBar.setSizePolicy(sizePolicy) layout.addWidget(progressBar) - self.statusBar().addPermanentWidget(self.__indexingProgress) + self.statusBar().insertPermanentWidget(0, self.__indexingProgress) def __indexingFinished(self): """ @@ -2838,6 +2843,14 @@ return cls._adblockManager + def adBlockIcon(self): + """ + Public method to get a reference to the AdBlock icon. + + @return reference to the AdBlock icon (AdBlockIcon) + """ + return self.__adBlockIcon + @classmethod def downloadManager(cls): """ @@ -2886,6 +2899,15 @@ else: return None + @classmethod + def mainWindows(cls): + """ + Class method to get references to all main windows. + + @return references to all main window (list of HelpWindow) + """ + return cls.helpwindows + def openSearchManager(self): """ Public method to get a reference to the opensearch manager object.