diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-08 22:50:25 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-08 22:50:25 (GMT) |
commit | 6b391c3beadc35c22c93c892c0bdcdd6a4448bb9 (patch) | |
tree | 129259406e1aea7495f3a080bab582bcae307397 /src | |
parent | 39e0bdcbcc37f297e34a7b60623d05739710f870 (diff) | |
download | fluxbox_pavel-6b391c3beadc35c22c93c892c0bdcdd6a4448bb9.zip fluxbox_pavel-6b391c3beadc35c22c93c892c0bdcdd6a4448bb9.tar.bz2 |
update workspace names atoms/resources when adding a new workspace
also removed unnecessary items from default init file
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 3 | ||||
-rw-r--r-- | src/Screen.cc | 12 | ||||
-rw-r--r-- | src/Screen.hh | 2 | ||||
-rw-r--r-- | src/Toolbar.cc | 2 |
4 files changed, 6 insertions, 13 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 8875ec2..fd3f71e 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -414,9 +414,6 @@ void SetWorkspaceNameCmd::execute() { | |||
414 | return; | 414 | return; |
415 | space->setName(m_name); | 415 | space->setName(m_name); |
416 | } | 416 | } |
417 | |||
418 | screen->updateWorkspaceNamesAtom(); | ||
419 | Fluxbox::instance()->save_rc(); | ||
420 | } | 417 | } |
421 | 418 | ||
422 | REGISTER_COMMAND(setworkspacenamedialog, FbCommands::WorkspaceNameDialogCmd, void); | 419 | REGISTER_COMMAND(setworkspacenamedialog, FbCommands::WorkspaceNameDialogCmd, void); |
diff --git a/src/Screen.cc b/src/Screen.cc index ac5b11e..4412d29 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1021,7 +1021,7 @@ void BScreen::updateWorkspaceName(unsigned int w) { | |||
1021 | Workspace *space = getWorkspace(w); | 1021 | Workspace *space = getWorkspace(w); |
1022 | if (space) { | 1022 | if (space) { |
1023 | m_workspace_names[w] = space->name(); | 1023 | m_workspace_names[w] = space->name(); |
1024 | updateWorkspaceNamesAtom(); | 1024 | m_workspacenames_sig.notify(); |
1025 | Fluxbox::instance()->save_rc(); | 1025 | Fluxbox::instance()->save_rc(); |
1026 | } | 1026 | } |
1027 | } | 1027 | } |
@@ -1030,10 +1030,6 @@ void BScreen::removeWorkspaceNames() { | |||
1030 | m_workspace_names.clear(); | 1030 | m_workspace_names.clear(); |
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | void BScreen::updateWorkspaceNamesAtom() { | ||
1034 | m_workspacenames_sig.notify(); | ||
1035 | } | ||
1036 | |||
1037 | void BScreen::addIcon(FluxboxWindow *w) { | 1033 | void BScreen::addIcon(FluxboxWindow *w) { |
1038 | if (w == 0) | 1034 | if (w == 0) |
1039 | return; | 1035 | return; |
@@ -1104,14 +1100,16 @@ void BScreen::removeClient(WinClient &client) { | |||
1104 | 1100 | ||
1105 | int BScreen::addWorkspace() { | 1101 | int BScreen::addWorkspace() { |
1106 | 1102 | ||
1107 | bool save_name = getNameOfWorkspace(m_workspaces_list.size()) != "" ? false : true; | 1103 | bool save_name = getNameOfWorkspace(m_workspaces_list.size()) == ""; |
1108 | Workspace *wkspc = new Workspace(*this, | 1104 | Workspace *wkspc = new Workspace(*this, |
1109 | getNameOfWorkspace(m_workspaces_list.size()), | 1105 | getNameOfWorkspace(m_workspaces_list.size()), |
1110 | m_workspaces_list.size()); | 1106 | m_workspaces_list.size()); |
1111 | m_workspaces_list.push_back(wkspc); | 1107 | m_workspaces_list.push_back(wkspc); |
1112 | 1108 | ||
1113 | if (save_name) | 1109 | if (save_name) { |
1114 | addWorkspaceName(wkspc->name().c_str()); //update names | 1110 | addWorkspaceName(wkspc->name().c_str()); //update names |
1111 | m_workspacenames_sig.notify(); | ||
1112 | } | ||
1115 | 1113 | ||
1116 | saveWorkspaces(m_workspaces_list.size()); | 1114 | saveWorkspaces(m_workspaces_list.size()); |
1117 | workspaceCountSig().notify(); | 1115 | workspaceCountSig().notify(); |
diff --git a/src/Screen.hh b/src/Screen.hh index 9800d19..ecf2f05 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -342,8 +342,6 @@ public: | |||
342 | void updateWorkspaceName(unsigned int w); | 342 | void updateWorkspaceName(unsigned int w); |
343 | /// remove all workspace names | 343 | /// remove all workspace names |
344 | void removeWorkspaceNames(); | 344 | void removeWorkspaceNames(); |
345 | /// update the workspace name atom | ||
346 | void updateWorkspaceNamesAtom(); | ||
347 | /// add a workspace name to the end of the workspace name list | 345 | /// add a workspace name to the end of the workspace name list |
348 | void addWorkspaceName(const char *name); | 346 | void addWorkspaceName(const char *name); |
349 | /// add a window to the icon list | 347 | /// add a window to the icon list |
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 73fd706..0292b87 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -231,7 +231,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width): | |||
231 | m_rc_maximize_over(scrn.resourceManager(), false, | 231 | m_rc_maximize_over(scrn.resourceManager(), false, |
232 | scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), | 232 | scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), |
233 | m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"), | 233 | m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"), |
234 | m_rc_width_percent(scrn.resourceManager(), 65, | 234 | m_rc_width_percent(scrn.resourceManager(), 66, |
235 | scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"), | 235 | scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"), |
236 | m_rc_alpha(scrn.resourceManager(), 255, | 236 | m_rc_alpha(scrn.resourceManager(), 255, |
237 | scrn.name() + ".toolbar.alpha", scrn.altName() + ".Toolbar.Alpha"), | 237 | scrn.name() + ".toolbar.alpha", scrn.altName() + ".Toolbar.Alpha"), |