Skip to content

Commit

Permalink
drop support for ~/.ncmpc/; using only ~/.config/ncmpc/ (XDG)
Browse files Browse the repository at this point in the history
It's been 5 years since XDG support was added, enough time for people
to migrate to XDG paths.
  • Loading branch information
MaxKellermann committed Apr 6, 2023
1 parent d76d47e commit bfe7870
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ncmpc 0.48 - not yet released
* drop support for ~/.ncmpc/; using only ~/.config/ncmpc/ (XDG)
* improve scroll-offset handling
* experimental table layout

Expand Down
21 changes: 0 additions & 21 deletions src/ConfigFile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ MakeKeysPath()
return MakeUserConfigPath(KEYS_FILENAME);
}

#ifndef _WIN32

std::string
GetHomeConfigPath() noexcept
{
const char *home = GetHomeDirectory();
if (home == nullptr)
return {};

return BuildPath(home, "." PACKAGE, CONFIG_FILENAME);
}

#endif

std::string
GetUserConfigPath() noexcept
{
Expand Down Expand Up @@ -136,13 +122,6 @@ find_config_file() noexcept
if (!filename.empty() && IsFile(filename.c_str()))
return filename;

#ifndef _WIN32
/* check for user configuration ~/.ncmpc/config */
filename = GetHomeConfigPath();
if (!filename.empty() && IsFile(filename.c_str()))
return filename;
#endif

/* check for global configuration SYSCONFDIR/ncmpc/config */
filename = GetSystemConfigPath();
if (IsFile(filename.c_str()))
Expand Down
5 changes: 0 additions & 5 deletions src/ConfigFile.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
std::string
MakeKeysPath();

#ifndef _WIN32
std::string
GetHomeConfigPath() noexcept;
#endif

std::string
GetUserConfigPath() noexcept;

Expand Down
6 changes: 0 additions & 6 deletions src/Options.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,8 @@ handle_option(int c, const char *arg)
#ifndef NCMPC_MINI
printf("configuration files:\n"
" %s\n"
#ifndef _WIN32
" %s\n"
#endif
" %s\n\n",
GetUserConfigPath().c_str(),
#ifndef _WIN32
GetHomeConfigPath().c_str(),
#endif
GetSystemConfigPath().c_str());

if (!StringIsEqual("translator-credits", _("translator-credits")))
Expand Down

0 comments on commit bfe7870

Please sign in to comment.