Make music library path changable

This commit is contained in:
Elias Projahn 2020-11-01 10:13:21 +01:00
parent cf96792029
commit 543f5ed1fd
5 changed files with 480 additions and 236 deletions

View file

@ -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();
});
}
}
}));