all repos — fluxbox @ d5b58a8033233743b2ff1a6e88eb2d75b54c66ec

custom fork of the fluxbox windowmanager

main.cc: Use expandFilename for default paths
Ryan Pavlik rpavlik@iastate.edu
commit

d5b58a8033233743b2ff1a6e88eb2d75b54c66ec

parent

7510c2d173009372f81274e2db666f268e3e5ac1

1 files changed, 7 insertions(+), 6 deletions(-)

jump to
M src/main.ccsrc/main.cc

@@ -34,6 +34,7 @@ #include "FbTk/Theme.hh"

#include "FbTk/I18n.hh" #include "FbTk/CommandParser.hh" #include "FbTk/FileUtil.hh" +#include "FbTk/StringUtil.hh" //use GNU extensions #ifndef _GNU_SOURCE

@@ -114,22 +115,22 @@ << ": " << endl;

ostr <<_FB_CONSOLETEXT(Common, DefaultMenuFile, " menu", "default menu file (right aligned - make sure same width as other default values)") << ": " - << DEFAULTMENU << endl; + << FbTk::StringUtil::expandFilename(DEFAULTMENU) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultStyle, " style", "default style (right aligned - make sure same width as other default values)") << ": " - << DEFAULTSTYLE << endl; + << FbTk::StringUtil::expandFilename(DEFAULTSTYLE) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultKeyFile, " keys", "default key file (right aligned - make sure same width as other default values)") << ": " - << DEFAULTKEYSFILE << endl; + << FbTk::StringUtil::expandFilename(DEFAULTKEYSFILE) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultInitFile, " init", "default init file (right aligned - make sure same width as other default values)") << ": " - << DEFAULT_INITFILE << endl; + << FbTk::StringUtil::expandFilename(DEFAULT_INITFILE) << endl; #ifdef NLS ostr << _FB_CONSOLETEXT(Common, DefaultLocalePath, " nls", "location for localization files (right aligned - make sure same width as other default values)") << ": " - << LOCALEPATH << endl; + << FbTk::StringUtil::expandFilename(LOCALEPATH) << endl; #endif const char NOT[] = "-";

@@ -369,7 +370,7 @@

// copy default files if needed for (size_t i = 0; i < nr_of_cfiles; ++i) { if (cfiles[i].create_file) { - FbTk::FileUtil::copyFile(cfiles[i].default_name, cfiles[i].filename.c_str()); + FbTk::FileUtil::copyFile(FbTk::StringUtil::expandFilename(cfiles[i].default_name).c_str(), cfiles[i].filename.c_str()); sync_fs = true; } }