summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-05-03 13:14:06 (GMT)
committerfluxgen <fluxgen>2002-05-03 13:14:06 (GMT)
commitfbf610b774107f1139e4b40008b5f2fed611a589 (patch)
tree90b4fd267fa7158ffa067486a084e527f3cf728b
parent3cc006d7b57fa982ae10087c36616f4c8a511c0a (diff)
downloadfluxbox_lack-fbf610b774107f1139e4b40008b5f2fed611a589.zip
fluxbox_lack-fbf610b774107f1139e4b40008b5f2fed611a589.tar.bz2
indentation and on_top/auto_raise savings
-rw-r--r--src/Toolbar.cc49
1 files changed, 28 insertions, 21 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index cdeac65..09fddcb 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.21 2002/04/09 23:16:28 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.22 2002/05/03 13:14:06 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -724,9 +724,9 @@ void Toolbar::redrawWindowLabel(Bool redraw) {
724 XClearWindow(display, frame.window_label); 724 XClearWindow(display, frame.window_label);
725 725
726 FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow(); 726 FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow();
727 if (foc->getScreen() != screen) 727 if (foc->getScreen() != screen || foc->getTitle().size() == 0)
728 return; 728 return;
729 729
730 int dx = (frame.bevel_w * 2), dlen = foc->getTitle().size(); 730 int dx = (frame.bevel_w * 2), dlen = foc->getTitle().size();
731 unsigned int l; 731 unsigned int l;
732 I18n *i18n = I18n::instance(); 732 I18n *i18n = I18n::instance();
@@ -1146,7 +1146,7 @@ void Toolbar::keyPressEvent(XKeyEvent *ke) {
1146 if (ks == XK_Return || ks == XK_Escape) { 1146 if (ks == XK_Return || ks == XK_Escape) {
1147 1147
1148 1148
1149 editing = False; 1149 editing = false;
1150 1150
1151 fluxbox->setNoFocus(False); 1151 fluxbox->setNoFocus(False);
1152 if (fluxbox->getFocusedWindow()) { 1152 if (fluxbox->getFocusedWindow()) {
@@ -1170,6 +1170,9 @@ void Toolbar::keyPressEvent(XKeyEvent *ke) {
1170 screen->getWorkspacemenu()->update(); 1170 screen->getWorkspacemenu()->update();
1171 1171
1172 reconfigure(); 1172 reconfigure();
1173 //save workspace names
1174 Fluxbox::instance()->save_rc();
1175
1173 } else if (! (ks == XK_Shift_L || ks == XK_Shift_R || 1176 } else if (! (ks == XK_Shift_L || ks == XK_Shift_R ||
1174 ks == XK_Control_L || ks == XK_Control_R || 1177 ks == XK_Control_L || ks == XK_Control_R ||
1175 ks == XK_Caps_Lock || ks == XK_Shift_Lock || 1178 ks == XK_Caps_Lock || ks == XK_Shift_Lock ||
@@ -1308,27 +1311,31 @@ void Toolbarmenu::itemSelected(int button, unsigned int index) {
1308 if (! item) return; 1311 if (! item) return;
1309 1312
1310 switch (item->function()) { 1313 switch (item->function()) {
1311 case 1: // always on top 1314 case 1: {// always on top
1312 { 1315 bool change = ((toolbar->isOnTop()) ? false : true);
1313 bool change = ((toolbar->isOnTop()) ? False : True);
1314 toolbar->on_top = change; 1316 toolbar->on_top = change;
1315 setItemSelected(1, change); 1317 screen()->saveToolbarOnTop(toolbar->on_top);
1316 1318 setItemSelected(1, change);
1317 if (toolbar->isOnTop()) toolbar->screen->raiseWindows((Window *) 0, 0); 1319
1320 if (toolbar->isOnTop())
1321 toolbar->screen->raiseWindows((Window *) 0, 0);
1322
1323 Fluxbox::instance()->save_rc();
1318 break; 1324 break;
1319 } 1325 }
1320 1326
1321 case 2: // auto hide 1327 case 2: { // auto hide
1322 { 1328 bool change = ((toolbar->doAutoHide()) ? false : true);
1323 bool change = ((toolbar->doAutoHide()) ? False : True); 1329 toolbar->do_auto_hide = change;
1324 toolbar->do_auto_hide = change; 1330 screen()->saveToolbarAutoHide(toolbar->do_auto_hide);
1325 setItemSelected(2, change); 1331 setItemSelected(2, change);
1326 1332
1327#ifdef SLIT 1333 #ifdef SLIT
1328 toolbar->screen->getSlit()->reposition(); 1334 toolbar->screen->getSlit()->reposition();
1329#endif // SLIT 1335 #endif // SLIT
1330 break; 1336 Fluxbox::instance()->save_rc();
1331 } 1337 break;
1338 }
1332 1339
1333 case 3: // edit current workspace name 1340 case 3: // edit current workspace name
1334 toolbar->edit(); //set edit mode 1341 toolbar->edit(); //set edit mode