mirror of
https://gitlab.gnome.org/june/top-bar-organizer.git
synced 2026-01-10 16:26:35 +01:00
fix: set selected visibility option to settings value on options open
This commit is contained in:
parent
bcb61b51ac
commit
a477d3b95a
1 changed files with 11 additions and 0 deletions
|
|
@ -30,6 +30,17 @@ export default class PrefsBoxOrderItemOptionsDialog extends Adw.Dialog {
|
|||
this.item = item;
|
||||
// Load the settings.
|
||||
this.#settings = ExtensionPreferences.lookupByURL(import.meta.url)!.getSettings();
|
||||
|
||||
// Set the selected visibility row choice to the settings value.
|
||||
const itemsToHide = new Set(this.#settings.get_strv("hide"));
|
||||
const itemsToShow = new Set(this.#settings.get_strv("show"));
|
||||
if (itemsToHide.has(this.item)) {
|
||||
this._visibility_row.set_selected(1);
|
||||
} else if (itemsToShow.has(this.item)) {
|
||||
this._visibility_row.set_selected(2);
|
||||
} else {
|
||||
this._visibility_row.set_selected(0);
|
||||
}
|
||||
}
|
||||
|
||||
onVisibilityRowSelectionChanged(): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue