update workspace names on reconfig, and don't truncate list of names when writing rc
markt markt
3 files changed,
9 insertions(+),
5 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,9 @@
(Format: Year/Month/Day) Changes for 1.0rc3: *07/02/17: + * Update workspace names on reconfigure, and don't overwrite workspace names + not being used (Mark) + fluxbox.cc Screen.cc * Fixed some issues with transients of inactive tabs (Mark) Window.cc *07/02/10:
M
src/Screen.cc
→
src/Screen.cc
@@ -1503,6 +1503,9 @@ }
void BScreen::addWorkspaceName(const char *name) { m_workspace_names.push_back(FbTk::FbStringUtil::LocaleStrToFb(name)); + Workspace *wkspc = getWorkspace(m_workspace_names.size()-1); + if (wkspc) + wkspc->setName(m_workspace_names.back()); }
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -1506,11 +1506,9 @@ // write out the users workspace names
sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number); string workspaces_string(rc_string); - for (unsigned int workspace=0; workspace < screen->numberOfWorkspaces(); workspace++) { - if (screen->getWorkspace(workspace)->name().size()!=0) - workspaces_string.append(FbTk::FbStringUtil::FbStrToLocale(screen->getWorkspace(workspace)->name())); - else - workspaces_string.append("Null"); + const vector<string> names = screen->getWorkspaceNames(); + for (size_t i=0; i < names.size(); i++) { + workspaces_string.append(FbTk::FbStringUtil::FbStrToLocale(names[i])); workspaces_string.append(","); }