cs_themes: hide the simplified settings button when no styles are installed - #13963
Open
Fantu wants to merge 1 commit into
Open
cs_themes: hide the simplified settings button when no styles are installed#13963Fantu wants to merge 1 commit into
Fantu wants to merge 1 commit into
Conversation
…talled 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 13b1ad1 — 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 linuxmint#13962 Assisted-by: Claude Code:claude-opus-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13962.
The simplified page needs at least one style from
/usr/share/cinnamon/styles.dwhose themes are all installed. Where nothing ships such a file — Cinnamon itself dropped00_cinnamon.stylesin 13b1ad1 — the page has only "Custom" in the style combo, the three appearance buttons are insensitive, and the stack switcher is hidden there, so the only way out is "Customize".Startup already avoids that page when no variant is active, but the "Simplified settings..." button of the advanced page still offers it.
This keeps a reference to that button and drives its visibility from the number of styles found, when it is built and at the end of
reset_look_ui(), so it follows if the styles change.set_no_show_all()is needed because the page is shown withshow_all(), which would otherwise make the button visible again.Tested on Debian unstable (Cinnamon 6.6.9), which ships no styles file: the button is gone and the rest of the page is unchanged. Adding a valid styles file brings the button back and the simplified page works as before.