eric6/WebBrowser/WebBrowserWindow.py

changeset 7759
51aa6c6b66f7
parent 7717
f32d7965a17e
child 7771
787a6b3f8c9f
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
2688 dlg.setTitle(title) 2688 dlg.setTitle(title)
2689 dlg.setDescription(description) 2689 dlg.setDescription(description)
2690 menu = self.bookmarksManager().menu() 2690 menu = self.bookmarksManager().menu()
2691 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu) 2691 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu)
2692 dlg.setCurrentIndex(idx) 2692 dlg.setCurrentIndex(idx)
2693 dlg.exec_() 2693 dlg.exec()
2694 2694
2695 def __addBookmarkFolder(self): 2695 def __addBookmarkFolder(self):
2696 """ 2696 """
2697 Private slot to add a new bookmarks folder. 2697 Private slot to add a new bookmarks folder.
2698 """ 2698 """
2700 dlg = AddBookmarkDialog() 2700 dlg = AddBookmarkDialog()
2701 menu = self.bookmarksManager().menu() 2701 menu = self.bookmarksManager().menu()
2702 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu) 2702 idx = self.bookmarksManager().bookmarksModel().nodeIndex(menu)
2703 dlg.setCurrentIndex(idx) 2703 dlg.setCurrentIndex(idx)
2704 dlg.setFolder(True) 2704 dlg.setFolder(True)
2705 dlg.exec_() 2705 dlg.exec()
2706 2706
2707 def __showBookmarksDialog(self): 2707 def __showBookmarksDialog(self):
2708 """ 2708 """
2709 Private slot to show the bookmarks dialog. 2709 Private slot to show the bookmarks dialog.
2710 """ 2710 """
2724 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog 2724 from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog
2725 2725
2726 dlg = AddBookmarkDialog() 2726 dlg = AddBookmarkDialog()
2727 dlg.setFolder(True) 2727 dlg.setFolder(True)
2728 dlg.setTitle(self.tr("Saved Tabs")) 2728 dlg.setTitle(self.tr("Saved Tabs"))
2729 dlg.exec_() 2729 dlg.exec()
2730 2730
2731 folder = dlg.addedNode() 2731 folder = dlg.addedNode()
2732 if folder is None: 2732 if folder is None:
2733 return 2733 return
2734 2734
2914 parent=self) 2914 parent=self)
2915 quitButton = mb.addButton( 2915 quitButton = mb.addButton(
2916 self.tr("&Quit"), E5MessageBox.AcceptRole) 2916 self.tr("&Quit"), E5MessageBox.AcceptRole)
2917 quitButton.setIcon(UI.PixmapCache.getIcon("exit")) 2917 quitButton.setIcon(UI.PixmapCache.getIcon("exit"))
2918 mb.addButton(E5MessageBox.Cancel) 2918 mb.addButton(E5MessageBox.Cancel)
2919 mb.exec_() 2919 mb.exec()
2920 return mb.clickedButton() == quitButton 2920 return mb.clickedButton() == quitButton
2921 2921
2922 return True 2922 return True
2923 2923
2924 def shutdown(self): 2924 def shutdown(self):
3229 dlg.show() 3229 dlg.show()
3230 if self.__lastConfigurationPageName: 3230 if self.__lastConfigurationPageName:
3231 dlg.showConfigurationPageByName(self.__lastConfigurationPageName) 3231 dlg.showConfigurationPageByName(self.__lastConfigurationPageName)
3232 else: 3232 else:
3233 dlg.showConfigurationPageByName("empty") 3233 dlg.showConfigurationPageByName("empty")
3234 dlg.exec_() 3234 dlg.exec()
3235 QApplication.processEvents() 3235 QApplication.processEvents()
3236 if dlg.result() == QDialog.Accepted: 3236 if dlg.result() == QDialog.Accepted:
3237 dlg.setPreferences() 3237 dlg.setPreferences()
3238 Preferences.syncPreferences() 3238 Preferences.syncPreferences()
3239 self.preferencesChanged() 3239 self.preferencesChanged()
3317 """ 3317 """
3318 Private slot to configure the accepted languages for web pages. 3318 Private slot to configure the accepted languages for web pages.
3319 """ 3319 """
3320 from .WebBrowserLanguagesDialog import WebBrowserLanguagesDialog 3320 from .WebBrowserLanguagesDialog import WebBrowserLanguagesDialog
3321 dlg = WebBrowserLanguagesDialog(self) 3321 dlg = WebBrowserLanguagesDialog(self)
3322 dlg.exec_() 3322 dlg.exec()
3323 self.networkManager().languagesChanged() 3323 self.networkManager().languagesChanged()
3324 3324
3325 def __showCookiesConfiguration(self): 3325 def __showCookiesConfiguration(self):
3326 """ 3326 """
3327 Private slot to configure the cookies handling. 3327 Private slot to configure the cookies handling.
3328 """ 3328 """
3329 from .CookieJar.CookiesConfigurationDialog import ( 3329 from .CookieJar.CookiesConfigurationDialog import (
3330 CookiesConfigurationDialog 3330 CookiesConfigurationDialog
3331 ) 3331 )
3332 dlg = CookiesConfigurationDialog(self) 3332 dlg = CookiesConfigurationDialog(self)
3333 dlg.exec_() 3333 dlg.exec()
3334 3334
3335 def __showFlashCookiesManagement(self): 3335 def __showFlashCookiesManagement(self):
3336 """ 3336 """
3337 Private slot to show the flash cookies management dialog. 3337 Private slot to show the flash cookies management dialog.
3338 """ 3338 """
3524 if WebBrowserWindow._useQtHelp: 3524 if WebBrowserWindow._useQtHelp:
3525 from .QtHelp.QtHelpDocumentationDialog import ( 3525 from .QtHelp.QtHelpDocumentationDialog import (
3526 QtHelpDocumentationDialog 3526 QtHelpDocumentationDialog
3527 ) 3527 )
3528 dlg = QtHelpDocumentationDialog(self.__helpEngine, self) 3528 dlg = QtHelpDocumentationDialog(self.__helpEngine, self)
3529 dlg.exec_() 3529 dlg.exec()
3530 if dlg.hasDocumentationChanges(): 3530 if dlg.hasDocumentationChanges():
3531 for i in sorted(dlg.getTabsToClose(), reverse=True): 3531 for i in sorted(dlg.getTabsToClose(), reverse=True):
3532 self.__tabWidget.closeBrowserAt(i) 3532 self.__tabWidget.closeBrowserAt(i)
3533 self.__searchEngine.reindexDocumentation() 3533 self.__searchEngine.reindexDocumentation()
3534 3534
3691 """ 3691 """
3692 from .WebBrowserClearPrivateDataDialog import ( 3692 from .WebBrowserClearPrivateDataDialog import (
3693 WebBrowserClearPrivateDataDialog 3693 WebBrowserClearPrivateDataDialog
3694 ) 3694 )
3695 dlg = WebBrowserClearPrivateDataDialog(self) 3695 dlg = WebBrowserClearPrivateDataDialog(self)
3696 if dlg.exec_() == QDialog.Accepted: 3696 if dlg.exec() == QDialog.Accepted:
3697 # browsing history, search history, favicons, disk cache, cookies, 3697 # browsing history, search history, favicons, disk cache, cookies,
3698 # passwords, web databases, downloads, Flash cookies 3698 # passwords, web databases, downloads, Flash cookies
3699 (history, searches, favicons, cache, cookies, 3699 (history, searches, favicons, cache, cookies,
3700 passwords, databases, downloads, flashCookies, zoomValues, 3700 passwords, databases, downloads, flashCookies, zoomValues,
3701 sslExceptions, historyPeriod) = dlg.getData() 3701 sslExceptions, historyPeriod) = dlg.getData()
3734 Private slot to show the search engines configuration dialog. 3734 Private slot to show the search engines configuration dialog.
3735 """ 3735 """
3736 from .OpenSearch.OpenSearchDialog import OpenSearchDialog 3736 from .OpenSearch.OpenSearchDialog import OpenSearchDialog
3737 3737
3738 dlg = OpenSearchDialog(self) 3738 dlg = OpenSearchDialog(self)
3739 dlg.exec_() 3739 dlg.exec()
3740 3740
3741 def searchEnginesAction(self): 3741 def searchEnginesAction(self):
3742 """ 3742 """
3743 Public method to get a reference to the search engines configuration 3743 Public method to get a reference to the search engines configuration
3744 action. 3744 action.
3752 Private slot to show the passwords management dialog. 3752 Private slot to show the passwords management dialog.
3753 """ 3753 """
3754 from .Passwords.PasswordsDialog import PasswordsDialog 3754 from .Passwords.PasswordsDialog import PasswordsDialog
3755 3755
3756 dlg = PasswordsDialog(self) 3756 dlg = PasswordsDialog(self)
3757 dlg.exec_() 3757 dlg.exec()
3758 3758
3759 def __showCertificateErrorsDialog(self): 3759 def __showCertificateErrorsDialog(self):
3760 """ 3760 """
3761 Private slot to show the certificate errors management dialog. 3761 Private slot to show the certificate errors management dialog.
3762 """ 3762 """
3791 Private slot to show the zoom values management dialog. 3791 Private slot to show the zoom values management dialog.
3792 """ 3792 """
3793 from .ZoomManager.ZoomValuesDialog import ZoomValuesDialog 3793 from .ZoomManager.ZoomValuesDialog import ZoomValuesDialog
3794 3794
3795 dlg = ZoomValuesDialog(self) 3795 dlg = ZoomValuesDialog(self)
3796 dlg.exec_() 3796 dlg.exec()
3797 3797
3798 def __showDownloadsWindow(self): 3798 def __showDownloadsWindow(self):
3799 """ 3799 """
3800 Private slot to show the downloads dialog. 3800 Private slot to show the downloads dialog.
3801 """ 3801 """
4507 Private slot to show the user agents management dialog. 4507 Private slot to show the user agents management dialog.
4508 """ 4508 """
4509 from .UserAgent.UserAgentsDialog import UserAgentsDialog 4509 from .UserAgent.UserAgentsDialog import UserAgentsDialog
4510 4510
4511 dlg = UserAgentsDialog(self) 4511 dlg = UserAgentsDialog(self)
4512 dlg.exec_() 4512 dlg.exec()
4513 4513
4514 @classmethod 4514 @classmethod
4515 def syncManager(cls): 4515 def syncManager(cls):
4516 """ 4516 """
4517 Class method to get a reference to the data synchronization manager. 4517 Class method to get a reference to the data synchronization manager.

eric ide

mercurial