mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Make music library path changable
This commit is contained in:
parent
cf96792029
commit
543f5ed1fd
5 changed files with 480 additions and 236 deletions
|
|
@ -29,7 +29,12 @@ impl Preferences {
|
|||
if let gtk::ResponseType::Accept = dialog.run() {
|
||||
if let Some(path) = dialog.get_filename() {
|
||||
music_library_path_row.set_subtitle(Some(path.to_str().unwrap()));
|
||||
backend.set_music_library_path(path);
|
||||
|
||||
let context = glib::MainContext::default();
|
||||
let backend = backend.clone();
|
||||
context.spawn_local(async move {
|
||||
backend.set_music_library_path(path).await.unwrap();
|
||||
});
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue