From 7037b9ca2cdf9e03a7a54ef45d6d6f7a601725fd Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 11 May 2003 22:19:17 +0000 Subject: minor fix --- src/fluxbox.cc | 31 +++++++++++++++---------------- src/fluxbox.hh | 4 +++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 9969593..2793670 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.137 2003/05/11 17:11:59 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.138 2003/05/11 22:19:17 fluxgen Exp $ #include "fluxbox.hh" @@ -96,24 +96,24 @@ #include #endif // HAVE_SYS_SELECT_H -#ifdef HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H #include #include #endif // HAVE_SYS_STAT_H -#ifdef TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME #include #include #else // !TIME_WITH_SYS_TIME -#ifdef HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H #include #else // !HAVE_SYS_TIME_H #include #endif // HAVE_SYS_TIME_H #endif // TIME_WITH_SYS_TIME -#ifdef HAVE_LIBGEN_H -# include +#ifdef HAVE_LIBGEN_H +#include #endif // HAVE_LIBGEN_H #include @@ -145,9 +145,6 @@ char *basename (char *s) { #endif // HAVE_BASENAME -#define RC_PATH "fluxbox" -#define RC_INIT_FILE "init" - //----------------------------------------------------------------- //---- accessors for int, bool, and some enums with Resource ------ //----------------------------------------------------------------- @@ -412,7 +409,9 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile m_argv(argv), m_argc(argc), m_starting(true), m_shutdown(false), - m_server_grabs(0) { + m_server_grabs(0), + m_RC_PATH("fluxbox"), + m_RC_INIT_FILE("init") { if (s_singleton != 0) { @@ -595,11 +594,11 @@ void Fluxbox::setupConfigFiles() { bool create_init = false, create_keys = false, create_menu = false; - string dirname = getenv("HOME")+string("/.")+string(RC_PATH) + "/"; + string dirname = getenv("HOME")+string("/.")+string(m_RC_PATH) + "/"; string init_file, keys_file, menu_file, slitlist_file; - init_file = dirname+RC_INIT_FILE; - keys_file = dirname+"keys"; - menu_file = dirname+"menu"; + init_file = dirname + m_RC_INIT_FILE; + keys_file = dirname + "keys"; + menu_file = dirname + "menu"; struct stat buf; @@ -1851,7 +1850,7 @@ void Fluxbox::save_rc() { string Fluxbox::getRcFilename() { if (m_rc_file.size() == 0) { // set default filename - string defaultfile(getenv("HOME")+string("/.")+RC_PATH+string("/")+RC_INIT_FILE); + string defaultfile(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + m_RC_INIT_FILE); return defaultfile; } @@ -1860,7 +1859,7 @@ string Fluxbox::getRcFilename() { /// Provides default filename of data file void Fluxbox::getDefaultDataFilename(char *name, string &filename) { - filename = string(getenv("HOME")+string("/.")+RC_PATH+string("/")+name); + filename = string(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + name); } /// loads resources diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 8233309..25ffeea 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.55 2003/05/11 15:35:24 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.56 2003/05/11 22:18:33 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH @@ -268,6 +268,8 @@ private: bool m_starting; bool m_shutdown; int m_server_grabs; + const char *m_RC_PATH; + const char *m_RC_INIT_FILE; }; -- cgit v0.11.2