77 # just the name is needed |
77 # just the name is needed |
78 ) |
78 ) |
79 |
79 |
80 if environmentName: |
80 if environmentName: |
81 with EricOverrideCursor(): |
81 with EricOverrideCursor(): |
82 pyqtUpdateAvailable = pip.checkPackageOutdated( |
82 pyqtUpdateAvailable, pyqtVersionsData = pip.checkPackageOutdated( |
83 "pyqt6", environmentName |
83 "pyqt6", environmentName |
84 )[0] |
84 ) |
85 ericUpdateAvailable = pip.checkPackageOutdated( |
85 ericUpdateAvailable, ericVersionsData = pip.checkPackageOutdated( |
86 "eric-ide", environmentName |
86 "eric-ide", environmentName |
87 )[0] |
87 ) |
88 |
88 |
89 if pyqtUpdateAvailable or ericUpdateAvailable: |
89 if pyqtUpdateAvailable or ericUpdateAvailable: |
90 self.buttonBox.removeButton(self.__checkUpdateButton) |
90 self.buttonBox.removeButton(self.__checkUpdateButton) |
91 self.__checkUpdateButton = None |
91 self.__checkUpdateButton = None |
92 else: |
92 else: |
95 if ericUpdateAvailable: |
95 if ericUpdateAvailable: |
96 self.__upgradeEricButton = self.buttonBox.addButton( |
96 self.__upgradeEricButton = self.buttonBox.addButton( |
97 self.tr("Upgrade eric7..."), QDialogButtonBox.ButtonRole.ActionRole |
97 self.tr("Upgrade eric7..."), QDialogButtonBox.ButtonRole.ActionRole |
98 ) |
98 ) |
99 self.__upgradeEricButton.clicked.connect(self.__ui.upgradeEric) |
99 self.__upgradeEricButton.clicked.connect(self.__ui.upgradeEric) |
100 msg += self.tr("<p>An upgrade of <b>eric7</b> is available.</p>") |
100 msg += self.tr( |
|
101 "<p>An upgrade of <b>eric7</b> is available.<br/>" |
|
102 "<b>{0}</b>: {1} to {2}.</p>" |
|
103 ).format(*ericVersionsData[0]) |
101 |
104 |
102 if pyqtUpdateAvailable: |
105 if pyqtUpdateAvailable: |
103 self.__upgradePyQtButton = self.buttonBox.addButton( |
106 self.__upgradePyQtButton = self.buttonBox.addButton( |
104 self.tr("Upgrade PyQt6..."), QDialogButtonBox.ButtonRole.ActionRole |
107 self.tr("Upgrade PyQt6..."), QDialogButtonBox.ButtonRole.ActionRole |
105 ) |
108 ) |
106 self.__upgradePyQtButton.clicked.connect(self.__ui.upgradePyQt) |
109 self.__upgradePyQtButton.clicked.connect(self.__ui.upgradePyQt) |
107 msg += self.tr("<p>An upgrade of <b>PyQt6</b> is available.</p>") |
110 msg += self.tr( |
|
111 "<p>An upgrade of <b>PyQt6</b> is available.<br/>{0}</p>" |
|
112 ).format( |
|
113 "<br/>".join( |
|
114 self.tr("<b>{0}</b>: {1} to {2}").format(*v) |
|
115 for v in pyqtVersionsData |
|
116 ) |
|
117 ) |
108 |
118 |
109 if ericUpdateAvailable and pyqtUpdateAvailable: |
119 if ericUpdateAvailable and pyqtUpdateAvailable: |
110 self.__upgradeBothButton = self.buttonBox.addButton( |
120 self.__upgradeBothButton = self.buttonBox.addButton( |
111 self.tr("Upgrade Both..."), QDialogButtonBox.ButtonRole.ActionRole |
121 self.tr("Upgrade Both..."), QDialogButtonBox.ButtonRole.ActionRole |
112 ) |
122 ) |