diff --git a/ui/dr-ui/src/import_ui.rs b/ui/dr-ui/src/import_ui.rs index 28052ef..2c98dc3 100644 --- a/ui/dr-ui/src/import_ui.rs +++ b/ui/dr-ui/src/import_ui.rs @@ -310,7 +310,17 @@ where let context = Rc::new(context); let on_imported = Rc::new(on_imported); - // --- opening and closing --------------------------------------------- + wire_opening_and_closing(window, &ctl, &context); + wire_choosing_a_source(window, &ctl, &context); + wire_options(window, &ctl); + wire_running(window, &ctl, &context, &on_imported); +} + +/// Opening and closing. +fn wire_opening_and_closing(window: &AppWindow, ctl: &Rc, context: &Rc) +where + C: Fn() -> Option + 'static, +{ { let weak = window.as_weak(); let ctl = ctl.clone(); @@ -351,8 +361,13 @@ where w.set_show_import(false); }); } +} - // --- choosing a source ------------------------------------------------- +/// Choosing a source. +fn wire_choosing_a_source(window: &AppWindow, ctl: &Rc, context: &Rc) +where + C: Fn() -> Option + 'static, +{ { let weak = window.as_weak(); let ctl = ctl.clone(); @@ -395,8 +410,10 @@ where render(&w, &ctl); }); } +} - // --- options ----------------------------------------------------------- +/// Options. +fn wire_options(window: &AppWindow, ctl: &Rc) { { let weak = window.as_weak(); let ctl = ctl.clone(); @@ -465,8 +482,18 @@ where render(&w, &ctl); }); } +} - // --- running ----------------------------------------------------------- +/// Running. +fn wire_running( + window: &AppWindow, + ctl: &Rc, + context: &Rc, + on_imported: &Rc, +) where + C: Fn() -> Option + 'static, + F: Fn() + 'static, +{ { let weak = window.as_weak(); let ctl = ctl.clone();