fix displaying title of primary column in media library with tag editor disabled

This commit is contained in:
unK
2008-10-04 20:30:53 +02:00
parent 109f49430e
commit 457452036b
4 changed files with 32 additions and 32 deletions

View File

@@ -177,6 +177,37 @@ void EscapeUnallowedChars(string &s)
}
}
string IntoStr(mpd_TagItems tag)
{
switch (tag)
{
case MPD_TAG_ITEM_ARTIST:
return "Artist";
case MPD_TAG_ITEM_ALBUM:
return "Album";
case MPD_TAG_ITEM_TITLE:
return "Title";
case MPD_TAG_ITEM_TRACK:
return "Track";
case MPD_TAG_ITEM_GENRE:
return "Genre";
case MPD_TAG_ITEM_DATE:
return "Year";
case MPD_TAG_ITEM_COMPOSER:
return "Composer";
case MPD_TAG_ITEM_PERFORMER:
return "Performer";
case MPD_TAG_ITEM_COMMENT:
return "Comment";
case MPD_TAG_ITEM_DISC:
return "Disc";
case MPD_TAG_ITEM_FILENAME:
return "Filename";
default:
return "";
}
}
string FindSharedDir(const string &one, const string &two)
{
if (one == two)

View File

@@ -48,6 +48,7 @@ bool Keypressed(int, const int *);
void WindowTitle(const string &);
void EscapeUnallowedChars(string &);
string IntoStr(mpd_TagItems);
string FindSharedDir(const string &, const string &);
string TotalPlaylistLength();
string DisplayStringPair(const StringPair &, void *, const Menu<StringPair> *);

View File

@@ -35,37 +35,6 @@ extern ncmpcpp_keys Key;
extern Menu<string> *mTagEditor;
extern Window *wFooter;
string IntoStr(mpd_TagItems tag)
{
switch (tag)
{
case MPD_TAG_ITEM_ARTIST:
return "Artist";
case MPD_TAG_ITEM_ALBUM:
return "Album";
case MPD_TAG_ITEM_TITLE:
return "Title";
case MPD_TAG_ITEM_TRACK:
return "Track";
case MPD_TAG_ITEM_GENRE:
return "Genre";
case MPD_TAG_ITEM_DATE:
return "Year";
case MPD_TAG_ITEM_COMPOSER:
return "Composer";
case MPD_TAG_ITEM_PERFORMER:
return "Performer";
case MPD_TAG_ITEM_COMMENT:
return "Comment";
case MPD_TAG_ITEM_DISC:
return "Disc";
case MPD_TAG_ITEM_FILENAME:
return "Filename";
default:
return "";
}
}
SongSetFunction IntoSetFunction(mpd_TagItems tag)
{
switch (tag)

View File

@@ -38,7 +38,6 @@ string FindSharedDir(Menu<Song> *);
string FindSharedDir(const SongList &);
string DisplayTag(const Song &, void *, const Menu<Song> *);
string IntoStr(mpd_TagItems);
SongSetFunction IntoSetFunction(mpd_TagItems);
bool GetSongTags(Song &);