Changes
6 changed files (+56/-7)
-
-
@@ -78,6 +78,11 @@ SPDX-License-Identifier: Apache-2.0<summary>Focus browse items on load</summary> <description>Move focus to the first browse item or search entry right after the page is loaded.</description> </key> <key name="no-insensitive-on-loading" type="b"> <default>false</default> <summary>Disable changing sensitivity before and after API calls</summary> <description>By default, Plac changes widgets' sensitivity before and after API calls to prevent race conditions and to indicate loading state. This option disables that.</description> </key> <key name="disable-csd" type="b"> <default>false</default> <summary>Hide window titlebar</summary>
-
-
-
@@ -75,6 +75,12 @@ SPDX-License-Identifier: Apache-2.0<property name="subtitle">Move focus to the first browse item or search entry right after the page is loaded.</property> </object> </child> <child> <object class="AdwSwitchRow" id="no_insensitive_on_loading"> <property name="title">Disable changing sensitivity before and after API calls</property> <property name="subtitle">By default, Plac changes widgets' sensitivity before and after API calls to prevent race conditions and to indicate loading state. This option disables that.</property> </object> </child> <child> <object class="AdwEntryRow" id="seek_step_size"> <property name="title">Seekbar step size</property>
-
-
-
@@ -29,6 +29,7 @@ namespace PlacGtkAdwaita {public const string SEEK_PAGE_SIZE = "seek-page-size"; public const string SHOW_BROWSE_ITEM_SEPARATORS = "show-browse-item-separators"; public const string FOCUS_BROWSE_ITEMS_ON_LOAD = "focus-browse-items-on-load"; public const string NO_INSENSITIVE_ON_LOADING = "no-insensitive-on-loading"; public const string DISABLE_CSD = "disable-csd"; public const string STARTUP_CATEGORY = "startup-category";
-
@@ -80,6 +81,10 @@ namespace PlacGtkAdwaita {set { settings.set_boolean(FOCUS_BROWSE_ITEMS_ON_LOAD, value); } } public bool no_insensitive_on_loading { owned get { return settings.get_boolean(NO_INSENSITIVE_ON_LOADING); } } public bool disable_csd { owned get { return settings.get_boolean(FOCUS_BROWSE_ITEMS_ON_LOAD); } set { settings.set_boolean(FOCUS_BROWSE_ITEMS_ON_LOAD, value); }
-
-
-
@@ -119,6 +119,10 @@ namespace PlacGtkAdwaita {items.factory = factory; items.activate.connect((position) => { if (this.is_loading) { return; } var item = (BrowseItem.Item) items_store.get_item(position); if (item == null) { return;
-
@@ -129,7 +133,9 @@ namespace PlacGtkAdwaita {}); back.clicked.connect(() => { pop(); if (!this.is_loading) { pop(); } }); settings.settings.bind(Settings.SHOW_BROWSE_ITEM_SEPARATORS, items, "show-separators", GET);
-
@@ -150,7 +156,10 @@ namespace PlacGtkAdwaita {is_loading = true; loading_start(); loading.visible = true; this.sensitive = false; if (!settings.no_insensitive_on_loading) { this.sensitive = false; } } private void end_loading() {
-
-
-
@@ -74,6 +74,7 @@ namespace PlacGtkAdwaita {private Settings settings = new Settings(); private Roon.Transport.Zone? watching_zone = null; private bool is_actions_available = true; private Roon.Transport.Zone? selected_zone { owned get {
-
@@ -153,7 +154,7 @@ namespace PlacGtkAdwaita {}); play.clicked.connect(() => { if (conn == null || selected_zone == null) { if (conn == null || selected_zone == null || !is_actions_available) { return; }
-
@@ -170,7 +171,7 @@ namespace PlacGtkAdwaita {}); pause.clicked.connect(() => { if (conn == null || selected_zone == null) { if (conn == null || selected_zone == null || !is_actions_available) { return; }
-
@@ -187,7 +188,7 @@ namespace PlacGtkAdwaita {}); stop.clicked.connect(() => { if (conn == null || selected_zone == null) { if (conn == null || selected_zone == null || !is_actions_available) { return; }
-
@@ -207,7 +208,7 @@ namespace PlacGtkAdwaita {}); prev.clicked.connect(() => { if (conn == null || selected_zone == null) { if (conn == null || selected_zone == null || !is_actions_available) { return; }
-
@@ -224,7 +225,7 @@ namespace PlacGtkAdwaita {}); next.clicked.connect(() => { if (conn == null || selected_zone == null) { if (conn == null || selected_zone == null || !is_actions_available) { return; }
-
@@ -241,17 +242,29 @@ namespace PlacGtkAdwaita {}); seek.change_value.connect((scroll, value) => { if (!is_actions_available) { return true; } schedule_seek((int64) value); return false; }); seek_backwards_10.clicked.connect(() => { if (!is_actions_available) { return; } var next_value = seek.get_value() - 10; seek.set_value(next_value); schedule_seek((int64) next_value); }); seek_forward_10.clicked.connect(() => { if (!is_actions_available) { return; } var next_value = seek.get_value() + 10; seek.set_value(next_value); schedule_seek((int64) next_value);
-
@@ -437,12 +450,19 @@ namespace PlacGtkAdwaita {} private void disable_actions() { is_actions_available = false; if (settings.no_insensitive_on_loading) { return; } zone_list_popover.sensitive = false; controls.sensitive = false; seek.sensitive = false; } private void enable_actions() { is_actions_available = true; zone_list_popover.sensitive = true; controls.sensitive = true; seek.sensitive = true;
-
-
-
@@ -40,6 +40,9 @@ namespace PlacGtkAdwaita {[GtkChild] private unowned Adw.SwitchRow focus_browse_items_on_load; [GtkChild] private unowned Adw.SwitchRow no_insensitive_on_loading; [GtkChild] private unowned Adw.EntryRow seek_step_size;
-
@@ -95,6 +98,7 @@ namespace PlacGtkAdwaita {settings.settings.bind(Settings.SHOW_STOP_BUTTON, show_stop_button, "active", DEFAULT); settings.settings.bind(Settings.FOCUS_BROWSE_ITEMS_ON_LOAD, focus_browse_items_on_load, "active", DEFAULT); settings.settings.bind(Settings.NO_INSENSITIVE_ON_LOADING, no_insensitive_on_loading, "active", DEFAULT); settings.settings.bind_with_mapping(Settings.SEEK_STEP_SIZE, seek_step_size, "text", DEFAULT, (to, from) => { var size = from.get_uint32(); to.set_string(size.to_string());
-