aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-09-08 22:50:25 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-09-08 22:50:25 (GMT)
commit6b391c3beadc35c22c93c892c0bdcdd6a4448bb9 (patch)
tree129259406e1aea7495f3a080bab582bcae307397
parent39e0bdcbcc37f297e34a7b60623d05739710f870 (diff)
downloadfluxbox_paul-6b391c3beadc35c22c93c892c0bdcdd6a4448bb9.zip
fluxbox_paul-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.in29
-rw-r--r--src/FbCommands.cc3
-rw-r--r--src/Screen.cc12
-rw-r--r--src/Screen.hh2
-rw-r--r--src/Toolbar.cc2
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 @@
1session.screen0.slit.placement: RightBottom
2session.screen0.slit.onTop: False
3session.screen0.slit.autoHide: False
4session.screen0.tab.placement: Top
5session.screen0.toolbar.onTop: False
6session.screen0.toolbar.autoHide: False
7session.screen0.toolbar.placement: BottomCenter
8session.screen0.toolbar.widthPercent: 66
9session.screen0.workspaceNames: one,two,three,four
10session.screen0.strftimeFormat: %k:%M
11session.screen0.focusNewWindows: True
12session.screen0.focusModel: ClickToFocus
13session.screen0.fullMaximization: False
14session.screen0.edgeSnapThreshold: 10
15session.screen0.rowPlacementDirection: LeftToRight
16session.screen0.workspaces: 4
17session.screen0.colPlacementDirection: TopToBottom
18session.screen0.windowPlacement: RowSmartPlacement
19session.screen0.tab.width: 64
20session.screen0.tab.height: 16
21session.screen0.showwindowposition: true
22session.opaqueMove: False
23session.autoRaiseDelay: 250
24session.menuFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/menu 1session.menuFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/menu
25session.cacheLife: 5
26session.styleFile: @default_style@
27session.keyFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/keys 2session.keyFile: ~/.@pkgprefix@fluxbox@pkgsuffix@/keys
28session.colorsPerChannel: 4
29session.doubleClickInterval: 250
30session.cacheMax: 200
31session.imageDither: True
32session.configVersion: 10 3session.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
422REGISTER_COMMAND(setworkspacenamedialog, FbCommands::WorkspaceNameDialogCmd, void); 419REGISTER_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
1033void BScreen::updateWorkspaceNamesAtom() {
1034 m_workspacenames_sig.notify();
1035}
1036
1037void BScreen::addIcon(FluxboxWindow *w) { 1033void 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
1105int BScreen::addWorkspace() { 1101int 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"),