From 348661c92f251f0f4ab0cd815e1bbe73f698b838 Mon Sep 17 00:00:00 2001 From: Fabio Fantoni Date: Fri, 28 Aug 2026 20:40:38 +0200 Subject: [PATCH] cs_themes: hide the simplified settings button when no styles are installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The simplified page is only usable when a file in /usr/share/cinnamon/styles.d provides at least one style whose themes are all installed. On a system where nothing ships one — Cinnamon itself stopped shipping 00_cinnamon.styles in 13b1ad104e88197f6c4e2d02ab2674c07254b8e8 — the page ends up with "Custom" as the only entry of the style combo and the three appearance buttons insensitive, and since the stack switcher is hidden there, the only way out is the "Customize" button. Startup already handles this by opening the advanced page when no variant is active, but the "Simplified settings..." button of that page keeps offering the empty page anyway. Keep a reference to the button and drive its visibility from the number of styles found, both when it is built and at the end of reset_look_ui(). set_no_show_all() is needed because the page is shown with show_all(), which would otherwise make the button visible again. Fixes #13962 Assisted-by: Claude Code:claude-opus-5 --- .../cinnamon/cinnamon-settings/modules/cs_themes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py index 8c98a3780f..2ea4f641cf 100755 --- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py +++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py @@ -218,6 +218,7 @@ def on_module_selected(self): self.active_style = None self.active_mode_name = None self.active_variant = None + self.simplified_button = None # HiDPI support for mode in ["mixed", "dark", "light"]: @@ -261,6 +262,11 @@ def on_module_selected(self): button.set_label(_("Simplified settings...")) button.set_halign(Gtk.Align.END) button.connect("clicked", self.on_simplified_button_clicked) + # no_show_all, or the show_all() done on the page would reveal the + # button again after update_simplified_button() hid it + button.set_no_show_all(True) + self.simplified_button = button + self.update_simplified_button() page.add(button) page = DownloadSpicesPage(self, 'theme', self.spices, self.window) @@ -525,8 +531,14 @@ def reset_look_ui(self): # Position style combo on "Custom" self.style_combo.append_text(_("Custom")) self.style_combo.set_active(len(self.styles.keys())) + self.update_simplified_button() self.ui_ready = True + def update_simplified_button(self): + # With no styles installed the simplified page has nothing to offer + if self.simplified_button is not None: + self.simplified_button.set_visible(len(self.styles) > 0) + def on_customize_button_clicked(self, widget): self.set_button_chooser(self.icon_chooser, self.settings.get_string("icon-theme"), 'icons', 'icons', ICON_SIZE) self.set_button_chooser(self.cursor_chooser, self.settings.get_string("cursor-theme"), 'icons', 'cursors', 32)