diff --git a/musicdb-client/src/gui_library.rs b/musicdb-client/src/gui_library.rs index ae20bb4..a6a3130 100755 --- a/musicdb-client/src/gui_library.rs +++ b/musicdb-client/src/gui_library.rs @@ -936,16 +936,7 @@ impl GuiElem for ListArtist { let selected = self.selected.clone(); info.actions.push(GuiAction::Do(Box::new(move |gui| { let q = selected.as_queue( - gui.gui - .children() - .nth(3) - .unwrap() - .children() - .nth(2) - .unwrap() - .any() - .downcast_ref() - .unwrap(), + &gui.gui.c_main_view.children.2, &gui.database.lock().unwrap(), ); gui.exec_gui_action(GuiAction::SetDragging(Some(( @@ -1083,16 +1074,7 @@ impl GuiElem for ListAlbum { let selected = self.selected.clone(); info.actions.push(GuiAction::Do(Box::new(move |gui| { let q = selected.as_queue( - gui.gui - .children() - .nth(3) - .unwrap() - .children() - .nth(2) - .unwrap() - .any() - .downcast_ref() - .unwrap(), + &gui.gui.c_main_view.children.2, &gui.database.lock().unwrap(), ); gui.exec_gui_action(GuiAction::SetDragging(Some(( @@ -1226,16 +1208,7 @@ impl GuiElem for ListSong { let selected = self.selected.clone(); info.actions.push(GuiAction::Do(Box::new(move |gui| { let q = selected.as_queue( - gui.gui - .children() - .nth(3) - .unwrap() - .children() - .nth(2) - .unwrap() - .any() - .downcast_ref() - .unwrap(), + &gui.gui.c_main_view.children.2, &gui.database.lock().unwrap(), ); gui.exec_gui_action(GuiAction::SetDragging(Some(( diff --git a/musicdb-client/src/gui_screen.rs b/musicdb-client/src/gui_screen.rs index d0d41d5..9b51e4e 100755 --- a/musicdb-client/src/gui_screen.rs +++ b/musicdb-client/src/gui_screen.rs @@ -41,7 +41,7 @@ pub struct GuiScreen { c_idle_display: IdleDisplay, c_status_bar: StatusBar, c_settings: Settings, - c_main_view: Panel<( + pub c_main_view: Panel<( Button<[Label; 1]>, Button<[Label; 1]>, LibraryBrowser,