2486 from Preferences.ConfigurationDialog import ConfigurationDialog |
2486 from Preferences.ConfigurationDialog import ConfigurationDialog |
2487 dlg = ConfigurationDialog( |
2487 dlg = ConfigurationDialog( |
2488 self, 'Configuration', True, fromEric=self.fromEric, |
2488 self, 'Configuration', True, fromEric=self.fromEric, |
2489 displayMode=ConfigurationDialog.HelpBrowserMode) |
2489 displayMode=ConfigurationDialog.HelpBrowserMode) |
2490 dlg.preferencesChanged.connect(self.preferencesChanged) |
2490 dlg.preferencesChanged.connect(self.preferencesChanged) |
2491 dlg.masterPasswordChanged.connect(self.masterPasswordChanged) |
2491 dlg.masterPasswordChanged.connect( |
|
2492 lambda old, new: self.masterPasswordChanged(old, new, local=True)) |
2492 dlg.show() |
2493 dlg.show() |
2493 if self.__lastConfigurationPageName: |
2494 if self.__lastConfigurationPageName: |
2494 dlg.showConfigurationPageByName(self.__lastConfigurationPageName) |
2495 dlg.showConfigurationPageByName(self.__lastConfigurationPageName) |
2495 else: |
2496 else: |
2496 dlg.showConfigurationPageByName("empty") |
2497 dlg.showConfigurationPageByName("empty") |
2529 else: |
2530 else: |
2530 self.virustotalScanCurrentAct.setEnabled(True) |
2531 self.virustotalScanCurrentAct.setEnabled(True) |
2531 self.virustotalIpReportAct.setEnabled(True) |
2532 self.virustotalIpReportAct.setEnabled(True) |
2532 self.virustotalDomainReportAct.setEnabled(True) |
2533 self.virustotalDomainReportAct.setEnabled(True) |
2533 |
2534 |
2534 def masterPasswordChanged(self, oldPassword, newPassword): |
2535 def masterPasswordChanged(self, oldPassword, newPassword, local=False): |
2535 """ |
2536 """ |
2536 Public slot to handle the change of the master password. |
2537 Public slot to handle the change of the master password. |
2537 |
2538 |
2538 @param oldPassword current master password (string) |
2539 @param oldPassword current master password |
2539 @param newPassword new master password (string) |
2540 @type str |
2540 """ |
2541 @param newPassword new master password |
2541 from Preferences.ConfigurationDialog import ConfigurationDialog |
2542 @type str |
|
2543 @param local flag indicating being called from the local configuration |
|
2544 dialog |
|
2545 @type bool |
|
2546 """ |
2542 self.passwordManager().masterPasswordChanged(oldPassword, newPassword) |
2547 self.passwordManager().masterPasswordChanged(oldPassword, newPassword) |
2543 if self.fromEric and isinstance(self.sender(), ConfigurationDialog): |
2548 if self.fromEric and local: |
2544 # we were called from our local configuration dialog |
2549 # we were called from our local configuration dialog |
2545 Preferences.convertPasswords(oldPassword, newPassword) |
2550 Preferences.convertPasswords(oldPassword, newPassword) |
2546 Utilities.crypto.changeRememberedMaster(newPassword) |
2551 Utilities.crypto.changeRememberedMaster(newPassword) |
2547 |
2552 |
2548 def __showAcceptedLanguages(self): |
2553 def __showAcceptedLanguages(self): |
3619 Private slot to show the feeds manager dialog. |
3624 Private slot to show the feeds manager dialog. |
3620 """ |
3625 """ |
3621 feedsManager = self.feedsManager() |
3626 feedsManager = self.feedsManager() |
3622 feedsManager.openUrl.connect(self.openUrl) |
3627 feedsManager.openUrl.connect(self.openUrl) |
3623 feedsManager.newUrl.connect(self.openUrlNewTab) |
3628 feedsManager.newUrl.connect(self.openUrlNewTab) |
3624 feedsManager.rejected.connect(self.__feedsManagerClosed) |
3629 feedsManager.rejected.connect( |
|
3630 lambda fm: self.__feedsManagerClosed(fm)) |
3625 feedsManager.show() |
3631 feedsManager.show() |
3626 |
3632 |
3627 def __feedsManagerClosed(self): |
3633 def __feedsManagerClosed(self, feedsManager): |
3628 """ |
3634 """ |
3629 Private slot to handle closing the feeds manager dialog. |
3635 Private slot to handle closing the feeds manager dialog. |
3630 """ |
3636 |
3631 feedsManager = self.sender() |
3637 @param feedsManager reference to the feeds manager object |
|
3638 @type FeedsManager |
|
3639 """ |
3632 feedsManager.openUrl.disconnect(self.openUrl) |
3640 feedsManager.openUrl.disconnect(self.openUrl) |
3633 feedsManager.newUrl.disconnect(self.openUrlNewTab) |
3641 feedsManager.newUrl.disconnect(self.openUrlNewTab) |
3634 feedsManager.rejected.disconnect(self.__feedsManagerClosed) |
3642 feedsManager.rejected.disconnect() |
3635 |
3643 |
3636 def __showSiteinfoDialog(self): |
3644 def __showSiteinfoDialog(self): |
3637 """ |
3645 """ |
3638 Private slot to show the site info dialog. |
3646 Private slot to show the site info dialog. |
3639 """ |
3647 """ |