mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
preferences: Add settings for library URL
This commit is contained in:
parent
d12e6a02a4
commit
a21a63e4b8
3 changed files with 47 additions and 0 deletions
|
|
@ -19,6 +19,10 @@ mod imp {
|
|||
pub avoid_repeated_instruments_adjustment: TemplateChild<gtk::Adjustment>,
|
||||
#[template_child]
|
||||
pub play_full_recordings_row: TemplateChild<adw::SwitchRow>,
|
||||
#[template_child]
|
||||
pub use_custom_url_row: TemplateChild<adw::SwitchRow>,
|
||||
#[template_child]
|
||||
pub custom_url_row: TemplateChild<adw::EntryRow>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
@ -83,6 +87,23 @@ mod imp {
|
|||
"active",
|
||||
)
|
||||
.build();
|
||||
|
||||
settings
|
||||
.bind(
|
||||
"use-custom-library-url",
|
||||
&*self.use_custom_url_row,
|
||||
"active",
|
||||
)
|
||||
.build();
|
||||
|
||||
settings
|
||||
.bind("custom-library-url", &*self.custom_url_row, "text")
|
||||
.build();
|
||||
|
||||
self.use_custom_url_row
|
||||
.bind_property("active", &*self.custom_url_row, "sensitive")
|
||||
.sync_create()
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue