diff --git a/src/musikbox/Main.cpp b/src/musikbox/Main.cpp index c785abc49..47aa51253 100644 --- a/src/musikbox/Main.cpp +++ b/src/musikbox/Main.cpp @@ -57,7 +57,6 @@ #include #include #include -#include #ifdef WIN32 #include diff --git a/src/musikbox/app/layout/SearchLayout.cpp b/src/musikbox/app/layout/SearchLayout.cpp index 78df07211..a1bb76e2e 100755 --- a/src/musikbox/app/layout/SearchLayout.cpp +++ b/src/musikbox/app/layout/SearchLayout.cpp @@ -105,7 +105,9 @@ void SearchLayout::OnLayout() { void SearchLayout::InitializeWindows(PlaybackService& playback) { this->input.reset(new cursespp::TextInput()); this->input->TextChanged.connect(this, &SearchLayout::OnInputChanged); + this->input->EnterPressed.connect(this, &SearchLayout::OnEnterPressed); this->input->SetFocusOrder(0); + this->AddWindow(this->input); CREATE_CATEGORY(this->albums, constants::Track::ALBUM, 1); @@ -134,6 +136,10 @@ void SearchLayout::OnInputChanged(cursespp::TextInput* sender, std::string value } } +void SearchLayout::OnEnterPressed(cursespp::TextInput* sender) { + this->SetFocus(this->albums); +} + void SearchLayout::OnVisibilityChanged(bool visible) { LayoutBase::OnVisibilityChanged(visible); diff --git a/src/musikbox/app/layout/SearchLayout.h b/src/musikbox/app/layout/SearchLayout.h index 4b9f60826..a9d1625bb 100755 --- a/src/musikbox/app/layout/SearchLayout.h +++ b/src/musikbox/app/layout/SearchLayout.h @@ -77,6 +77,8 @@ namespace musik { void InitializeWindows(PlaybackService& playback); void Requery(); + void OnEnterPressed(cursespp::TextInput* sender); + void OnInputChanged( cursespp::TextInput* sender, std::string value); diff --git a/src/musikbox/app/layout/TrackSearchLayout.cpp b/src/musikbox/app/layout/TrackSearchLayout.cpp index 3ab82ec5c..a0df11e23 100755 --- a/src/musikbox/app/layout/TrackSearchLayout.cpp +++ b/src/musikbox/app/layout/TrackSearchLayout.cpp @@ -141,6 +141,7 @@ void TrackSearchLayout::OnInputChanged(cursespp::TextInput* sender, std::string void TrackSearchLayout::OnEnterPressed(cursespp::TextInput* sender) { if (this->trackList->GetTrackList()->Count()) { playback::Play(this->trackList, this->playback, this->GetFocus()); + this->SetFocus(this->trackList); } } diff --git a/src/musikbox/app/window/TrackListView.cpp b/src/musikbox/app/window/TrackListView.cpp index 59b45a65d..19df2acb9 100755 --- a/src/musikbox/app/window/TrackListView.cpp +++ b/src/musikbox/app/window/TrackListView.cpp @@ -57,7 +57,7 @@ using namespace musik::core::runtime; using namespace musik::box; using namespace cursespp; -using namespace boost::chrono; +using namespace std::chrono; /* if the user hasn't changed the selected index in 30 seconds we assume he's not paying attention, and will automatically scroll diff --git a/src/musikbox/app/window/TrackListView.h b/src/musikbox/app/window/TrackListView.h index 7f2b93de6..78990a717 100755 --- a/src/musikbox/app/window/TrackListView.h +++ b/src/musikbox/app/window/TrackListView.h @@ -107,7 +107,7 @@ namespace musik { musik::core::LibraryPtr library; size_t lastQueryHash; RowFormatter formatter; - boost::chrono::milliseconds lastChanged; + std::chrono::milliseconds lastChanged; }; } } diff --git a/src/musikbox/app/window/TransportWindow.cpp b/src/musikbox/app/window/TransportWindow.cpp index a0b0cd35b..42a42bace 100755 --- a/src/musikbox/app/window/TransportWindow.cpp +++ b/src/musikbox/app/window/TransportWindow.cpp @@ -48,12 +48,12 @@ #include #include -#include #include #include #include #include +#include using namespace musik::core; using namespace musik::core::audio; @@ -62,7 +62,7 @@ using namespace musik::core::db; using namespace musik::core::sdk; using namespace musik::core::runtime; using namespace musik::box; -using namespace boost::chrono; +using namespace std::chrono; using namespace cursespp; #define REFRESH_TRANSPORT_READOUT 1001