diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2010-05-18 17:55:56 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2010-05-18 17:59:36 +0200 |
commit | 15a89a6d415191d998198e997cf4fc5b93c33985 (patch) | |
tree | 75d6f304b9aaa28263629de44bbebcb6eba0abca /src | |
parent | 1154a95143578218f2132a5aa9fc138aed27bbb3 (diff) |
make a few exceptions for "all tracks" option since it's not real album
users shouldn't be allowed to select it since adding selected item
"all tracks" does nothing. editing is allowed since one may want to
set album for all tracks at once. adding with space should display
information about adding all tracks of specific tag that is in left
column since standard message will display 'adding songs from album
""', which is not that what we want.
Diffstat (limited to 'src')
-rw-r--r-- | src/media_library.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/media_library.cpp b/src/media_library.cpp index 59369be4..f2f0c4af 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -357,8 +357,11 @@ void MediaLibrary::SpacePressed() } else if (w == Albums) { - Albums->Select(Albums->Choice(), !Albums->isSelected()); - Songs->Clear(); + if (Albums->Current().Year != AllTracksMarker) + { + Albums->Select(Albums->Choice(), !Albums->isSelected()); + Songs->Clear(); + } } else if (w == Songs) Songs->Select(Songs->Choice(), !Songs->isSelected()); @@ -687,7 +690,8 @@ void MediaLibrary::AddToPlaylist(bool add_n_play) if (myPlaylist->Add(list, add_n_play)) { - if (!Artists->Empty() && w == Artists) + if ((!Artists->Empty() && w == Artists) + || (w == Albums && Albums->Current().Year == AllTracksMarker)) { std::string tag_type = IntoStr(Config.media_lib_primary_tag); ToLower(tag_type); |