src/eric7/UI/UserInterface.py

branch
eric7
changeset 9658
1da417a9645d
parent 9653
e67609152c5e
child 9695
ad962e9b904d
--- a/src/eric7/UI/UserInterface.py	Mon Jan 02 14:22:27 2023 +0100
+++ b/src/eric7/UI/UserInterface.py	Mon Jan 02 14:24:18 2023 +0100
@@ -8253,20 +8253,22 @@
             ]
             updateAvailable = bool(newerVersionsTuple)
             if updateAvailable:
-                EricMessageBox.information(
+                yes = EricMessageBox.yesNo(
                     self,
                     self.tr("Upgrade available"),
                     self.tr(
                         """<p>A newer version of the <b>eric-ide</b> package is"""
                         """ available at <a href="{0}/eric-ide/">"""
                         """PyPI</a>.</p><p>Installed: {1}<br/>Available: <b>{2}</b>"""
-                        """</p>"""
+                        """</p><p>Shall <b>eric-ide</b> be upgraded?</p>"""
                     ).format(
                         self.pipInterface.getIndexUrlPypi(),
                         VersionOnly,
                         ".".join(str(p) for p in max(newerVersionsTuple) if p > 0),
                     ),
                 )
+                if yes and self.__shutdown():
+                    self.__performUpgrade("eric")
 
     def __sslErrors(self, reply, errors):
         """

eric ide

mercurial