update workspace names atoms/resources when adding a new workspace also removed unnecessary items from default init file
Mark Tiefenbruck mark@fluxbox.org
5 files changed,
6 insertions(+),
42 deletions(-)
M
data/init.in
→
data/init.in
@@ -1,32 +1,3 @@
-session.screen0.slit.placement: RightBottom -session.screen0.slit.onTop: False -session.screen0.slit.autoHide: False -session.screen0.tab.placement: Top -session.screen0.toolbar.onTop: False -session.screen0.toolbar.autoHide: False -session.screen0.toolbar.placement: BottomCenter -session.screen0.toolbar.widthPercent: 66 -session.screen0.workspaceNames: one,two,three,four -session.screen0.strftimeFormat: %k:%M -session.screen0.focusNewWindows: True -session.screen0.focusModel: ClickToFocus -session.screen0.fullMaximization: False -session.screen0.edgeSnapThreshold: 10 -session.screen0.rowPlacementDirection: LeftToRight -session.screen0.workspaces: 4 -session.screen0.colPlacementDirection: TopToBottom -session.screen0.windowPlacement: RowSmartPlacement -session.screen0.tab.width: 64 -session.screen0.tab.height: 16 -session.screen0.showwindowposition: true -session.opaqueMove: False -session.autoRaiseDelay: 250 session.menuFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/menu -session.cacheLife: 5 -session.styleFile: @default_style@ session.keyFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/keys -session.colorsPerChannel: 4 -session.doubleClickInterval: 250 -session.cacheMax: 200 -session.imageDither: True session.configVersion: 10
M
src/FbCommands.cc
→
src/FbCommands.cc
@@ -414,9 +414,6 @@ if (space == 0)
return; space->setName(m_name); } - - screen->updateWorkspaceNamesAtom(); - Fluxbox::instance()->save_rc(); } REGISTER_COMMAND(setworkspacenamedialog, FbCommands::WorkspaceNameDialogCmd, void);
M
src/Screen.cc
→
src/Screen.cc
@@ -1021,17 +1021,13 @@ void BScreen::updateWorkspaceName(unsigned int w) {
Workspace *space = getWorkspace(w); if (space) { m_workspace_names[w] = space->name(); - updateWorkspaceNamesAtom(); + m_workspacenames_sig.notify(); Fluxbox::instance()->save_rc(); } } void BScreen::removeWorkspaceNames() { m_workspace_names.clear(); -} - -void BScreen::updateWorkspaceNamesAtom() { - m_workspacenames_sig.notify(); } void BScreen::addIcon(FluxboxWindow *w) {@@ -1104,14 +1100,16 @@ }
int BScreen::addWorkspace() { - bool save_name = getNameOfWorkspace(m_workspaces_list.size()) != "" ? false : true; + bool save_name = getNameOfWorkspace(m_workspaces_list.size()) == ""; Workspace *wkspc = new Workspace(*this, getNameOfWorkspace(m_workspaces_list.size()), m_workspaces_list.size()); m_workspaces_list.push_back(wkspc); - if (save_name) + if (save_name) { addWorkspaceName(wkspc->name().c_str()); //update names + m_workspacenames_sig.notify(); + } saveWorkspaces(m_workspaces_list.size()); workspaceCountSig().notify();
M
src/Screen.hh
→
src/Screen.hh
@@ -342,8 +342,6 @@ /// update workspace name for given workspace
void updateWorkspaceName(unsigned int w); /// remove all workspace names void removeWorkspaceNames(); - /// update the workspace name atom - void updateWorkspaceNamesAtom(); /// add a workspace name to the end of the workspace name list void addWorkspaceName(const char *name); /// add a window to the icon list
M
src/Toolbar.cc
→
src/Toolbar.cc
@@ -231,7 +231,7 @@ scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"),
m_rc_maximize_over(scrn.resourceManager(), false, scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"), - m_rc_width_percent(scrn.resourceManager(), 65, + m_rc_width_percent(scrn.resourceManager(), 66, scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"), m_rc_alpha(scrn.resourceManager(), 255, scrn.name() + ".toolbar.alpha", scrn.altName() + ".Toolbar.Alpha"),