2002-05-25 00:29:44 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
|
|
|
// Configmenu.cc for Blackbox - An X11 Window Manager
|
|
|
|
// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org>
|
2002-04-11 03:20:38 +00:00
|
|
|
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
|
|
|
|
//
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
// copy of this software and associated documentation files (the "Software"),
|
|
|
|
// to deal in the Software without restriction, including without limitation
|
|
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "../config.h"
|
|
|
|
#endif // HAVE_CONFIG_H
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
#include "i18n.hh"
|
|
|
|
#include "Configmenu.hh"
|
|
|
|
#include "Image.hh"
|
|
|
|
#include "Toolbar.hh"
|
|
|
|
#include "Window.hh"
|
|
|
|
#include "Screen.hh"
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
|
|
|
|
setLabel(i18n(ConfigmenuSet, ConfigmenuConfigOptions, "Config options"));
|
2002-04-11 03:20:38 +00:00
|
|
|
setInternalMenu();
|
|
|
|
|
|
|
|
focusmenu = new Focusmenu(this);
|
|
|
|
placementmenu = new Placementmenu(this);
|
|
|
|
|
2002-05-16 22:35:59 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuFocusModel,
|
|
|
|
"Focus Model"), focusmenu);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuWindowPlacement,
|
|
|
|
"Window Placement"), placementmenu);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuImageDithering,
|
|
|
|
"Image Dithering"), 1);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuOpaqueMove,
|
|
|
|
"Opaque Window Moving"), 2);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuFullMax,
|
|
|
|
"Full Maximization"), 3);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuFocusNew,
|
|
|
|
"Focus New Windows"), 4);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuFocusLast,
|
|
|
|
"Focus Last Window on Workspace"), 5);
|
2002-06-02 00:30:55 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuWindowToWindowSnap,
|
|
|
|
"Window-To-Window Snapping"), 6);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuWindowCornerSnap,
|
|
|
|
"Window Corner Snapping"), 7);
|
2002-05-27 05:06:04 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuHideToolbar,
|
2002-06-02 00:30:55 +00:00
|
|
|
"Hide Toolbar"), 8);
|
2002-04-11 03:20:38 +00:00
|
|
|
update();
|
2002-05-26 20:25:38 +00:00
|
|
|
setValues();
|
|
|
|
}
|
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
void Configmenu::setValues(void) {
|
|
|
|
setItemSelected(2, getScreen()->doImageDither());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(3, getScreen()->doOpaqueMove());
|
|
|
|
setItemSelected(4, getScreen()->doFullMax());
|
|
|
|
setItemSelected(5, getScreen()->doFocusNew());
|
|
|
|
setItemSelected(6, getScreen()->doFocusLast());
|
2002-06-07 00:24:02 +00:00
|
|
|
setItemSelected(7, getScreen()->getWindowToWindowSnap());
|
2002-06-02 00:30:55 +00:00
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
setItemSelected(8, getScreen()->getWindowCornerSnap());
|
|
|
|
setItemEnabled(8, getScreen()->getWindowToWindowSnap());
|
2002-06-02 00:30:55 +00:00
|
|
|
|
|
|
|
setItemSelected(9, getScreen()->doHideToolbar());
|
2002-04-11 03:20:38 +00:00
|
|
|
}
|
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
Configmenu::~Configmenu(void) {
|
2002-04-11 03:20:38 +00:00
|
|
|
delete focusmenu;
|
|
|
|
delete placementmenu;
|
|
|
|
}
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
void Configmenu::itemSelected(int button, unsigned int index) {
|
2002-04-11 03:20:38 +00:00
|
|
|
if (button != 1)
|
|
|
|
return;
|
|
|
|
|
|
|
|
BasemenuItem *item = find(index);
|
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
if (! item->function())
|
2002-04-11 03:20:38 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
switch(item->function()) {
|
2002-06-07 00:24:02 +00:00
|
|
|
case 1: // dither
|
2002-05-26 20:25:38 +00:00
|
|
|
getScreen()->saveImageDither(! getScreen()->doImageDither());
|
|
|
|
setItemSelected(index, getScreen()->doImageDither());
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 2: // opaque move
|
2002-06-02 00:30:55 +00:00
|
|
|
getScreen()->saveOpaqueMove(! getScreen()->doOpaqueMove());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(index, getScreen()->doOpaqueMove());
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 3: // full maximization
|
2002-06-02 00:30:55 +00:00
|
|
|
getScreen()->saveFullMax(! getScreen()->doFullMax());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(index, getScreen()->doFullMax());
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
2002-06-07 00:24:02 +00:00
|
|
|
|
|
|
|
case 4: // focus new windows
|
2002-06-02 00:30:55 +00:00
|
|
|
getScreen()->saveFocusNew(! getScreen()->doFocusNew());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(index, getScreen()->doFocusNew());
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 5: // focus last window on workspace
|
2002-06-02 00:30:55 +00:00
|
|
|
getScreen()->saveFocusLast(! getScreen()->doFocusLast());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(index, getScreen()->doFocusLast());
|
2002-04-16 20:22:01 +00:00
|
|
|
break;
|
2002-05-27 05:06:04 +00:00
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 6: // window-to-window snapping
|
|
|
|
getScreen()->saveWindowToWindowSnap(! getScreen()->getWindowToWindowSnap());
|
|
|
|
setItemSelected(index, getScreen()->getWindowToWindowSnap());
|
|
|
|
setItemEnabled(index + 1, getScreen()->getWindowToWindowSnap());
|
2002-06-02 00:30:55 +00:00
|
|
|
break;
|
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 7: // window corner snapping
|
|
|
|
getScreen()->saveWindowCornerSnap(! getScreen()->getWindowCornerSnap());
|
|
|
|
setItemSelected(index, getScreen()->getWindowCornerSnap());
|
2002-06-02 00:30:55 +00:00
|
|
|
break;
|
|
|
|
|
2002-06-07 00:24:02 +00:00
|
|
|
case 8: // hide toolbar
|
2002-06-02 00:30:55 +00:00
|
|
|
getScreen()->saveHideToolbar(! getScreen()->doHideToolbar());
|
2002-05-27 05:06:04 +00:00
|
|
|
setItemSelected(index, getScreen()->doHideToolbar());
|
|
|
|
break;
|
|
|
|
}
|
2002-04-11 03:20:38 +00:00
|
|
|
}
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
|
|
|
|
void Configmenu::reconfigure(void) {
|
2002-05-26 20:25:38 +00:00
|
|
|
setValues();
|
2002-04-11 03:20:38 +00:00
|
|
|
focusmenu->reconfigure();
|
|
|
|
placementmenu->reconfigure();
|
|
|
|
|
|
|
|
Basemenu::reconfigure();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
Configmenu::Focusmenu::Focusmenu(Configmenu *cm) : Basemenu(cm->getScreen()) {
|
|
|
|
setLabel(i18n(ConfigmenuSet, ConfigmenuFocusModel, "Focus Model"));
|
2002-04-11 03:20:38 +00:00
|
|
|
setInternalMenu();
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuClickToFocus, "Click To Focus"), 1);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuSloppyFocus, "Sloppy Focus"), 2);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuAutoRaise, "Auto Raise"), 3);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuClickRaise, "Click Raise"), 4);
|
2002-04-11 03:20:38 +00:00
|
|
|
update();
|
2002-05-26 20:25:38 +00:00
|
|
|
setValues();
|
|
|
|
}
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
|
|
|
|
void Configmenu::Focusmenu::setValues(void) {
|
|
|
|
setItemSelected(0, ! getScreen()->isSloppyFocus());
|
2002-05-25 00:29:44 +00:00
|
|
|
setItemSelected(1, getScreen()->isSloppyFocus());
|
|
|
|
setItemEnabled(2, getScreen()->isSloppyFocus());
|
|
|
|
setItemSelected(2, getScreen()->doAutoRaise());
|
|
|
|
setItemEnabled(3, getScreen()->isSloppyFocus());
|
|
|
|
setItemSelected(3, getScreen()->doClickRaise());
|
2002-04-17 23:07:11 +00:00
|
|
|
}
|
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
void Configmenu::Focusmenu::reconfigure(void) {
|
|
|
|
setValues();
|
|
|
|
Basemenu::reconfigure();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
void Configmenu::Focusmenu::itemSelected(int button, unsigned int index) {
|
2002-04-11 03:20:38 +00:00
|
|
|
if (button != 1)
|
|
|
|
return;
|
|
|
|
|
|
|
|
BasemenuItem *item = find(index);
|
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
if (! item->function())
|
2002-04-11 03:20:38 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
switch (item->function()) {
|
|
|
|
case 1: // click to focus
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->toggleFocusModel(BScreen::ClickToFocus);
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: // sloppy focus
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->toggleFocusModel(BScreen::SloppyFocus);
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 3: // auto raise with sloppy focus
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->saveAutoRaise(! getScreen()->doAutoRaise());
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: // click raise with sloppy focus
|
|
|
|
getScreen()->saveClickRaise(! getScreen()->doClickRaise());
|
2002-07-05 01:24:32 +00:00
|
|
|
// make sure the appropriate mouse buttons are grabbed on the windows
|
|
|
|
getScreen()->toggleFocusModel(BScreen::SloppyFocus);
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
}
|
2002-05-26 20:25:38 +00:00
|
|
|
setValues();
|
2002-04-11 03:20:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
Configmenu::Placementmenu::Placementmenu(Configmenu *cm):
|
|
|
|
Basemenu(cm->getScreen()) {
|
|
|
|
setLabel(i18n(ConfigmenuSet, ConfigmenuWindowPlacement, "Window Placement"));
|
2002-04-11 03:20:38 +00:00
|
|
|
setInternalMenu();
|
2002-05-16 22:35:59 +00:00
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuSmartRows, "Smart Placement (Rows)"),
|
2002-05-16 22:35:59 +00:00
|
|
|
BScreen::RowSmartPlacement);
|
2002-05-25 00:29:44 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuSmartCols, "Smart Placement (Columns)"),
|
2002-05-16 22:35:59 +00:00
|
|
|
BScreen::ColSmartPlacement);
|
2002-05-25 00:29:44 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuCascade, "Cascade Placement"),
|
|
|
|
BScreen::CascadePlacement);
|
2002-05-28 12:39:23 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuUnderMouse, "Under Mouse Placement"),
|
|
|
|
BScreen::UnderMousePlacement);
|
2002-07-16 05:00:09 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuClickMouse, "Click Mouse Placement"),
|
|
|
|
BScreen::ClickMousePlacement);
|
2002-05-25 00:29:44 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuLeftRight, "Left to Right"),
|
|
|
|
BScreen::LeftRight);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuRightLeft, "Right to Left"),
|
|
|
|
BScreen::RightLeft);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuTopBottom, "Top to Bottom"),
|
|
|
|
BScreen::TopBottom);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuBottomTop, "Bottom to Top"),
|
|
|
|
BScreen::BottomTop);
|
2002-07-18 05:30:48 +00:00
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuIgnoreShaded, "Ignore Shaded Windows"),
|
2002-07-16 02:18:16 +00:00
|
|
|
BScreen::IgnoreShaded);
|
|
|
|
insert(i18n(ConfigmenuSet, ConfigmenuIgnoreMax,
|
2002-07-18 05:30:48 +00:00
|
|
|
"Ignore Full-Maximized Windows"),
|
2002-07-16 02:18:16 +00:00
|
|
|
BScreen::IgnoreMaximized);
|
2002-04-11 03:20:38 +00:00
|
|
|
update();
|
2002-05-26 20:25:38 +00:00
|
|
|
setValues();
|
|
|
|
}
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
|
|
|
|
void Configmenu::Placementmenu::setValues(void) {
|
2002-05-28 12:39:23 +00:00
|
|
|
int placement = getScreen()->getPlacementPolicy();
|
|
|
|
|
|
|
|
setItemSelected(0, placement == BScreen::RowSmartPlacement);
|
|
|
|
setItemSelected(1, placement == BScreen::ColSmartPlacement);
|
|
|
|
setItemSelected(2, placement == BScreen::CascadePlacement);
|
|
|
|
setItemSelected(3, placement == BScreen::UnderMousePlacement);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(4, placement == BScreen::ClickMousePlacement);
|
2002-04-28 00:11:19 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
bool rl = (getScreen()->getRowPlacementDirection() == BScreen::LeftRight),
|
2002-05-28 12:39:23 +00:00
|
|
|
tb = (getScreen()->getColPlacementDirection() == BScreen::TopBottom),
|
|
|
|
e = placement != BScreen::UnderMousePlacement;
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(5, rl);
|
|
|
|
setItemSelected(6, ! rl);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(5, e);
|
|
|
|
setItemEnabled(6, e);
|
2002-07-16 05:00:09 +00:00
|
|
|
|
|
|
|
setItemSelected(7, tb);
|
|
|
|
setItemSelected(8, ! tb);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(7, e);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemEnabled(8, e);
|
2002-07-16 02:18:16 +00:00
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(9, getScreen()->getPlaceIgnoreShaded());
|
|
|
|
setItemSelected(10, getScreen()->getPlaceIgnoreMaximized());
|
2002-04-17 23:07:11 +00:00
|
|
|
}
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
void Configmenu::Placementmenu::reconfigure(void) {
|
|
|
|
setValues();
|
|
|
|
Basemenu::reconfigure();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
void Configmenu::Placementmenu::itemSelected(int button, unsigned int index) {
|
2002-04-11 03:20:38 +00:00
|
|
|
if (button != 1)
|
|
|
|
return;
|
|
|
|
|
|
|
|
BasemenuItem *item = find(index);
|
|
|
|
|
2002-05-26 20:25:38 +00:00
|
|
|
if (! item->function())
|
2002-04-11 03:20:38 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
switch (item->function()) {
|
|
|
|
case BScreen::RowSmartPlacement:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->savePlacementPolicy(item->function());
|
|
|
|
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemSelected(0, true);
|
|
|
|
setItemSelected(1, false);
|
|
|
|
setItemSelected(2, false);
|
|
|
|
setItemSelected(3, false);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(4, false);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(5, true);
|
|
|
|
setItemEnabled(6, true);
|
|
|
|
setItemEnabled(7, true);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemEnabled(8, true);
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::ColSmartPlacement:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->savePlacementPolicy(item->function());
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemSelected(0, false);
|
|
|
|
setItemSelected(1, true);
|
|
|
|
setItemSelected(2, false);
|
|
|
|
setItemSelected(3, false);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(4, false);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(5, true);
|
|
|
|
setItemEnabled(6, true);
|
|
|
|
setItemEnabled(7, true);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemEnabled(8, true);
|
2002-04-14 01:11:51 +00:00
|
|
|
|
2002-04-28 00:11:19 +00:00
|
|
|
break;
|
2002-04-14 01:11:51 +00:00
|
|
|
|
2002-05-25 00:29:44 +00:00
|
|
|
case BScreen::CascadePlacement:
|
|
|
|
getScreen()->savePlacementPolicy(item->function());
|
|
|
|
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemSelected(0, false);
|
|
|
|
setItemSelected(1, false);
|
|
|
|
setItemSelected(2, true);
|
|
|
|
setItemSelected(3, false);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(4, false);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(5, true);
|
|
|
|
setItemEnabled(6, true);
|
|
|
|
setItemEnabled(7, true);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemEnabled(8, true);
|
2002-05-28 12:39:23 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::UnderMousePlacement:
|
|
|
|
getScreen()->savePlacementPolicy(item->function());
|
|
|
|
|
|
|
|
setItemSelected(0, false);
|
|
|
|
setItemSelected(1, false);
|
|
|
|
setItemSelected(2, false);
|
|
|
|
setItemSelected(3, true);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(4, false);
|
2002-05-28 12:39:23 +00:00
|
|
|
setItemEnabled(5, false);
|
|
|
|
setItemEnabled(6, false);
|
|
|
|
setItemEnabled(7, false);
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemEnabled(8, false);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::ClickMousePlacement:
|
|
|
|
getScreen()->savePlacementPolicy(item->function());
|
|
|
|
|
|
|
|
setItemSelected(0, false);
|
|
|
|
setItemSelected(1, false);
|
|
|
|
setItemSelected(2, false);
|
|
|
|
setItemSelected(3, false);
|
|
|
|
setItemSelected(4, true);
|
|
|
|
setItemEnabled(5, false);
|
|
|
|
setItemEnabled(6, false);
|
|
|
|
setItemEnabled(7, false);
|
|
|
|
setItemEnabled(8, false);
|
2002-04-11 03:20:38 +00:00
|
|
|
|
2002-04-28 12:12:24 +00:00
|
|
|
break;
|
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
case BScreen::LeftRight:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->saveRowPlacementDirection(BScreen::LeftRight);
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(5, true);
|
|
|
|
setItemSelected(6, false);
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::RightLeft:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->saveRowPlacementDirection(BScreen::RightLeft);
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(5, false);
|
|
|
|
setItemSelected(6, true);
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::TopBottom:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->saveColPlacementDirection(BScreen::TopBottom);
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(7, true);
|
|
|
|
setItemSelected(8, false);
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::BottomTop:
|
2002-05-25 00:29:44 +00:00
|
|
|
getScreen()->saveColPlacementDirection(BScreen::BottomTop);
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(7, false);
|
|
|
|
setItemSelected(8, true);
|
2002-05-25 00:29:44 +00:00
|
|
|
|
2002-07-16 02:18:16 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::IgnoreShaded:
|
|
|
|
getScreen()->savePlaceIgnoreShaded(! getScreen()->getPlaceIgnoreShaded());
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(9, getScreen()->getPlaceIgnoreShaded());
|
2002-07-16 02:18:16 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BScreen::IgnoreMaximized:
|
|
|
|
getScreen()->
|
|
|
|
savePlaceIgnoreMaximized(! getScreen()->getPlaceIgnoreMaximized());
|
|
|
|
|
2002-07-16 05:00:09 +00:00
|
|
|
setItemSelected(10, getScreen()->getPlaceIgnoreMaximized());
|
2002-07-16 02:18:16 +00:00
|
|
|
|
2002-04-11 03:20:38 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|