actions: make separators toggle work in all screens
This commit is contained in:
@@ -1153,15 +1153,15 @@ void ToggleDisplayMode::Run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ToggleSeparatorsInPlaylist::canBeRun() const
|
bool ToggleSeparatorsBetweenAlbums::canBeRun() const
|
||||||
{
|
{
|
||||||
return myScreen == myPlaylist;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToggleSeparatorsInPlaylist::Run()
|
void ToggleSeparatorsBetweenAlbums::Run()
|
||||||
{
|
{
|
||||||
Config.playlist_separate_albums = !Config.playlist_separate_albums;
|
Config.playlist_separate_albums = !Config.playlist_separate_albums;
|
||||||
ShowMessage("Separators between albums in playlist: %s", Config.playlist_separate_albums ? "On" : "Off");
|
ShowMessage("Separators between albums: %s", Config.playlist_separate_albums ? "On" : "Off");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_CURL_CURL_H
|
#ifndef HAVE_CURL_CURL_H
|
||||||
@@ -2558,7 +2558,7 @@ void populateActions()
|
|||||||
insertAction(new SeekForward());
|
insertAction(new SeekForward());
|
||||||
insertAction(new SeekBackward());
|
insertAction(new SeekBackward());
|
||||||
insertAction(new ToggleDisplayMode());
|
insertAction(new ToggleDisplayMode());
|
||||||
insertAction(new ToggleSeparatorsInPlaylist());
|
insertAction(new ToggleSeparatorsBetweenAlbums());
|
||||||
insertAction(new ToggleLyricsFetcher());
|
insertAction(new ToggleLyricsFetcher());
|
||||||
insertAction(new ToggleFetchingLyricsInBackground());
|
insertAction(new ToggleFetchingLyricsInBackground());
|
||||||
insertAction(new ToggleAutoCenter());
|
insertAction(new ToggleAutoCenter());
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ enum ActionType
|
|||||||
aPressEnter, aPressSpace, aPreviousColumn, aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp,
|
aPressEnter, aPressSpace, aPreviousColumn, aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp,
|
||||||
aVolumeDown, aDelete, aReplaySong, aPreviousSong, aNextSong, aPause, aStop, aSavePlaylist,
|
aVolumeDown, aDelete, aReplaySong, aPreviousSong, aNextSong, aPause, aStop, aSavePlaylist,
|
||||||
aMoveSortOrderUp, aMoveSortOrderDown, aMoveSelectedItemsUp, aMoveSelectedItemsDown,
|
aMoveSortOrderUp, aMoveSortOrderDown, aMoveSelectedItemsUp, aMoveSelectedItemsDown,
|
||||||
aMoveSelectedItemsTo, aAdd, aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsInPlaylist,
|
aMoveSelectedItemsTo, aAdd, aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsBetweenAlbums,
|
||||||
aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aToggleAutoCenter, aUpdateDatabase,
|
aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aToggleAutoCenter, aUpdateDatabase,
|
||||||
aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom, aStartSearching, aSaveTagChanges,
|
aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom, aStartSearching, aSaveTagChanges,
|
||||||
aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
|
aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
|
||||||
@@ -355,9 +355,9 @@ struct ToggleDisplayMode : public Action
|
|||||||
virtual void Run();
|
virtual void Run();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ToggleSeparatorsInPlaylist : public Action
|
struct ToggleSeparatorsBetweenAlbums : public Action
|
||||||
{
|
{
|
||||||
ToggleSeparatorsInPlaylist() : Action(aToggleSeparatorsInPlaylist, "toggle_separators_in_playlist") { }
|
ToggleSeparatorsBetweenAlbums() : Action(aToggleSeparatorsBetweenAlbums, "toggle_separators_between_albums") { }
|
||||||
virtual bool canBeRun() const;
|
virtual bool canBeRun() const;
|
||||||
virtual void Run();
|
virtual void Run();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ void Help::GetKeybindings()
|
|||||||
# endif // HAVE_TAGLIB_H
|
# endif // HAVE_TAGLIB_H
|
||||||
KeyDesc(aToggleDisplayMode, "Toggle display mode");
|
KeyDesc(aToggleDisplayMode, "Toggle display mode");
|
||||||
KeyDesc(aToggleInterface, "Toggle user interface");
|
KeyDesc(aToggleInterface, "Toggle user interface");
|
||||||
KeyDesc(aToggleSeparatorsInPlaylist, "Toggle displaying separators between albums");
|
KeyDesc(aToggleSeparatorsBetweenAlbums, "Toggle displaying separators between albums");
|
||||||
KeyDesc(aJumpToPositionInSong, "Jump to given position in playing song (formats: mm:ss, x%)");
|
KeyDesc(aJumpToPositionInSong, "Jump to given position in playing song (formats: mm:ss, x%)");
|
||||||
KeyDesc(aShowSongInfo, "Show song info");
|
KeyDesc(aShowSongInfo, "Show song info");
|
||||||
# ifdef HAVE_CURL_CURL_H
|
# ifdef HAVE_CURL_CURL_H
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ void KeyConfiguration::generateBindings()
|
|||||||
if (notBound(k = stringToKey("\\")))
|
if (notBound(k = stringToKey("\\")))
|
||||||
bind(k, aToggleInterface);
|
bind(k, aToggleInterface);
|
||||||
if (notBound(k = stringToKey("!")))
|
if (notBound(k = stringToKey("!")))
|
||||||
bind(k, aToggleSeparatorsInPlaylist);
|
bind(k, aToggleSeparatorsBetweenAlbums);
|
||||||
if (notBound(k = stringToKey("L")))
|
if (notBound(k = stringToKey("L")))
|
||||||
bind(k, aToggleLyricsFetcher);
|
bind(k, aToggleLyricsFetcher);
|
||||||
if (notBound(k = stringToKey("F")))
|
if (notBound(k = stringToKey("F")))
|
||||||
|
|||||||
Reference in New Issue
Block a user