src/eric7/WebBrowser/WebBrowserWindow.py

branch
eric7
changeset 11006
a671918232f3
parent 10933
95a15b70f7bb
child 11057
b60d032f6ee4
equal deleted inserted replaced
11005:b918c6c2736b 11006:a671918232f3
3111 description = "" 3111 description = ""
3112 for meta in res: 3112 for meta in res:
3113 if meta["name"] == "description": 3113 if meta["name"] == "description":
3114 description = meta["content"] 3114 description = meta["content"]
3115 3115
3116 dlg = AddBookmarkDialog() 3116 dlg = AddBookmarkDialog(parent=self)
3117 dlg.setUrl(url) 3117 dlg.setUrl(url)
3118 dlg.setTitle(title) 3118 dlg.setTitle(title)
3119 dlg.setDescription(description) 3119 dlg.setDescription(description)
3120 menu = self.bookmarksManager().menu() 3120 menu = self.bookmarksManager().menu()
3121 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu) 3121 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu)
3127 """ 3127 """
3128 Private slot to add a new bookmarks folder. 3128 Private slot to add a new bookmarks folder.
3129 """ 3129 """
3130 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog 3130 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog
3131 3131
3132 dlg = AddBookmarkDialog() 3132 dlg = AddBookmarkDialog(parent=self)
3133 menu = self.bookmarksManager().menu() 3133 menu = self.bookmarksManager().menu()
3134 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu) 3134 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu)
3135 dlg.setCurrentIndex(idx) 3135 dlg.setCurrentIndex(idx)
3136 dlg.setFolder(True) 3136 dlg.setFolder(True)
3137 dlg.exec() 3137 dlg.exec()
3155 Public slot to bookmark all open tabs. 3155 Public slot to bookmark all open tabs.
3156 """ 3156 """
3157 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog 3157 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog
3158 from .WebBrowserPage import WebBrowserPage 3158 from .WebBrowserPage import WebBrowserPage
3159 3159
3160 dlg = AddBookmarkDialog() 3160 dlg = AddBookmarkDialog(parent=self)
3161 dlg.setFolder(True) 3161 dlg.setFolder(True)
3162 dlg.setTitle(self.tr("Saved Tabs")) 3162 dlg.setTitle(self.tr("Saved Tabs"))
3163 dlg.exec() 3163 dlg.exec()
3164 3164
3165 folder = dlg.addedNode() 3165 folder = dlg.addedNode()
3689 ConfigurationDialog, 3689 ConfigurationDialog,
3690 ConfigurationMode, 3690 ConfigurationMode,
3691 ) 3691 )
3692 3692
3693 dlg = ConfigurationDialog( 3693 dlg = ConfigurationDialog(
3694 self, 3694 parent=self,
3695 "Configuration", 3695 name="Configuration",
3696 True, 3696 modal=True,
3697 fromEric=False, 3697 fromEric=False,
3698 displayMode=ConfigurationMode.WEBBROWSERMODE, 3698 displayMode=ConfigurationMode.WEBBROWSERMODE,
3699 ) 3699 )
3700 dlg.preferencesChanged.connect(self.preferencesChanged) 3700 dlg.preferencesChanged.connect(self.preferencesChanged)
3701 dlg.mainPasswordChanged.connect( 3701 dlg.mainPasswordChanged.connect(
3797 """ 3797 """
3798 Private slot to configure the accepted languages for web pages. 3798 Private slot to configure the accepted languages for web pages.
3799 """ 3799 """
3800 from .WebBrowserLanguagesDialog import WebBrowserLanguagesDialog 3800 from .WebBrowserLanguagesDialog import WebBrowserLanguagesDialog
3801 3801
3802 dlg = WebBrowserLanguagesDialog(self) 3802 dlg = WebBrowserLanguagesDialog(parent=self)
3803 dlg.exec() 3803 dlg.exec()
3804 self.networkManager().languagesChanged() 3804 self.networkManager().languagesChanged()
3805 3805
3806 @pyqtSlot() 3806 @pyqtSlot()
3807 def __showCookiesConfiguration(self): 3807 def __showCookiesConfiguration(self):
3808 """ 3808 """
3809 Private slot to configure the cookies handling. 3809 Private slot to configure the cookies handling.
3810 """ 3810 """
3811 from .CookieJar.CookiesConfigurationDialog import CookiesConfigurationDialog 3811 from .CookieJar.CookiesConfigurationDialog import CookiesConfigurationDialog
3812 3812
3813 dlg = CookiesConfigurationDialog(self) 3813 dlg = CookiesConfigurationDialog(parent=self)
3814 dlg.exec() 3814 dlg.exec()
3815 3815
3816 @classmethod 3816 @classmethod
3817 def setUseQtHelp(cls, use): 3817 def setUseQtHelp(cls, use):
3818 """ 3818 """
4019 if WebBrowserWindow._useQtHelp: 4019 if WebBrowserWindow._useQtHelp:
4020 from eric7.QtHelpInterface.QtHelpDocumentationConfigurationDialog import ( # noqa: I101 4020 from eric7.QtHelpInterface.QtHelpDocumentationConfigurationDialog import ( # noqa: I101
4021 QtHelpDocumentationConfigurationDialog, 4021 QtHelpDocumentationConfigurationDialog,
4022 ) 4022 )
4023 4023
4024 dlg = QtHelpDocumentationConfigurationDialog(self.__helpEngine, self) 4024 dlg = QtHelpDocumentationConfigurationDialog(self.__helpEngine, parent=self)
4025 dlg.exec() 4025 dlg.exec()
4026 4026
4027 def getSourceFileList(self): 4027 def getSourceFileList(self):
4028 """ 4028 """
4029 Public method to get a list of all opened source files. 4029 Public method to get a list of all opened source files.
4171 """ 4171 """
4172 Private slot to clear the private data. 4172 Private slot to clear the private data.
4173 """ 4173 """
4174 from .WebBrowserClearPrivateDataDialog import WebBrowserClearPrivateDataDialog 4174 from .WebBrowserClearPrivateDataDialog import WebBrowserClearPrivateDataDialog
4175 4175
4176 dlg = WebBrowserClearPrivateDataDialog(self) 4176 dlg = WebBrowserClearPrivateDataDialog(parent=self)
4177 if dlg.exec() == QDialog.DialogCode.Accepted: 4177 if dlg.exec() == QDialog.DialogCode.Accepted:
4178 # browsing history, search history, favicons, disk cache, cookies, 4178 # browsing history, search history, favicons, disk cache, cookies,
4179 # passwords, web databases, downloads, zoom values, SSL error 4179 # passwords, web databases, downloads, zoom values, SSL error
4180 # exceptions, history period 4180 # exceptions, history period
4181 ( 4181 (
4223 """ 4223 """
4224 Private slot to show the search engines configuration dialog. 4224 Private slot to show the search engines configuration dialog.
4225 """ 4225 """
4226 from .OpenSearch.OpenSearchDialog import OpenSearchDialog 4226 from .OpenSearch.OpenSearchDialog import OpenSearchDialog
4227 4227
4228 dlg = OpenSearchDialog(self) 4228 dlg = OpenSearchDialog(parent=self)
4229 dlg.exec() 4229 dlg.exec()
4230 4230
4231 def searchEnginesAction(self): 4231 def searchEnginesAction(self):
4232 """ 4232 """
4233 Public method to get a reference to the search engines configuration 4233 Public method to get a reference to the search engines configuration
4243 """ 4243 """
4244 Private slot to show the passwords management dialog. 4244 Private slot to show the passwords management dialog.
4245 """ 4245 """
4246 from .Passwords.PasswordsDialog import PasswordsDialog 4246 from .Passwords.PasswordsDialog import PasswordsDialog
4247 4247
4248 dlg = PasswordsDialog(self) 4248 dlg = PasswordsDialog(parent=self)
4249 dlg.exec() 4249 dlg.exec()
4250 4250
4251 @pyqtSlot() 4251 @pyqtSlot()
4252 def __showSecurityKeysDialog(self): 4252 def __showSecurityKeysDialog(self):
4253 """ 4253 """
4298 """ 4298 """
4299 Private slot to show the zoom values management dialog. 4299 Private slot to show the zoom values management dialog.
4300 """ 4300 """
4301 from .ZoomManager.ZoomValuesDialog import ZoomValuesDialog 4301 from .ZoomManager.ZoomValuesDialog import ZoomValuesDialog
4302 4302
4303 dlg = ZoomValuesDialog(self) 4303 dlg = ZoomValuesDialog(parent=self)
4304 dlg.exec() 4304 dlg.exec()
4305 4305
4306 @pyqtSlot() 4306 @pyqtSlot()
4307 def __showDownloadsWindow(self): 4307 def __showDownloadsWindow(self):
4308 """ 4308 """
5011 """ 5011 """
5012 Private slot to show the user agents management dialog. 5012 Private slot to show the user agents management dialog.
5013 """ 5013 """
5014 from .UserAgent.UserAgentsDialog import UserAgentsDialog 5014 from .UserAgent.UserAgentsDialog import UserAgentsDialog
5015 5015
5016 dlg = UserAgentsDialog(self) 5016 dlg = UserAgentsDialog(parent=self)
5017 dlg.exec() 5017 dlg.exec()
5018 5018
5019 @classmethod 5019 @classmethod
5020 def syncManager(cls): 5020 def syncManager(cls):
5021 """ 5021 """

eric ide

mercurial