indentation and on_top/auto_raise savings

This commit is contained in:
fluxgen 2002-05-03 13:14:06 +00:00
parent 3cc006d7b5
commit fbf610b774

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.cc,v 1.21 2002/04/09 23:16:28 fluxgen Exp $ // $Id: Toolbar.cc,v 1.22 2002/05/03 13:14:06 fluxgen Exp $
// stupid macros needed to access some functions in version 2 of the GNU C // stupid macros needed to access some functions in version 2 of the GNU C
// library // library
@ -724,7 +724,7 @@ void Toolbar::redrawWindowLabel(Bool redraw) {
XClearWindow(display, frame.window_label); XClearWindow(display, frame.window_label);
FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow(); FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow();
if (foc->getScreen() != screen) if (foc->getScreen() != screen || foc->getTitle().size() == 0)
return; return;
int dx = (frame.bevel_w * 2), dlen = foc->getTitle().size(); int dx = (frame.bevel_w * 2), dlen = foc->getTitle().size();
@ -1146,7 +1146,7 @@ void Toolbar::keyPressEvent(XKeyEvent *ke) {
if (ks == XK_Return || ks == XK_Escape) { if (ks == XK_Return || ks == XK_Escape) {
editing = False; editing = false;
fluxbox->setNoFocus(False); fluxbox->setNoFocus(False);
if (fluxbox->getFocusedWindow()) { if (fluxbox->getFocusedWindow()) {
@ -1170,6 +1170,9 @@ void Toolbar::keyPressEvent(XKeyEvent *ke) {
screen->getWorkspacemenu()->update(); screen->getWorkspacemenu()->update();
reconfigure(); reconfigure();
//save workspace names
Fluxbox::instance()->save_rc();
} else if (! (ks == XK_Shift_L || ks == XK_Shift_R || } else if (! (ks == XK_Shift_L || ks == XK_Shift_R ||
ks == XK_Control_L || ks == XK_Control_R || ks == XK_Control_L || ks == XK_Control_R ||
ks == XK_Caps_Lock || ks == XK_Shift_Lock || ks == XK_Caps_Lock || ks == XK_Shift_Lock ||
@ -1308,25 +1311,29 @@ void Toolbarmenu::itemSelected(int button, unsigned int index) {
if (! item) return; if (! item) return;
switch (item->function()) { switch (item->function()) {
case 1: // always on top case 1: {// always on top
{ bool change = ((toolbar->isOnTop()) ? false : true);
bool change = ((toolbar->isOnTop()) ? False : True);
toolbar->on_top = change; toolbar->on_top = change;
screen()->saveToolbarOnTop(toolbar->on_top);
setItemSelected(1, change); setItemSelected(1, change);
if (toolbar->isOnTop()) toolbar->screen->raiseWindows((Window *) 0, 0); if (toolbar->isOnTop())
toolbar->screen->raiseWindows((Window *) 0, 0);
Fluxbox::instance()->save_rc();
break; break;
} }
case 2: // auto hide case 2: { // auto hide
{ bool change = ((toolbar->doAutoHide()) ? false : true);
bool change = ((toolbar->doAutoHide()) ? False : True);
toolbar->do_auto_hide = change; toolbar->do_auto_hide = change;
screen()->saveToolbarAutoHide(toolbar->do_auto_hide);
setItemSelected(2, change); setItemSelected(2, change);
#ifdef SLIT #ifdef SLIT
toolbar->screen->getSlit()->reposition(); toolbar->screen->getSlit()->reposition();
#endif // SLIT #endif // SLIT
Fluxbox::instance()->save_rc();
break; break;
} }