diff options
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 0865bc2..299207e 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -374,7 +374,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
374 | } | 374 | } |
375 | 375 | ||
376 | m_keyscreen = m_mousescreen = m_screen_list.front(); | 376 | m_keyscreen = m_mousescreen = m_screen_list.front(); |
377 | 377 | ||
378 | // setup theme manager to have our style file ready to be scanned | 378 | // setup theme manager to have our style file ready to be scanned |
379 | FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename())); | 379 | FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename())); |
380 | 380 | ||
@@ -388,7 +388,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
388 | 388 | ||
389 | m_resourcemanager.unlock(); | 389 | m_resourcemanager.unlock(); |
390 | ungrab(); | 390 | ungrab(); |
391 | 391 | ||
392 | #ifdef DEBUG | 392 | #ifdef DEBUG |
393 | if (m_resourcemanager.lockDepth() != 0) | 393 | if (m_resourcemanager.lockDepth() != 0) |
394 | cerr<<"--- resource manager lockdepth = "<<m_resourcemanager.lockDepth()<<endl; | 394 | cerr<<"--- resource manager lockdepth = "<<m_resourcemanager.lockDepth()<<endl; |
@@ -1568,22 +1568,18 @@ void Fluxbox::load_rc(BScreen &screen) { | |||
1568 | cerr<<__FILE__<<"("<<__FUNCTION__<<"): Workspaces="<< | 1568 | cerr<<__FILE__<<"("<<__FUNCTION__<<"): Workspaces="<< |
1569 | screen.getNumberOfWorkspaces()<<endl; | 1569 | screen.getNumberOfWorkspaces()<<endl; |
1570 | #endif // DEBUG | 1570 | #endif // DEBUG |
1571 | char *search = StringUtil::strdup(value.addr); | 1571 | string values(value.addr); |
1572 | 1572 | BScreen::WorkspaceNames names; | |
1573 | int i; | 1573 | |
1574 | for (i = 0; i < screen.getNumberOfWorkspaces(); i++) { | 1574 | StringUtil::removeTrailingWhitespace(values); |
1575 | char *nn; | 1575 | StringUtil::removeFirstWhitespace(values); |
1576 | 1576 | StringUtil::stringtok<BScreen::WorkspaceNames>(names, values, ","); | |
1577 | if (! i) nn = strtok(search, ","); | 1577 | BScreen::WorkspaceNames::iterator it; |
1578 | else nn = strtok(0, ","); | 1578 | for(it = names.begin(); it != names.end(); it++) { |
1579 | 1579 | if (!(*it).empty() && (*it) != "") | |
1580 | if (nn) | 1580 | screen.addWorkspaceName((*it).c_str()); |
1581 | screen.addWorkspaceName(nn); | ||
1582 | else break; | ||
1583 | |||
1584 | } | 1581 | } |
1585 | 1582 | ||
1586 | delete [] search; | ||
1587 | } | 1583 | } |
1588 | 1584 | ||
1589 | FbTk::Image::removeAllSearchPaths(); | 1585 | FbTk::Image::removeAllSearchPaths(); |