mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-19 06:40:34 +00:00
Also support PlayFromTop
in TrackSearchLayout
This commit is contained in:
parent
e4141fb220
commit
8549e496c2
@ -439,17 +439,21 @@ bool LibraryLayout::KeyPress(const std::string& key) {
|
||||
});
|
||||
return true;
|
||||
}
|
||||
else if (Hotkeys::Is(Hotkeys::TrackListPlayFromTop, key)) {
|
||||
if (this->visibleLayout == this->browseLayout) {
|
||||
this->browseLayout->PlayFromTop();
|
||||
}
|
||||
else if (this->visibleLayout == this->directoryLayout) {
|
||||
this->directoryLayout->PlayFromTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Hotkeys::Is(Hotkeys::NavigateLibraryPlayQueue, key)) {
|
||||
if (Hotkeys::Is(Hotkeys::TrackListPlayFromTop, key)) {
|
||||
/* TODO: maybe have an IPlayFromTopLayout? meh... */
|
||||
if (this->visibleLayout == this->browseLayout) {
|
||||
this->browseLayout->PlayFromTop();
|
||||
}
|
||||
else if (this->visibleLayout == this->directoryLayout) {
|
||||
this->directoryLayout->PlayFromTop();
|
||||
}
|
||||
else if (this->visibleLayout == this->trackSearchLayout) {
|
||||
this->trackSearchLayout->PlayFromTop();
|
||||
}
|
||||
}
|
||||
else if (Hotkeys::Is(Hotkeys::NavigateLibraryPlayQueue, key)) {
|
||||
this->ShowNowPlaying();
|
||||
return true;
|
||||
}
|
||||
|
@ -151,6 +151,10 @@ void TrackSearchLayout::Requery() {
|
||||
new SearchTrackListQuery(this->library, filter, sortOrder)));
|
||||
}
|
||||
|
||||
void TrackSearchLayout::PlayFromTop() {
|
||||
playback::PlayFromTop(*this->trackList, this->playback);
|
||||
}
|
||||
|
||||
void TrackSearchLayout::ProcessMessage(IMessage &message) {
|
||||
int type = message.Type();
|
||||
|
||||
|
@ -61,6 +61,7 @@ namespace musik {
|
||||
virtual void OnVisibilityChanged(bool visible);
|
||||
virtual bool KeyPress(const std::string& key);
|
||||
|
||||
void PlayFromTop();
|
||||
void FocusInput();
|
||||
void LoadLastSession();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user