diff options
author | markt <markt> | 2007-02-17 17:39:00 (GMT) |
---|---|---|
committer | markt <markt> | 2007-02-17 17:39:00 (GMT) |
commit | 2f130ce836c85f40df95a35174fff0cbd0242834 (patch) | |
tree | 937a04d0a4b5416f72340128dff2a1b40a566467 /src | |
parent | 58eb385351995aa7b5d9bbecd2b0dfa1d31e0dc8 (diff) | |
download | fluxbox-2f130ce836c85f40df95a35174fff0cbd0242834.zip fluxbox-2f130ce836c85f40df95a35174fff0cbd0242834.tar.bz2 |
update workspace names on reconfig, and don't truncate list of names when writing rc
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 3 | ||||
-rw-r--r-- | src/fluxbox.cc | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 4097dd7..2a4ea9b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1503,6 +1503,9 @@ void BScreen::updateAvailableWorkspaceArea() { | |||
1503 | 1503 | ||
1504 | void BScreen::addWorkspaceName(const char *name) { | 1504 | void BScreen::addWorkspaceName(const char *name) { |
1505 | m_workspace_names.push_back(FbTk::FbStringUtil::LocaleStrToFb(name)); | 1505 | m_workspace_names.push_back(FbTk::FbStringUtil::LocaleStrToFb(name)); |
1506 | Workspace *wkspc = getWorkspace(m_workspace_names.size()-1); | ||
1507 | if (wkspc) | ||
1508 | wkspc->setName(m_workspace_names.back()); | ||
1506 | } | 1509 | } |
1507 | 1510 | ||
1508 | 1511 | ||
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 7958a27..42ff47d 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -1506,11 +1506,9 @@ void Fluxbox::save_rc() { | |||
1506 | sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number); | 1506 | sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number); |
1507 | string workspaces_string(rc_string); | 1507 | string workspaces_string(rc_string); |
1508 | 1508 | ||
1509 | for (unsigned int workspace=0; workspace < screen->numberOfWorkspaces(); workspace++) { | 1509 | const vector<string> names = screen->getWorkspaceNames(); |
1510 | if (screen->getWorkspace(workspace)->name().size()!=0) | 1510 | for (size_t i=0; i < names.size(); i++) { |
1511 | workspaces_string.append(FbTk::FbStringUtil::FbStrToLocale(screen->getWorkspace(workspace)->name())); | 1511 | workspaces_string.append(FbTk::FbStringUtil::FbStrToLocale(names[i])); |
1512 | else | ||
1513 | workspaces_string.append("Null"); | ||
1514 | workspaces_string.append(","); | 1512 | workspaces_string.append(","); |
1515 | } | 1513 | } |
1516 | 1514 | ||