52 QWhatsThis, |
58 QWhatsThis, |
53 QWidget, |
59 QWidget, |
54 ) |
60 ) |
55 |
61 |
56 from eric7 import Globals, Preferences, Testing, Utilities |
62 from eric7 import Globals, Preferences, Testing, Utilities |
|
63 from eric7.__version__ import Version, VersionOnly |
57 from eric7.CondaInterface.Conda import Conda |
64 from eric7.CondaInterface.Conda import Conda |
58 from eric7.Debugger.DebugServer import DebugServer |
65 from eric7.Debugger.DebugServer import DebugServer |
59 from eric7.Debugger.DebugUI import DebugUI |
66 from eric7.Debugger.DebugUI import DebugUI |
60 from eric7.EricCore import EricFileSystemWatcher |
67 from eric7.EricCore import EricFileSystemWatcher |
61 from eric7.EricGui import EricPixmapCache |
68 from eric7.EricGui import EricPixmapCache |
91 from eric7.Tasks.TasksFile import TasksFile |
98 from eric7.Tasks.TasksFile import TasksFile |
92 from eric7.Testing.TestingWidget import clearSavedHistories |
99 from eric7.Testing.TestingWidget import clearSavedHistories |
93 from eric7.Utilities.BackgroundService import BackgroundService |
100 from eric7.Utilities.BackgroundService import BackgroundService |
94 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager |
101 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager |
95 |
102 |
96 from .Info import BugAddress, FeatureAddress, Program, Version, VersionOnly |
103 from .Info import BugAddress, FeatureAddress, Program |
97 from .NotificationWidget import NotificationTypes |
104 from .NotificationWidget import NotificationTypes |
98 |
105 |
99 try: |
106 try: |
100 from eric7.EricNetwork.EricSslErrorHandler import ( |
107 from eric7.EricNetwork.EricSslErrorHandler import ( |
101 EricSslErrorHandler, |
108 EricSslErrorHandler, |
2730 self.tr("""<b>Show Versions</b><p>Display version information.</p>""") |
2737 self.tr("""<b>Show Versions</b><p>Display version information.</p>""") |
2731 ) |
2738 ) |
2732 self.versionAct.triggered.connect(self.__showVersions) |
2739 self.versionAct.triggered.connect(self.__showVersions) |
2733 self.actions.append(self.versionAct) |
2740 self.actions.append(self.versionAct) |
2734 |
2741 |
|
2742 self.copyVersionAct = EricAction( |
|
2743 self.tr("Copy Versions"), |
|
2744 self.tr("&Copy Versions"), |
|
2745 0, |
|
2746 0, |
|
2747 self, |
|
2748 "copy_versions", |
|
2749 ) |
|
2750 self.copyVersionAct.setStatusTip( |
|
2751 self.tr("Copy version information to the clipboard") |
|
2752 ) |
|
2753 self.copyVersionAct.setWhatsThis( |
|
2754 self.tr( |
|
2755 "<b>Copy Versions</b><p>This generates version information and copies" |
|
2756 " it to the clipboard.</p>" |
|
2757 ) |
|
2758 ) |
|
2759 self.copyVersionAct.triggered.connect(self.__copyVersions) |
|
2760 self.actions.append(self.copyVersionAct) |
|
2761 |
2735 self.showErrorLogAct = EricAction( |
2762 self.showErrorLogAct = EricAction( |
2736 self.tr("Show Error Log"), |
2763 self.tr("Show Error Log"), |
2737 self.tr("Show Error &Log..."), |
2764 self.tr("Show Error &Log..."), |
2738 0, |
2765 0, |
2739 0, |
2766 0, |
4066 self.__menus["help"].addAction(self.pyside2DocAct) |
4093 self.__menus["help"].addAction(self.pyside2DocAct) |
4067 if self.pyside6DocAct is not None: |
4094 if self.pyside6DocAct is not None: |
4068 self.__menus["help"].addAction(self.pyside6DocAct) |
4095 self.__menus["help"].addAction(self.pyside6DocAct) |
4069 self.__menus["help"].addSeparator() |
4096 self.__menus["help"].addSeparator() |
4070 self.__menus["help"].addAction(self.versionAct) |
4097 self.__menus["help"].addAction(self.versionAct) |
|
4098 self.__menus["help"].addAction(self.copyVersionAct) |
4071 self.__menus["help"].addSeparator() |
4099 self.__menus["help"].addSeparator() |
4072 self.__menus["help"].addAction(self.showInstallInfoAct) |
4100 self.__menus["help"].addAction(self.showInstallInfoAct) |
4073 self.__menus["help"].addSeparator() |
4101 self.__menus["help"].addSeparator() |
4074 self.__menus["help"].addAction(self.showErrorLogAct) |
4102 self.__menus["help"].addAction(self.showErrorLogAct) |
4075 self.__menus["help"].addAction(self.reportBugAct) |
4103 self.__menus["help"].addAction(self.reportBugAct) |
4592 ) |
4620 ) |
4593 |
4621 |
4594 versionText += self.tr("""</table>""") |
4622 versionText += self.tr("""</table>""") |
4595 |
4623 |
4596 VersionsDialog(self, Program, versionText) |
4624 VersionsDialog(self, Program, versionText) |
|
4625 |
|
4626 def __copyVersions(self): |
|
4627 """ |
|
4628 Private method to generated version information and copy that to the clipboard. |
|
4629 """ |
|
4630 QGuiApplication.clipboard().setText( |
|
4631 "\n----\n\n{0}\n\n----\n\n{1}\n\n----\n\n{2}".format( |
|
4632 Utilities.generateVersionInfo("\n"), |
|
4633 Utilities.generatePluginsVersionInfo("\n"), |
|
4634 Utilities.generateDistroInfo("\n"), |
|
4635 ) |
|
4636 ) |
4597 |
4637 |
4598 def __reportBug(self): |
4638 def __reportBug(self): |
4599 """ |
4639 """ |
4600 Private slot to handle the Report Bug dialog. |
4640 Private slot to handle the Report Bug dialog. |
4601 """ |
4641 """ |
8487 |
8527 |
8488 @param _evt reference to the show event (unused) |
8528 @param _evt reference to the show event (unused) |
8489 @type QShowEvent |
8529 @type QShowEvent |
8490 """ |
8530 """ |
8491 if self.__startup: |
8531 if self.__startup: |
8492 if Preferences.getGeometry("MainMaximized"): |
8532 if ( |
|
8533 Preferences.getGeometry("MainMaximized") |
|
8534 and not DesktopUtilities.isWaylandSession() |
|
8535 ): |
8493 self.setWindowState(Qt.WindowState.WindowMaximized) |
8536 self.setWindowState(Qt.WindowState.WindowMaximized) |
8494 self.__startup = False |
8537 self.__startup = False |
8495 |
8538 |
8496 ########################################## |
8539 ########################################## |
8497 ## Support for desktop notifications below |
8540 ## Support for desktop notifications below |