diff --git a/tools/player-video/appl/Windows.cpp b/tools/player-video/appl/Windows.cpp index 525ab27..197a9a7 100644 --- a/tools/player-video/appl/Windows.cpp +++ b/tools/player-video/appl/Windows.cpp @@ -85,15 +85,6 @@ void appl::Windows::init() { m_listViewer->signalSelect.connect(sharedFromThis(), &appl::Windows::onCallbackSelectMedia); } - - subBind(ewol::widget::Button, "bt-film-picture", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectFilms); - subBind(ewol::widget::Button, "bt-film-draw", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectAnnimation); - subBind(ewol::widget::Button, "bt-tv-picture", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTVShow); - subBind(ewol::widget::Button, "bt-tv-draw", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTvAnnimation); - subBind(ewol::widget::Button, "bt-theater", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectTeather); - subBind(ewol::widget::Button, "bt-one-man-show", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectOneManShow); - subBind(ewol::widget::Button, "bt-courses", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectSourses); - subBind(ewol::widget::Button, "access-fast-home", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectHome); subBind(ewol::widget::Button, "access-fast-group", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSelectGroup); // Direct display list: @@ -155,7 +146,8 @@ void appl::Windows::onCallbackMenuEvent(const std::string& _value) { ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); m_listViewer->searchElements(""); } else if (_value == "menu:group") { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-group"); + ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); + m_listViewer->searchElements("group"); } else if (_value == "menu:tv") { ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-tv"); @@ -278,35 +270,6 @@ void appl::Windows::addFile(const std::string& _file) { } } -void appl::Windows::onCallbackSelectFilms() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("film"); -} -void appl::Windows::onCallbackSelectAnnimation() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("annimation"); -} -void appl::Windows::onCallbackSelectTVShow() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("tv-show"); -} -void appl::Windows::onCallbackSelectTvAnnimation() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("tv-annimation"); -} -void appl::Windows::onCallbackSelectTeather() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("theater"); -} -void appl::Windows::onCallbackSelectOneManShow() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("one-man"); -} -void appl::Windows::onCallbackSelectSourses() { - ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-list-viewer"); - m_listViewer->searchElements("courses"); -} - void appl::Windows::onCallbackSelectMedia(const uint32_t& _value) { ewol::propertySetOnObjectNamed("view-selection", "select", "ws-name-player"); if (m_player != nullptr) { diff --git a/tools/player-video/appl/widget/ListViewer.cpp b/tools/player-video/appl/widget/ListViewer.cpp index af71b75..4d58e76 100644 --- a/tools/player-video/appl/widget/ListViewer.cpp +++ b/tools/player-video/appl/widget/ListViewer.cpp @@ -46,7 +46,9 @@ appl::widget::ListViewer::~ListViewer() { } void appl::widget::ListViewer::searchElements(std::string _filter) { - if (_filter == "film") { + if (_filter == "group") { + searchElementsInternal("*", "type"); + } else if (_filter == "film") { searchElementsInternal("'type' == 'film' AND 'production-methode' == 'picture'"); } else if (_filter == "annimation") { searchElementsInternal("'type' == 'film' AND 'production-methode' == 'draw'"); @@ -557,12 +559,26 @@ bool appl::widget::ListViewer::onEventInput(const ewol::event::Input& _event) { return true; } std::string newGroup = ""; - if (m_currentGroup == "series-name") { + if (m_currentGroup == "type") { + if (prop->m_title == "film") { + newGroup = "production-methode"; + } else if (prop->m_title == "tv-show") { + newGroup = "production-methode"; + } + } else if (m_currentGroup == "production-methode") { + if (etk::start_with(m_currentFilter, "'type' == 'tv-show'") == true) { + newGroup = "series-name"; + } + } else if (m_currentGroup == "series-name") { newGroup = "saison"; } else if (m_currentGroup == "artist") { newGroup = "album"; } - searchElementsInternal(m_currentFilter + " AND '" + m_currentGroup + "' == '" + prop->m_title + "'", newGroup); + if (m_currentFilter == "*") { + searchElementsInternal("'" + m_currentGroup + "' == '" + prop->m_title + "'", newGroup); + } else { + searchElementsInternal(m_currentFilter + " AND '" + m_currentGroup + "' == '" + prop->m_title + "'", newGroup); + } } return true; } diff --git a/tools/player-video/data/gui.xml b/tools/player-video/data/gui.xml index c993a1d..31631c3 100644 --- a/tools/player-video/data/gui.xml +++ b/tools/player-video/data/gui.xml @@ -1,30 +1,6 @@ - - - - - - - - - - +