From b5c93aaa02034902b67c0a7fa4ab299d96b6b846 Mon Sep 17 00:00:00 2001 From: randomnoise Date: Mon, 20 Oct 2025 20:18:43 +0300 Subject: [PATCH 1/2] Add warning tray icon Based on `mintupdate-error-symbolic.svg` GTK SVG color use reference: https://docs.gtk.org/gtk4/icon-format.html#supported-svg-attributes --- .../status/mintupdate-warning-symbolic.svg | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 usr/share/icons/hicolor/scalable/status/mintupdate-warning-symbolic.svg diff --git a/usr/share/icons/hicolor/scalable/status/mintupdate-warning-symbolic.svg b/usr/share/icons/hicolor/scalable/status/mintupdate-warning-symbolic.svg new file mode 100644 index 00000000..724c61cb --- /dev/null +++ b/usr/share/icons/hicolor/scalable/status/mintupdate-warning-symbolic.svg @@ -0,0 +1,79 @@ + + + + + + image/svg+xml + + Linux Mint Update Manager - Warning icon + + + + Linux Mint Update Manager - Warning icon + + + + + + + + + + + + + + + + + From dc893ea8fb81cdbf3b0d16ff2f8724acd6d63584 Mon Sep 17 00:00:00 2001 From: randomnoise Date: Tue, 21 Oct 2025 20:19:06 +0300 Subject: [PATCH 2/2] Use warning tray icon when reboot is required Prioritize the 'reboot required' icon over 'available updates' according to mtwebster's feedback and continue informing if there are selected updates. Also align with the opening delimiter, based on PEP8 style guide. Reference: https://peps.python.org/pep-0008/#indentation Co-authored-by: Michael Webster --- usr/lib/linuxmint/mintUpdate/mintUpdate.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/usr/lib/linuxmint/mintUpdate/mintUpdate.py b/usr/lib/linuxmint/mintUpdate/mintUpdate.py index e133cc78..6cf99506 100755 --- a/usr/lib/linuxmint/mintUpdate/mintUpdate.py +++ b/usr/lib/linuxmint/mintUpdate/mintUpdate.py @@ -639,12 +639,13 @@ def show_error(self, error_msg): @_idle def show_updates_in_UI(self, num_visible, num_software, num_security, download_size, is_self_update, model_items): + status_string = "" + if num_visible > 0: self.logger.write("Found %d software updates" % num_visible) if is_self_update: self.ui_stack.set_visible_child_name("self_update_page") self.ui_statusbar.set_visible(False) - status_string = "" details = [] for item in model_items: @@ -660,13 +661,19 @@ def show_updates_in_UI(self, num_visible, num_software, num_security, download_s self.ui_install_button.set_sensitive(True) self.ui_window.set_sensitive(True) systray_tooltip = gettext.ngettext("%d update available", "%d updates available", num_visible) % num_visible - self.set_status(status_string, systray_tooltip, "mintupdate-updates-available-symbolic", True) + + if not self.reboot_required: + self.set_status(status_string, systray_tooltip, "mintupdate-updates-available-symbolic", True) else: self.logger.write("System is up to date") self.ui_stack.set_visible_child_name("success_page") - self.set_status("", _("Your system is up to date"), "mintupdate-up-to-date-symbolic", - not self.settings.get_boolean("hide-systray")) + if not self.reboot_required: + self.set_status("", _("Your system is up to date"), "mintupdate-up-to-date-symbolic", + not self.settings.get_boolean("hide-systray")) + + if self.reboot_required: + self.set_status(status_string, _("Reboot required"), "mintupdate-warning-symbolic", True) self.ui_notebook_details.set_current_page(0)