From 062768a077b03a67b049b3c2d98341b00d5445dd Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 22 Aug 2003 21:38:58 +0000 Subject: fixed search paths for new image loading --- src/fluxbox.cc | 62 +++++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 17e2268..370bc1d 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.185 2003/08/15 13:57:18 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.186 2003/08/22 21:38:58 fluxgen Exp $ #include "fluxbox.hh" @@ -42,6 +42,8 @@ #include "FbAtoms.hh" #include "defaults.hh" +#include "FbTk/Image.hh" + //Use GNU extensions #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -118,10 +120,6 @@ #endif // HAVE_SYS_TIME_H #endif // TIME_WITH_SYS_TIME -#ifdef HAVE_LIBGEN_H -#include -#endif // HAVE_LIBGEN_H - #include #include @@ -133,24 +131,6 @@ using namespace std; using namespace FbTk; -#ifndef HAVE_BASENAME -namespace { - -char *basename(char *s) { - char *save = s; - - while (*s) { - if (*s++ == '/') - save = s; - } - - return save; -} - -}; // end anonymous namespace - -#endif // HAVE_BASENAME - //----------------------------------------------------------------- //---- accessors for int, bool, and some enums with Resource ------ //----------------------------------------------------------------- @@ -1442,7 +1422,7 @@ void Fluxbox::restart(const char *prog) { // fall back in case the above execlp doesn't work execvp(m_argv[0], m_argv); - execvp(basename(m_argv[0]), m_argv); + execvp(StringUtil::basename(m_argv[0]).c_str(), m_argv); } /// prepares fluxbox for a shutdown @@ -1663,17 +1643,6 @@ void Fluxbox::load_rc() { void Fluxbox::load_rc(BScreen &screen) { //get resource filename string dbfile(getRcFilename()); - if (dbfile.size() != 0) { - if (!m_screen_rm.load(dbfile.c_str())) { - cerr<<"Failed to load database:"< paths; + StringUtil::stringtok(paths, value.addr, ", "); + for (unsigned int i=0; i