eric6/UI/InstallInfoDialog.py

Sat, 10 Apr 2021 18:38:27 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 10 Apr 2021 18:38:27 +0200
changeset 8218
7c09585bd960
parent 8143
2c730d5fd177
permissions
-rw-r--r--

Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).

7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7836
diff changeset
3 # Copyright (c) 2020 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
4 #
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
5
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to show information about the installation.
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import json
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
11 import os
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from PyQt5.QtCore import pyqtSlot
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
14 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 from E5Gui import E5MessageBox
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 from .Ui_InstallInfoDialog import Ui_InstallInfoDialog
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 import Globals
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 import UI.PixmapCache
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 class InstallInfoDialog(QDialog, Ui_InstallInfoDialog):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
26 Class implementing a dialog to show information about the installation.
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 def __init__(self, parent=None):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Constructor
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 @param parent reference to the parent widget
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @type QWidget
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 """
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
35 super().__init__(parent)
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.setupUi(self)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
38 self.__deleteButton = self.buttonBox.addButton(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
39 self.tr("Delete Info"), QDialogButtonBox.ButtonRole.ActionRole)
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
40 self.__deleteButton.clicked.connect(self.on_deleteButton_clicked)
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
41 self.__updateButton = self.buttonBox.addButton(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
42 self.tr("Upgrade Instructions"),
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
43 QDialogButtonBox.ButtonRole.ActionRole)
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
44 self.__updateButton.clicked.connect(self.on_updateButton_clicked)
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
45
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.__edited = False
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 self.__loaded = True
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 self.editButton.setIcon(UI.PixmapCache.getIcon("infoEdit"))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSave"))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 infoFileName = Globals.getInstallInfoFilePath()
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
53
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
54 self.__deleteButton.setEnabled(os.path.exists(infoFileName))
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
55
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 try:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 with open(infoFileName, "r") as infoFile:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 self.__info = json.load(infoFile)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59
7808
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
60 if Globals.isWindowsPlatform():
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
61 self.sudoLabel1.setText(self.tr("Installed as Administrator:"))
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
62 else:
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
63 self.sudoLabel1.setText(self.tr("Installed with sudo:"))
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
64 self.sudoLabel2.setText(
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 self.tr("Yes") if self.__info["sudo"] else self.tr("No"))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.userLabel.setText(self.__info["user"])
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
67 self.installedFromEdit.setText(self.__info["install_cwd"])
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 self.interpreteEdit.setText(self.__info["exe"])
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 self.commandEdit.setText(self.__info["argv"])
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 self.installPathEdit.setText(self.__info["eric"])
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 self.virtenvLabel.setText(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 self.tr("Yes") if self.__info["virtualenv"] else self.tr("No"))
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
73 self.remarksEdit.setPlainText(self.__info["remarks"])
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 if self.__info["pip"]:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.pipLabel.setText(self.tr(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 "'eric-ide' was installed from PyPI using the pip"
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 " command."))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 else:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 self.pipLabel.hide()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 if self.__info["guessed"]:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 self.guessLabel.setText(self.tr(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 "The information shown in this dialog was guessed at"
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 " the first start of eric."))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 else:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 self.guessLabel.hide()
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
86 if self.__info["edited"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
87 self.userProvidedLabel.setText(self.tr(
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
88 "The installation information was provided by the user."
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
89 ))
7808
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
90 else:
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
91 self.userProvidedLabel.hide()
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
92 if self.__info["installed_on"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
93 self.installDateTimeLabel.setText(
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
94 self.__info["installed_on"] if self.__info["installed_on"]
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
95 else self.tr("unknown"))
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
96
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
97 self.__updateButton.setEnabled(bool(self.__info["exe"]))
7836
2f0d208b8137 Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7810
diff changeset
98 except OSError as err:
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 E5MessageBox.critical(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self,
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.tr("Load Install Information"),
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.tr("<p>The file containing the install information could"
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 " not be read.</p><p>Reason: {0}</p>""")
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 .format(str(err))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 )
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.__loaded = False
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 self.__info = {}
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
108
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
109 self.__updateButton.setEnabled(False)
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 def wasLoaded(self):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 Public method to check, if the install data was loaded.
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 @return flag indicating the data was loaded
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 @rtype bool
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 return self.__loaded
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 @pyqtSlot(bool)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 def on_editButton_toggled(self, checked):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 Private slot to switch the dialog into edit mode.
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 @param checked flag giving the button check state
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 @type bool
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 """
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
128 self.installedFromEdit.setReadOnly(not checked)
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.interpreteEdit.setReadOnly(not checked)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 self.commandEdit.setReadOnly(not checked)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 self.installPathEdit.setReadOnly(not checked)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 self.remarksEdit.setReadOnly(not checked)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 if checked:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 self.__edited = True
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 @pyqtSlot()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 def on_saveButton_clicked(self):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 Private slot handling the save button press.
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 if self.__edited:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 self.__saveData()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 @pyqtSlot()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 def reject(self):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 """
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
148 Public slot handling the closing of the dialog.
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 if self.__edited:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 yes = E5MessageBox.yesNo(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 self,
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 self.tr("Install Information"),
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 self.tr("""The install information was edited. Unsaved"""
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 """ changes will be lost. Save first?"""),
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 yesDefault=True)
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 if yes:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 self.__saveData()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
160 super().reject()
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 def __saveData(self):
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 """
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 Private method to save the data.
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 """
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
166 if self.installedFromEdit.text() != self.__info["install_cwd"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
167 self.__info["install_cwd"] = self.installedFromEdit.text()
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
168 self.__info["install_cwd_edited"] = True
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
169 if self.interpreteEdit.text() != self.__info["exe"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
170 self.__info["exe"] = self.interpreteEdit.text()
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
171 self.__info["exe_edited"] = True
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
172 if self.commandEdit.text() != self.__info["argv"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
173 self.__info["argv"] = self.commandEdit.text()
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
174 self.__info["argv_edited"] = True
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
175 if self.installPathEdit.text() != self.__info["eric"]:
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
176 self.__info["eric"] = self.installPathEdit.text()
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
177 self.__info["eric_edited"] = True
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 self.__info["remarks"] = self.remarksEdit.toPlainText()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 self.__info["edited"] = True
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 infoFileName = Globals.getInstallInfoFilePath()
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 try:
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 with open(infoFileName, "w") as infoFile:
7809
f5a61d073100 Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7808
diff changeset
184 json.dump(self.__info, infoFile, indent=2)
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 self.__edited = False
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 self.editButton.setChecked(False)
7836
2f0d208b8137 Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7810
diff changeset
187 except OSError as err:
7806
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 E5MessageBox.critical(
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 self,
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 self.tr("Save Install Information"),
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 self.tr("<p>The file containing the install information could"
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 " not be written.</p><p>Reason: {0}</p>""")
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 .format(str(err))
b346755b09a1 Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 )
7810
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
195
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
196 @pyqtSlot()
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
197 def on_deleteButton_clicked(self):
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
198 """
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
199 Private slot deleting the install information file.
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
200 """
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
201 res = E5MessageBox.yesNo(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
202 self,
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
203 self.tr("Delete Installation Information"),
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
204 self.tr("""Do you really want to delete the installation"""
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
205 """ information? It will be recreated at the next"""
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
206 """ start."""))
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
207 if not res:
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
208 return
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
209
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
210 infoFileName = Globals.getInstallInfoFilePath()
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
211 os.remove(infoFileName)
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
212
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
213 # local data will be deleted automatically
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
214 self.__edited = False
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
215
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
216 self.close()
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
217
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
218 @pyqtSlot()
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
219 def on_updateButton_clicked(self):
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
220 """
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
221 Private slot to show some upgrade instructions.
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
222 """
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
223 updateTextList = []
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
224 cmdPrefix = ""
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
225
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
226 if self.__info["sudo"]:
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
227 if Globals.isWindowsPlatform():
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
228 updateTextList.append(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
229 self.tr("Perform the following step(s) with Administrator"
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
230 " privileges.\n"))
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
231 else:
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
232 cmdPrefix = "sudo "
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
233
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
234 if self.__info["pip"]:
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
235 updateTextList.append(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
236 "{0}{1} -m pip install --upgrade eric-ide".format(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
237 cmdPrefix, self.__info["exe"],
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
238 )
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
239 )
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
240 else:
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
241 if (
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
242 "install_cwd" in self.__info and
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
243 bool(self.__info["install_cwd"])
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
244 ):
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
245 updateTextList.append(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
246 "cd {0}".format(self.__info["install_cwd"])
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
247 )
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
248 updateTextList.append(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
249 "{0}{1} {2}".format(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
250 cmdPrefix, self.__info["exe"], self.__info["argv"],
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
251 )
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
252 )
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
253
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
254 from E5Gui.E5PlainTextDialog import E5PlainTextDialog
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
255 dlg = E5PlainTextDialog(
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
256 title=self.tr("Upgrade Instructions"),
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
257 text="\n".join(updateTextList))
f8afd2238723 Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7809
diff changeset
258 dlg.exec()

eric ide

mercurial