summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrank Blendinger <fb@intoxicatedmind.net>2009-09-06 10:46:03 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2009-12-09 00:24:15 +0100
commit64f64895ace4e67c771ffe0e50aaa8be03e3f269 (patch)
tree1672473e62e570b75b3330dc209434f40412d99c /src
parent2b6e24131d7af12706e2ca15fe574cc19bcc82fb (diff)
hide inact. "cur playlist" entry in selection menu
Diffstat (limited to 'src')
-rw-r--r--src/misc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 735ce248..5b7e0f61 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -91,7 +91,8 @@ void SelectedItemsAdder::SwitchTo()
w->Clear();
w->Reset();
- w->AddOption("Current MPD playlist", 0, myOldScreen == myPlaylist);
+ if (myOldScreen != myPlaylist)
+ w->AddOption("Current MPD playlist", 0, 0);
w->AddOption("New playlist", 0, playlists_not_active);
w->AddSeparator();
@@ -148,6 +149,10 @@ std::basic_string<my_char_t> SelectedItemsAdder::Title()
void SelectedItemsAdder::EnterPressed()
{
size_t pos = w->Choice();
+
+ // adding to current playlist is disabled when playlist is active
+ if (w == itsPlaylistSelector && myOldScreen == myPlaylist && pos == 0)
+ pos++;
MPD::SongList list;
if ((w != itsPlaylistSelector || pos != 0) && pos != w->Size()-1)