Share whether to use the server across screens

This commit is contained in:
Elias Projahn 2021-05-07 20:44:27 +02:00
parent f92a80be87
commit df6e2e86c7
16 changed files with 76 additions and 31 deletions

View file

@ -47,6 +47,8 @@ impl Screen<(Arc<ImportSession>, Option<Medium>), Medium> for MediumEditor {
get_widget!(builder, gtk::Button, try_again_button);
get_widget!(builder, gtk::Button, cancel_button);
publish_switch.set_active(handle.backend.use_server());
let list = List::new();
frame.set_child(Some(&list.widget));
@ -100,6 +102,10 @@ impl Screen<(Arc<ImportSession>, Option<Medium>), Medium> for MediumEditor {
});
}));
this.publish_switch.connect_property_state_notify(clone!(@weak this => move |_| {
this.handle.backend.set_use_server(this.publish_switch.get_state());
}));
this.track_set_list
.set_make_widget_cb(clone!(@weak this => move |index| {
let track_set = &this.track_sets.borrow()[index];