mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 00:19:20 +00:00
- Fixed focus issues when pressing enter in track and category filter
modes. - Removed boost::chrono dependency -- just use std::chrono in all cases.
This commit is contained in:
parent
6a6b842883
commit
83fc208daf
@ -57,7 +57,6 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
|
||||
#include <boost/chrono.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <app/util/Win32Util.h>
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -107,7 +107,7 @@ namespace musik {
|
||||
musik::core::LibraryPtr library;
|
||||
size_t lastQueryHash;
|
||||
RowFormatter formatter;
|
||||
boost::chrono::milliseconds lastChanged;
|
||||
std::chrono::milliseconds lastChanged;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,12 @@
|
||||
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/chrono.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <deque>
|
||||
#include <chrono>
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user