save workspace names properly with the new Configuration class.
This commit is contained in:
parent
0305cbdc3a
commit
59cea4f2d3
2 changed files with 11 additions and 4 deletions
|
@ -231,6 +231,7 @@ BScreen::BScreen(Blackbox *bb, unsigned int scrn) : ScreenInfo(bb, scrn) {
|
||||||
workspacesList.push_back(wkspc);
|
workspacesList.push_back(wkspc);
|
||||||
workspacemenu->insert(wkspc->getName(), wkspc->getMenu());
|
workspacemenu->insert(wkspc->getName(), wkspc->getMenu());
|
||||||
}
|
}
|
||||||
|
saveWorkspaceNames();
|
||||||
|
|
||||||
workspacemenu->insert(i18n(IconSet, IconIcons, "Icons"), iconmenu);
|
workspacemenu->insert(i18n(IconSet, IconIcons, "Icons"), iconmenu);
|
||||||
workspacemenu->update();
|
workspacemenu->update();
|
||||||
|
@ -472,10 +473,15 @@ void BScreen::saveClock24Hour(Bool c) {
|
||||||
|
|
||||||
|
|
||||||
void BScreen::saveWorkspaceNames() {
|
void BScreen::saveWorkspaceNames() {
|
||||||
string save_string = getWorkspace(0)->getName();
|
string names;
|
||||||
for (unsigned int i = 1; i < getWorkspaceCount(); ++i)
|
WorkspaceList::iterator it;
|
||||||
save_string += ',' + getWorkspace(i)->getName();
|
WorkspaceList::iterator last = workspacesList.end() - 1;
|
||||||
config->setValue(screenstr + "workspaceNames", save_string);
|
for (it = workspacesList.begin(); it != workspacesList.end(); ++it) {
|
||||||
|
names += (*it)->getName();
|
||||||
|
if (it != last)
|
||||||
|
names += ',';
|
||||||
|
}
|
||||||
|
config->setValue(screenstr + "workspaceNames", names);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -382,6 +382,7 @@ void Workspace::setName(const string& new_name) {
|
||||||
|
|
||||||
clientmenu->setLabel(name);
|
clientmenu->setLabel(name);
|
||||||
clientmenu->update();
|
clientmenu->update();
|
||||||
|
screen->saveWorkspaceNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue