settings: fix columns generation without configuration file (ticket #3490)
This commit is contained in:
@@ -249,6 +249,8 @@ int main(int argc, char **argv)
|
|||||||
Config.Read();
|
Config.Read();
|
||||||
Key.Read();
|
Key.Read();
|
||||||
|
|
||||||
|
Config.GenerateColumns();
|
||||||
|
|
||||||
if (getenv("MPD_HOST"))
|
if (getenv("MPD_HOST"))
|
||||||
Mpd.SetHostname(getenv("MPD_HOST"));
|
Mpd.SetHostname(getenv("MPD_HOST"));
|
||||||
if (getenv("MPD_PORT"))
|
if (getenv("MPD_PORT"))
|
||||||
|
|||||||
@@ -1365,7 +1365,11 @@ void NcmpcppConfig::Read()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.close();
|
f.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NcmpcppConfig::GenerateColumns()
|
||||||
|
{
|
||||||
|
columns.clear();
|
||||||
std::string width;
|
std::string width;
|
||||||
while (!(width = GetLineValue(song_list_columns_format, '(', ')', 1)).empty())
|
while (!(width = GetLineValue(song_list_columns_format, '(', ')', 1)).empty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ struct NcmpcppConfig
|
|||||||
|
|
||||||
void SetDefaults();
|
void SetDefaults();
|
||||||
void Read();
|
void Read();
|
||||||
|
void GenerateColumns();
|
||||||
|
|
||||||
std::string ncmpcpp_directory;
|
std::string ncmpcpp_directory;
|
||||||
std::string lyrics_directory;
|
std::string lyrics_directory;
|
||||||
|
|||||||
Reference in New Issue
Block a user