update workspace names atoms/resources when adding a new workspace

also removed unnecessary items from default init file
This commit is contained in:
Mark Tiefenbruck 2008-09-08 18:50:25 -04:00
parent 39e0bdcbcc
commit 6b391c3bea
5 changed files with 6 additions and 42 deletions

View file

@ -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

View file

@ -414,9 +414,6 @@ void SetWorkspaceNameCmd::execute() {
return;
space->setName(m_name);
}
screen->updateWorkspaceNamesAtom();
Fluxbox::instance()->save_rc();
}
REGISTER_COMMAND(setworkspacenamedialog, FbCommands::WorkspaceNameDialogCmd, void);

View file

@ -1021,7 +1021,7 @@ 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();
}
}
@ -1030,10 +1030,6 @@ void BScreen::removeWorkspaceNames() {
m_workspace_names.clear();
}
void BScreen::updateWorkspaceNamesAtom() {
m_workspacenames_sig.notify();
}
void BScreen::addIcon(FluxboxWindow *w) {
if (w == 0)
return;
@ -1104,14 +1100,16 @@ void BScreen::removeClient(WinClient &client) {
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();

View file

@ -342,8 +342,6 @@ public:
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

View file

@ -231,7 +231,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
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"),