actions: rename DeselectItems to RemoveSelection

This commit is contained in:
Andrzej Rybczak
2012-09-05 23:42:50 +02:00
parent fe9bcfbeab
commit c34bcee12b
4 changed files with 10 additions and 7 deletions

View File

@@ -1727,16 +1727,17 @@ void ReverseSelection::Run()
ShowMessage("Selection reversed");
}
bool DeselectItems::canBeRun() const
bool RemoveSelection::canBeRun() const
{
return proxySongList(myScreen).get();
}
void DeselectItems::Run()
void RemoveSelection::Run()
{
auto pl = proxySongList(myScreen);
for (size_t i = 0; i < pl->size(); ++i)
pl->setSelected(i, false);
ShowMessage("Selection removed");
}
bool SelectAlbum::canBeRun() const
@@ -2546,7 +2547,7 @@ void populateActions()
insertAction(new JumpToTagEditor());
insertAction(new JumpToPositionInSong());
insertAction(new ReverseSelection());
insertAction(new DeselectItems());
insertAction(new RemoveSelection());
insertAction(new SelectAlbum());
insertAction(new AddSelectedItems());
insertAction(new CropMainPlaylist());

View File

@@ -39,7 +39,7 @@ enum ActionType
aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
aEditLibraryAlbum, aEditDirectoryName, aEditPlaylistName, aEditLyrics, aJumpToBrowser,
aJumpToMediaLibrary, aJumpToPlaylistEditor, aToggleScreenLock, aJumpToTagEditor,
aJumpToPositionInSong, aReverseSelection, aDeselectItems, aSelectAlbum, aAddSelectedItems,
aJumpToPositionInSong, aReverseSelection, aRemoveSelection, aSelectAlbum, aAddSelectedItems,
aCropMainPlaylist, aCropPlaylist, aClearMainPlaylist, aClearPlaylist, aSortPlaylist, aReversePlaylist,
aApplyFilter, aFind, aFindItemForward, aFindItemBackward, aNextFoundItem,
aPreviousFoundItem, aToggleFindMode, aToggleReplayGainMode, aToggleSpaceMode, aToggleAddMode,
@@ -679,9 +679,9 @@ protected:
virtual void Run();
};
struct DeselectItems : public Action
struct RemoveSelection : public Action
{
DeselectItems() : Action(aDeselectItems, "deselect_items") { }
RemoveSelection() : Action(aRemoveSelection, "remove_selection") { }
protected:
virtual bool canBeRun() const;

View File

@@ -419,6 +419,8 @@ void BindingsConfiguration::generateDefault()
bind(k, aShowLyrics);
if (notBound(k = stringToKey("v")))
bind(k, aReverseSelection);
if (notBound(k = stringToKey("V")))
bind(k, aRemoveSelection);
if (notBound(k = stringToKey("B")))
bind(k, aSelectAlbum);
if (notBound(k = stringToKey("a")))

View File

@@ -237,7 +237,7 @@ void Help::GetKeybindings()
KeyDesc(aToggleAddMode, "Toggle add mode (add or remove/always add)");
KeyDesc(aToggleMouse, "Toggle mouse support");
KeyDesc(aReverseSelection, "Reverse selection");
KeyDesc(aDeselectItems, "Deselect items");
KeyDesc(aRemoveSelection, "Remove selection");
KeyDesc(aSelectAlbum, "Select songs of album around the cursor");
KeyDesc(aAddSelectedItems, "Add selected items to playlist");
KeyDesc(aAddRandomItems, "Add random items to playlist");