refactor: differentiate between screens and views

This commit is contained in:
Henrik Friedrichsen
2021-01-09 23:23:57 +01:00
parent 18dc6c6bf8
commit 254c7a3856
2 changed files with 22 additions and 17 deletions

View File

@@ -264,12 +264,12 @@ fn main() {
);
let mut layout = ui::layout::Layout::new(status, &event_manager, theme)
.view("search", search.with_name("search"), "Search")
.view("library", libraryview.with_name("library"), "Library")
.view("queue", queueview, "Queue");
.screen("search", search.with_name("search"), "Search")
.screen("library", libraryview.with_name("library"), "Library")
.screen("queue", queueview, "Queue");
// initial view is library
layout.set_view("library");
// initial screen is library
layout.set_screen("library");
cursive.add_global_callback(':', move |s| {
if s.find_name::<ContextMenu>("contextmenu").is_none() {