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