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 | |
parent | 39e0bdcbcc37f297e34a7b60623d05739710f870 (diff) | |
download | fluxbox_lack-6b391c3beadc35c22c93c892c0bdcdd6a4448bb9.zip fluxbox_lack-6b391c3beadc35c22c93c892c0bdcdd6a4448bb9.tar.bz2 |
update workspace names atoms/resources when adding a new workspace
also removed unnecessary items from default init file
-rw-r--r-- | data/init.in | 29 | ||||
-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 |
5 files changed, 6 insertions, 42 deletions
diff --git a/data/init.in b/data/init.in index a8fdccd..b26b56a 100644 --- a/data/init.in +++ b/data/init.in | |||
@@ -1,32 +1,3 @@ | |||
1 | session.screen0.slit.placement: RightBottom | ||
2 | session.screen0.slit.onTop: False | ||
3 | session.screen0.slit.autoHide: False | ||
4 | session.screen0.tab.placement: Top | ||
5 | session.screen0.toolbar.onTop: False | ||
6 | session.screen0.toolbar.autoHide: False | ||
7 | session.screen0.toolbar.placement: BottomCenter | ||
8 | session.screen0.toolbar.widthPercent: 66 | ||
9 | session.screen0.workspaceNames: one,two,three,four | ||
10 | session.screen0.strftimeFormat: %k:%M | ||
11 | session.screen0.focusNewWindows: True | ||
12 | session.screen0.focusModel: ClickToFocus | ||
13 | session.screen0.fullMaximization: False | ||
14 | session.screen0.edgeSnapThreshold: 10 | ||
15 | session.screen0.rowPlacementDirection: LeftToRight | ||
16 | session.screen0.workspaces: 4 | ||
17 | session.screen0.colPlacementDirection: TopToBottom | ||
18 | session.screen0.windowPlacement: RowSmartPlacement | ||
19 | session.screen0.tab.width: 64 | ||
20 | session.screen0.tab.height: 16 | ||
21 | session.screen0.showwindowposition: true | ||
22 | session.opaqueMove: False | ||
23 | session.autoRaiseDelay: 250 | ||
24 | session.menuFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/menu | 1 | session.menuFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/menu |
25 | session.cacheLife: 5 | ||
26 | session.styleFile: @default_style@ | ||
27 | session.keyFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/keys | 2 | session.keyFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/keys |
28 | session.colorsPerChannel: 4 | ||
29 | session.doubleClickInterval: 250 | ||
30 | session.cacheMax: 200 | ||
31 | session.imageDither: True | ||
32 | session.configVersion: 10 | 3 | session.configVersion: 10 |
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"), |