throw away full path from song format in favor of directory

This commit is contained in:
Andrzej Rybczak
2009-08-14 00:47:48 +02:00
parent 8ad1a04b68
commit e68306c8c0
5 changed files with 16 additions and 16 deletions

View File

@@ -40,8 +40,8 @@
## for song format you can use: ## for song format you can use:
## ##
## %l - length ## %l - length
## %f - short filename ## %f - filename
## %F - full filename ## %D - directory
## %a - artist ## %a - artist
## %t - title ## %t - title
## %b - album ## %b - album
@@ -109,7 +109,7 @@
# #
#alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b" #alternative_header_first_line_format = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b"
# #
#alternative_header_second_line_format = "{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}" #alternative_header_second_line_format = "{{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}"
# #
## colors are not supported for below variable ## colors are not supported for below variable
# #

View File

@@ -269,7 +269,7 @@ For song format you can use:
%l - length %l - length
%f - filename %f - filename
%F - full path %D - directory
%a - artist %a - artist
%t - title %t - title
%b - album %b - album

View File

@@ -63,8 +63,8 @@ std::string Display::Columns()
case 'f': case 'f':
tag = "Filename"; tag = "Filename";
break; break;
case 'F': case 'D':
tag = "Full filename"; tag = "Directory";
break; break;
case 'a': case 'a':
tag = "Artist"; tag = "Artist";
@@ -147,8 +147,8 @@ void Display::SongsInColumns(const MPD::Song &s, void *, Menu<MPD::Song> *menu)
case 'l': case 'l':
get = &MPD::Song::GetLength; get = &MPD::Song::GetLength;
break; break;
case 'F': case 'D':
get = &MPD::Song::GetFile; get = &MPD::Song::GetDirectory;
break; break;
case 'f': case 'f':
get = &MPD::Song::GetName; get = &MPD::Song::GetName;
@@ -252,11 +252,11 @@ void Display::Songs(const MPD::Song &s, void *data, Menu<MPD::Song> *menu)
else else
buf << TO_WSTRING(s.GetLength()); buf << TO_WSTRING(s.GetLength());
break; break;
case 'F': case 'D':
if (!right) if (!right)
*menu << s.GetFile(); *menu << s.GetDirectory();
else else
buf << TO_WSTRING(s.GetFile()); buf << TO_WSTRING(s.GetDirectory());
break; break;
case 'f': case 'f':
if (!right) if (!right)

View File

@@ -248,7 +248,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.song_library_format = "{%n - }{%t}|{%f}"; conf.song_library_format = "{%n - }{%t}|{%f}";
conf.tag_editor_album_format = "{(%y) }%b"; conf.tag_editor_album_format = "{(%y) }%b";
conf.new_header_first_line = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b"; conf.new_header_first_line = "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b";
conf.new_header_second_line = "{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}"; conf.new_header_second_line = "{{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}";
conf.browser_playlist_prefix << clRed << "(playlist)" << clEnd << ' '; conf.browser_playlist_prefix << clRed << "(playlist)" << clEnd << ' ';
conf.pattern = "%n - %t"; conf.pattern = "%n - %t";
conf.selected_item_prefix << clMagenta; conf.selected_item_prefix << clMagenta;

View File

@@ -317,8 +317,8 @@ std::string MPD::Song::Format_ParseBraces(std::string::const_iterator &it, std::
case 'l': case 'l':
get = &MPD::Song::GetLength; get = &MPD::Song::GetLength;
break; break;
case 'F': case 'D':
get = &MPD::Song::GetFile; get = &MPD::Song::GetDirectory;
break; break;
case 'f': case 'f':
get = &MPD::Song::GetName; get = &MPD::Song::GetName;
@@ -404,8 +404,8 @@ std::string MPD::Song::toString(const std::string &format) const
case 'l': case 'l':
result += GetLength(); result += GetLength();
break; break;
case 'F': case 'D':
result += GetFile(); result += GetDirectory();
break; break;
case 'f': case 'f':
result += GetName(); result += GetName();