summaryrefslogtreecommitdiff
path: root/src/sel_items_adder.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2010-01-30 15:24:02 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2010-01-30 15:24:02 +0100
commit7f45d6ec8d4d6a8a7a5a263387168e156cc0c0f6 (patch)
tree3df4d55f5d6c8ba0e995a51d4c25b5dad479f6ac /src/sel_items_adder.cpp
parentdac2458e1f0296480c9e042f08ba9ee8683e137c (diff)
add support for adding tracks to playlist after highlighted item
Diffstat (limited to 'src/sel_items_adder.cpp')
-rw-r--r--src/sel_items_adder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sel_items_adder.cpp b/src/sel_items_adder.cpp
index 79f82a7d..3662f6ba 100644
--- a/src/sel_items_adder.cpp
+++ b/src/sel_items_adder.cpp
@@ -50,6 +50,7 @@ void SelectedItemsAdder::Init()
itsPositionSelector->AddOption("At the beginning of playlist");
itsPositionSelector->AddOption("After current track");
itsPositionSelector->AddOption("After current album");
+ itsPositionSelector->AddOption("After highlighted item");
itsPositionSelector->AddSeparator();
itsPositionSelector->AddOption("Cancel");
@@ -230,6 +231,10 @@ void SelectedItemsAdder::EnterPressed()
break;
successful_operation = myPlaylist->Add(list, 0, i);
}
+ else if (pos == 4) // after highlighted item
+ {
+ successful_operation = myPlaylist->Add(list, 0, std::min(myPlaylist->Items->Choice()+1, myPlaylist->Items->Size()));
+ }
else
{
w = itsPlaylistSelector;