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:
##
## %l - length
## %f - short filename
## %F - full filename
## %f - filename
## %D - directory
## %a - artist
## %t - title
## %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_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
#

View File

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

View File

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

View File

@@ -248,7 +248,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.song_library_format = "{%n - }{%t}|{%f}";
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_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.pattern = "%n - %t";
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':
get = &MPD::Song::GetLength;
break;
case 'F':
get = &MPD::Song::GetFile;
case 'D':
get = &MPD::Song::GetDirectory;
break;
case 'f':
get = &MPD::Song::GetName;
@@ -404,8 +404,8 @@ std::string MPD::Song::toString(const std::string &format) const
case 'l':
result += GetLength();
break;
case 'F':
result += GetFile();
case 'D':
result += GetDirectory();
break;
case 'f':
result += GetName();