Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ debian/.debhelper
debian/files
debian/mintupdate.debhelper.log
debian/mintupdate.substvars
mintupdate-window.png
__pycache__/
13 changes: 9 additions & 4 deletions usr/lib/linuxmint/mintUpdate/mintUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2139,10 +2139,10 @@ def refresh_updates(self):

############## INSTALLATION #########

def show_cinnamon_error(self, title, message):
Gdk.threads_add_idle(GLib.PRIORITY_DEFAULT_IDLE, self._show_cinnamon_error_cb, title, message)
def show_install_error(self, title, message):
Gdk.threads_add_idle(GLib.PRIORITY_DEFAULT_IDLE, self._show_install_error_cb, title, message)

def _show_cinnamon_error_cb(self, title, message):
def _show_install_error_cb(self, title, message):
dialog = Gtk.MessageDialog(transient_for=self.ui_window,
destroy_with_parent=True,
modal=True,
Expand Down Expand Up @@ -2261,6 +2261,11 @@ def _do_install(self):
self.flatpak_updater.perform_updates()
if self.flatpak_updater.error is not None:
self.logger.write_error("Flatpak update failed %s" % self.flatpak_updater.error)
self.show_install_error(_("Could not update Flatpaks"),
str(self.flatpak_updater.error))
self.set_status(_("Could not update Flatpaks"),
_("Could not update Flatpaks"),
"mintupdate-error-symbolic", True)
refresh_needed = True

if self.spices:
Expand All @@ -2277,7 +2282,7 @@ def _do_install(self):
need_cinnamon_restart = True
except Exception as e:
self.logger.write_error("Cinnamon spice install failed %s" % str(e))
self.show_cinnamon_error(_("Could not update Cinnamon Spices"), str(e))
self.show_install_error(_("Could not update Cinnamon Spices"), str(e))
if need_cinnamon_restart and not self.reboot_required and \
os.getenv("XDG_CURRENT_DESKTOP") in ["Cinnamon", "X-Cinnamon"]:
subprocess.run(["cinnamon-dbus-command", "RestartCinnamon", "0"])
Expand Down