83 _networkManager = None |
83 _networkManager = None |
84 ## _cookieJar = None |
84 ## _cookieJar = None |
85 ## _helpEngine = None |
85 ## _helpEngine = None |
86 _bookmarksManager = None |
86 _bookmarksManager = None |
87 _historyManager = None |
87 _historyManager = None |
88 ## _passwordManager = None |
88 _passwordManager = None |
89 ## _adblockManager = None |
89 ## _adblockManager = None |
90 ## _downloadManager = None |
90 ## _downloadManager = None |
91 ## _feedsManager = None |
91 ## _feedsManager = None |
92 ## _userAgentsManager = None |
92 ## _userAgentsManager = None |
93 ## _syncManager = None |
93 ## _syncManager = None |
1539 if not self.__initShortcutsOnly: |
1539 if not self.__initShortcutsOnly: |
1540 self.searchEnginesAct.triggered.connect( |
1540 self.searchEnginesAct.triggered.connect( |
1541 self.__showEnginesConfigurationDialog) |
1541 self.__showEnginesConfigurationDialog) |
1542 self.__actions.append(self.searchEnginesAct) |
1542 self.__actions.append(self.searchEnginesAct) |
1543 |
1543 |
1544 # TODO: Passwords |
1544 self.passwordsAct = E5Action( |
1545 ## self.passwordsAct = E5Action( |
1545 self.tr('Manage Saved Passwords'), |
1546 ## self.tr('Manage Saved Passwords'), |
1546 UI.PixmapCache.getIcon("passwords.png"), |
1547 ## UI.PixmapCache.getIcon("passwords.png"), |
1547 self.tr('Manage Saved Passwords...'), |
1548 ## self.tr('Manage Saved Passwords...'), |
1548 0, 0, |
1549 ## 0, 0, |
1549 self, 'webbrowser_manage_passwords') |
1550 ## self, 'webbrowser_manage_passwords') |
1550 self.passwordsAct.setStatusTip(self.tr( |
1551 ## self.passwordsAct.setStatusTip(self.tr( |
1551 'Manage the saved passwords')) |
1552 ## 'Manage the saved passwords')) |
1552 self.passwordsAct.setWhatsThis(self.tr( |
1553 ## self.passwordsAct.setWhatsThis(self.tr( |
1553 """<b>Manage Saved Passwords...</b>""" |
1554 ## """<b>Manage Saved Passwords...</b>""" |
1554 """<p>Opens a dialog to manage the saved passwords.</p>""" |
1555 ## """<p>Opens a dialog to manage the saved passwords.</p>""" |
1555 )) |
1556 ## )) |
1556 if not self.__initShortcutsOnly: |
1557 ## if not self.__initShortcutsOnly: |
1557 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1558 ## self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1558 self.__actions.append(self.passwordsAct) |
1559 ## self.__actions.append(self.passwordsAct) |
|
1560 |
1559 |
1561 # TODO: AdBlock |
1560 # TODO: AdBlock |
1562 ## self.adblockAct = E5Action( |
1561 ## self.adblockAct = E5Action( |
1563 ## self.tr('Ad Block'), |
1562 ## self.tr('Ad Block'), |
1564 ## UI.PixmapCache.getIcon("adBlockPlus.png"), |
1563 ## UI.PixmapCache.getIcon("adBlockPlus.png"), |
1860 menu.addAction(self.featurePermissionAct) |
1859 menu.addAction(self.featurePermissionAct) |
1861 ## menu.addSeparator() |
1860 ## menu.addSeparator() |
1862 menu.addAction(self.editMessageFilterAct) |
1861 menu.addAction(self.editMessageFilterAct) |
1863 menu.addSeparator() |
1862 menu.addSeparator() |
1864 menu.addAction(self.searchEnginesAct) |
1863 menu.addAction(self.searchEnginesAct) |
1865 ## menu.addSeparator() |
1864 menu.addSeparator() |
1866 ## menu.addAction(self.passwordsAct) |
1865 menu.addAction(self.passwordsAct) |
1867 ## if SSL_AVAILABLE: |
1866 ## if SSL_AVAILABLE: |
1868 ## menu.addAction(self.certificatesAct) |
1867 ## menu.addAction(self.certificatesAct) |
1869 ## menu.addSeparator() |
1868 ## menu.addSeparator() |
1870 menu.addAction(self.zoomValuesAct) |
1869 menu.addAction(self.zoomValuesAct) |
1871 menu.addSeparator() |
1870 menu.addSeparator() |
2479 self.bookmarksToolBar.setModel(None) |
2478 self.bookmarksToolBar.setModel(None) |
2480 self.bookmarksManager().close() |
2479 self.bookmarksManager().close() |
2481 |
2480 |
2482 ## self.historyManager().close() |
2481 ## self.historyManager().close() |
2483 ## |
2482 ## |
2484 ## self.passwordManager().close() |
2483 self.passwordManager().close() |
2485 ## |
2484 |
2486 ## self.adBlockManager().close() |
2485 ## self.adBlockManager().close() |
2487 ## |
2486 ## |
2488 ## self.userAgentsManager().close() |
2487 ## self.userAgentsManager().close() |
2489 ## |
2488 ## |
2490 ## self.speedDial().close() |
2489 ## self.speedDial().close() |
2819 Public slot to handle the change of the master password. |
2818 Public slot to handle the change of the master password. |
2820 |
2819 |
2821 @param oldPassword current master password (string) |
2820 @param oldPassword current master password (string) |
2822 @param newPassword new master password (string) |
2821 @param newPassword new master password (string) |
2823 """ |
2822 """ |
2824 # TODO: PasswordManager |
2823 from Preferences.ConfigurationDialog import ConfigurationDialog |
2825 ## from Preferences.ConfigurationDialog import ConfigurationDialog |
2824 self.passwordManager().masterPasswordChanged(oldPassword, newPassword) |
2826 ## self.passwordManager().masterPasswordChanged(oldPassword, newPassword) |
2825 if self.__fromEric and isinstance(self.sender(), ConfigurationDialog): |
2827 ## if self.__fromEric and isinstance(self.sender(), ConfigurationDialog): |
2826 # we were called from our local configuration dialog |
2828 ## # we were called from our local configuration dialog |
2827 Preferences.convertPasswords(oldPassword, newPassword) |
2829 ## Preferences.convertPasswords(oldPassword, newPassword) |
2828 Utilities.crypto.changeRememberedMaster(newPassword) |
2830 ## Utilities.crypto.changeRememberedMaster(newPassword) |
|
2831 |
2829 |
2832 ## def __showAcceptedLanguages(self): |
2830 ## def __showAcceptedLanguages(self): |
2833 ## """ |
2831 ## """ |
2834 ## Private slot to configure the accepted languages for web pages. |
2832 ## Private slot to configure the accepted languages for web pages. |
2835 ## """ |
2833 ## """ |
3237 backItems = history.backItems(historyCount) |
3235 backItems = history.backItems(historyCount) |
3238 for index in range(len(backItems) - 1, -1, -1): |
3236 for index in range(len(backItems) - 1, -1, -1): |
3239 item = backItems[index] |
3237 item = backItems[index] |
3240 act = QAction(self) |
3238 act = QAction(self) |
3241 act.setData(-1 * (index + 1)) |
3239 act.setData(-1 * (index + 1)) |
3242 icon = HelpWindow.icon(item.url()) |
3240 icon = WebBrowserWindow.icon(item.url()) |
3243 act.setIcon(icon) |
3241 act.setIcon(icon) |
3244 act.setText(item.title()) |
3242 act.setText(item.title()) |
3245 self.backMenu.addAction(act) |
3243 self.backMenu.addAction(act) |
3246 |
3244 |
3247 def __showForwardMenu(self): |
3245 def __showForwardMenu(self): |
3254 forwardItems = history.forwardItems(historyCount) |
3252 forwardItems = history.forwardItems(historyCount) |
3255 for index in range(len(forwardItems)): |
3253 for index in range(len(forwardItems)): |
3256 item = forwardItems[index] |
3254 item = forwardItems[index] |
3257 act = QAction(self) |
3255 act = QAction(self) |
3258 act.setData(index + 1) |
3256 act.setData(index + 1) |
3259 icon = HelpWindow.icon(item.url()) |
3257 icon = WebBrowserWindow.icon(item.url()) |
3260 act.setIcon(icon) |
3258 act.setIcon(icon) |
3261 act.setText(item.title()) |
3259 act.setText(item.title()) |
3262 self.forwardMenu.addAction(act) |
3260 self.forwardMenu.addAction(act) |
3263 |
3261 |
3264 def __navigationMenuActionTriggered(self, act): |
3262 def __navigationMenuActionTriggered(self, act): |
3309 ## except AttributeError: |
3307 ## except AttributeError: |
3310 ## pass |
3308 ## pass |
3311 # TODO: Cookies |
3309 # TODO: Cookies |
3312 ## if cookies: |
3310 ## if cookies: |
3313 ## self.cookieJar().clear() |
3311 ## self.cookieJar().clear() |
3314 # TODO: Passwords |
3312 if passwords: |
3315 ## if passwords: |
3313 self.passwordManager().clear() |
3316 ## self.passwordManager().clear() |
|
3317 # TODO: Web Databases |
3314 # TODO: Web Databases |
3318 ## if databases: |
3315 ## if databases: |
3319 ## if hasattr(QWebDatabase, "removeAllDatabases"): |
3316 ## if hasattr(QWebDatabase, "removeAllDatabases"): |
3320 ## QWebDatabase.removeAllDatabases() |
3317 ## QWebDatabase.removeAllDatabases() |
3321 ## else: |
3318 ## else: |
3355 |
3352 |
3356 @return reference to the search engines configuration action (QAction) |
3353 @return reference to the search engines configuration action (QAction) |
3357 """ |
3354 """ |
3358 return self.searchEnginesAct |
3355 return self.searchEnginesAct |
3359 |
3356 |
3360 ## def __showPasswordsDialog(self): |
3357 def __showPasswordsDialog(self): |
3361 ## """ |
3358 """ |
3362 ## Private slot to show the passwords management dialog. |
3359 Private slot to show the passwords management dialog. |
3363 ## """ |
3360 """ |
3364 ## from .Passwords.PasswordsDialog import PasswordsDialog |
3361 from .Passwords.PasswordsDialog import PasswordsDialog |
3365 ## |
3362 |
3366 ## dlg = PasswordsDialog(self) |
3363 dlg = PasswordsDialog(self) |
3367 ## dlg.exec_() |
3364 dlg.exec_() |
3368 ## |
3365 |
3369 ## def __showCertificatesDialog(self): |
3366 ## def __showCertificatesDialog(self): |
3370 ## """ |
3367 ## """ |
3371 ## Private slot to show the certificates management dialog. |
3368 ## Private slot to show the certificates management dialog. |
3372 ## """ |
3369 ## """ |
3373 ## from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog |
3370 ## from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog |
3510 from .History.HistoryManager import HistoryManager |
3507 from .History.HistoryManager import HistoryManager |
3511 cls._historyManager = HistoryManager() |
3508 cls._historyManager = HistoryManager() |
3512 |
3509 |
3513 return cls._historyManager |
3510 return cls._historyManager |
3514 |
3511 |
3515 ## @classmethod |
3512 @classmethod |
3516 ## def passwordManager(cls): |
3513 def passwordManager(cls): |
3517 ## """ |
3514 """ |
3518 ## Class method to get a reference to the password manager. |
3515 Class method to get a reference to the password manager. |
3519 ## |
3516 |
3520 ## @return reference to the password manager (PasswordManager) |
3517 @return reference to the password manager (PasswordManager) |
3521 ## """ |
3518 """ |
3522 ## if cls._passwordManager is None: |
3519 if cls._passwordManager is None: |
3523 ## from .Passwords.PasswordManager import PasswordManager |
3520 from .Passwords.PasswordManager import PasswordManager |
3524 ## cls._passwordManager = PasswordManager() |
3521 cls._passwordManager = PasswordManager() |
3525 ## |
3522 |
3526 ## return cls._passwordManager |
3523 return cls._passwordManager |
3527 ## |
3524 |
3528 ## @classmethod |
3525 ## @classmethod |
3529 ## def adBlockManager(cls): |
3526 ## def adBlockManager(cls): |
3530 ## """ |
3527 ## """ |
3531 ## Class method to get a reference to the AdBlock manager. |
3528 ## Class method to get a reference to the AdBlock manager. |
3532 ## |
3529 ## |
3549 ## @classmethod |
3546 ## @classmethod |
3550 ## def downloadManager(cls): |
3547 ## def downloadManager(cls): |
3551 ## """ |
3548 ## """ |
3552 ## Class method to get a reference to the download manager. |
3549 ## Class method to get a reference to the download manager. |
3553 ## |
3550 ## |
3554 ## @return reference to the password manager (DownloadManager) |
3551 ## @return reference to the download manager (DownloadManager) |
3555 ## """ |
3552 ## """ |
3556 ## if cls._downloadManager is None: |
3553 ## if cls._downloadManager is None: |
3557 ## from .Download.DownloadManager import DownloadManager |
3554 ## from .Download.DownloadManager import DownloadManager |
3558 ## cls._downloadManager = DownloadManager() |
3555 ## cls._downloadManager = DownloadManager() |
3559 ## |
3556 ## |