--- a/Helpviewer/HelpWindow.py Sun Dec 06 14:54:10 2015 +0100 +++ b/Helpviewer/HelpWindow.py Sun Dec 06 19:09:32 2015 +0100 @@ -90,6 +90,7 @@ _notification = None _featurePermissionManager = None _flashCookieManager = None + _zoomManager = None def __init__(self, home, path, parent, name, fromEric=False, initShortcutsOnly=False, searchWord=None): @@ -1559,6 +1560,22 @@ self.__showSyncDialog) self.__actions.append(self.synchronizationAct) + self.zoomValuesAct = E5Action( + self.tr('Manage Saved Zoom Values'), + UI.PixmapCache.getIcon("zoomReset.png"), + self.tr('Manage Saved Zoom Values...'), + 0, 0, + self, 'help_manage_zoom_values') + self.zoomValuesAct.setStatusTip(self.tr( + 'Manage the saved zoom values')) + self.zoomValuesAct.setWhatsThis(self.tr( + """<b>Manage Saved Zoom Values...</b>""" + """<p>Opens a dialog to manage the saved zoom values.</p>""" + )) + if not self.initShortcutsOnly: + self.zoomValuesAct.triggered.connect(self.__showZoomValuesDialog) + self.__actions.append(self.zoomValuesAct) + self.backAct.setEnabled(False) self.forwardAct.setEnabled(False) @@ -1683,6 +1700,8 @@ if SSL_AVAILABLE: menu.addAction(self.certificatesAct) menu.addSeparator() + menu.addAction(self.zoomValuesAct) + menu.addSeparator() menu.addAction(self.adblockAct) menu.addAction(self.flashblockAct) menu.addSeparator() @@ -3000,8 +3019,8 @@ # browsing history, search history, favicons, disk cache, cookies, # passwords, web databases, downloads, Flash cookies (history, searches, favicons, cache, cookies, - passwords, databases, downloads, flashCookies, historyPeriod) = \ - dlg.getData() + passwords, databases, downloads, flashCookies, zoomValues, + historyPeriod) = dlg.getData() if history: self.historyManager().clear(historyPeriod) self.tabWidget.clearClosedTabsList() @@ -3041,6 +3060,8 @@ "http://www.macromedia.com/support/documentation/" "{0}/flashplayer/help/settings_manager07.html".format( langCode)) + if zoomValues: + self.zoomManager().clear() def __showEnginesConfigurationDialog(self): """ @@ -3109,6 +3130,15 @@ """ self.featurePermissionManager().showFeaturePermissionsDialog() + def __showZoomValuesDialog(self): + """ + Private slot to show the zoom values management dialog. + """ + from .ZoomManager.ZoomValuesDialog import ZoomValuesDialog + + dlg = ZoomValuesDialog(self) + dlg.exec_() + def __showNetworkMonitor(self): """ Private slot to show the network monitor dialog. @@ -3337,7 +3367,7 @@ """ Class method to get a reference to the flash cookies manager. - @return reference to the feature permission manager + @return reference to the flash cookies manager @rtype FlashCookieManager """ if cls._flashCookieManager is None: @@ -3348,6 +3378,20 @@ return cls._flashCookieManager @classmethod + def zoomManager(cls): + """ + Class method to get a reference to the zoom values manager. + + @return reference to the zoom values manager + @rtype ZoomManager + """ + if cls._zoomManager is None: + from .ZoomManager.ZoomManager import ZoomManager + cls._zoomManager = ZoomManager() + + return cls._zoomManager + + @classmethod def mainWindow(cls): """ Class method to get a reference to the main window.