Changed toolbar placement enums to uppercase letters. (Claes N�st�n)

This commit is contained in:
pekdon 2002-01-06 09:37:50 +00:00
parent 69ebd4b8dc
commit edb664f929
6 changed files with 44 additions and 42 deletions

View file

@ -1,4 +1,6 @@
Changes for 0.1.6:
*02/01/06:
* Changed toolbar placement enums to uppercase letters (Claes Nästén)
*02/01/05:
* Changed placement/alignment enums to uppercase letters (Claes Nästén)
* Fixed tab/iconbar resource bug (Claes Nästén)

View file

@ -722,9 +722,9 @@ void Tab::motionNotifyEvent(XMotionEvent *me) {
int dtty, dbby, dty, dby;
switch (m_win->getScreen()->getToolbarPlacement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
case Toolbar::TOPLEFT:
case Toolbar::TOPCENTER:
case Toolbar::TOPRIGHT:
dtty = m_win->getScreen()->getToolbar()->getExposedHeight() +
m_win->getScreen()->getBorderWidth();
dbby = m_win->getScreen()->getHeight();

View file

@ -227,7 +227,7 @@ void Toolbar::reconfigure(void) {
frame.height += (frame.bevel_w * 2);
switch (screen->getToolbarPlacement()) {
case TopLeft:
case TOPLEFT:
frame.x = 0;
frame.y = 0;
frame.x_hidden = 0;
@ -235,7 +235,7 @@ void Toolbar::reconfigure(void) {
- frame.height;
break;
case BottomLeft:
case BOTTOMLEFT:
frame.x = 0;
frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x();
frame.x_hidden = 0;
@ -243,7 +243,7 @@ void Toolbar::reconfigure(void) {
- screen->getBorderWidth();
break;
case TopCenter:
case TOPCENTER:
frame.x = (screen->getWidth() - frame.width) / 2;
frame.y = 0;
frame.x_hidden = frame.x;
@ -251,7 +251,7 @@ void Toolbar::reconfigure(void) {
- frame.height;
break;
case BottomCenter:
case BOTTOMCENTER:
default:
frame.x = (screen->getWidth() - frame.width) / 2;
frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x();
@ -260,7 +260,7 @@ void Toolbar::reconfigure(void) {
- screen->getBorderWidth();
break;
case TopRight:
case TOPRIGHT:
frame.x = screen->getWidth() - frame.width - screen->getBorderWidth2x();
frame.y = 0;
frame.x_hidden = frame.x;
@ -268,7 +268,7 @@ void Toolbar::reconfigure(void) {
- frame.height;
break;
case BottomRight:
case BOTTOMRIGHT:
frame.x = screen->getWidth() - frame.width - screen->getBorderWidth2x();
frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x();
frame.x_hidden = frame.x;
@ -1349,7 +1349,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Top Left"),
Toolbar::TopLeft);
Toolbar::TOPLEFT);
insert(i18n->getMessage(
#ifdef NLS
CommonSet, CommonPlacementBottomLeft,
@ -1357,7 +1357,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Bottom Left"),
Toolbar::BottomLeft);
Toolbar::BOTTOMLEFT);
insert(i18n->getMessage(
#ifdef NLS
CommonSet, CommonPlacementTopCenter,
@ -1365,7 +1365,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Top Center"),
Toolbar::TopCenter);
Toolbar::TOPCENTER);
insert(i18n->getMessage(
#ifdef NLS
CommonSet, CommonPlacementBottomCenter,
@ -1373,7 +1373,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Bottom Center"),
Toolbar::BottomCenter);
Toolbar::BOTTOMCENTER);
insert(i18n->getMessage(
#ifdef NLS
CommonSet, CommonPlacementTopRight,
@ -1381,7 +1381,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Top Right"),
Toolbar::TopRight);
Toolbar::TOPRIGHT);
insert(i18n->getMessage(
#ifdef NLS
CommonSet, CommonPlacementBottomRight,
@ -1389,7 +1389,7 @@ Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
0, 0,
#endif // NLS
"Bottom Right"),
Toolbar::BottomRight);
Toolbar::BOTTOMRIGHT);
update();
}

View file

@ -156,8 +156,8 @@ public:
virtual void timeout(void);
enum { TopLeft = 1, BottomLeft, TopCenter,
BottomCenter, TopRight, BottomRight };
enum { TOPLEFT = 1, BOTTOMLEFT, TOPCENTER,
BOTTOMCENTER, TOPRIGHT, BOTTOMRIGHT };
};

View file

@ -1847,9 +1847,9 @@ void FluxboxWindow::maximize(unsigned int button) {
case Slit::TopRight:
slitModT = mSlt->getHeight() + screen->getBevelWidth();
switch (screen->getToolbarPlacement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
case Toolbar::TOPLEFT:
case Toolbar::TOPCENTER:
case Toolbar::TOPRIGHT:
slitModT -= screen->getToolbar()->getExposedHeight() + screen->getBorderWidth();
break;
}
@ -1857,9 +1857,9 @@ void FluxboxWindow::maximize(unsigned int button) {
default:
slitModB = mSlt->getHeight() + screen->getBevelWidth();
switch (screen->getToolbarPlacement()) {
case Toolbar::BottomLeft:
case Toolbar::BottomCenter:
case Toolbar::BottomRight:
case Toolbar::BOTTOMLEFT:
case Toolbar::BOTTOMCENTER:
case Toolbar::BOTTOMRIGHT:
slitModB -= screen->getToolbar()->getExposedHeight() + screen->getBorderWidth();
break;
}
@ -1916,9 +1916,9 @@ void FluxboxWindow::maximize(unsigned int button) {
- dh) / 2) - screen->getBorderWidth2x();
switch (screen->getToolbarPlacement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
case Toolbar::TOPLEFT:
case Toolbar::TOPCENTER:
case Toolbar::TOPRIGHT:
dy += screen->getToolbar()->getExposedHeight() +
screen->getBorderWidth2x();
break;
@ -3009,9 +3009,9 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
int dtty, dbby, dty, dby;
switch (screen->getToolbarPlacement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
case Toolbar::TOPLEFT:
case Toolbar::TOPCENTER:
case Toolbar::TOPRIGHT:
dtty = screen->getToolbar()->getExposedHeight() +
screen->getBorderWidth();
dbby = screen->getHeight();

View file

@ -1584,12 +1584,12 @@ void Fluxbox::save_rc(void) {
char *toolbar_placement = (char *) 0;
switch (screen->getToolbarPlacement()) {
case Toolbar::TopLeft: toolbar_placement = "TopLeft"; break;
case Toolbar::BottomLeft: toolbar_placement = "BottomLeft"; break;
case Toolbar::TopCenter: toolbar_placement = "TopCenter"; break;
case Toolbar::TopRight: toolbar_placement = "TopRight"; break;
case Toolbar::BottomRight: toolbar_placement = "BottomRight"; break;
case Toolbar::BottomCenter: default:
case Toolbar::TOPLEFT: toolbar_placement = "TopLeft"; break;
case Toolbar::BOTTOMLEFT: toolbar_placement = "BottomLeft"; break;
case Toolbar::TOPCENTER: toolbar_placement = "TopCenter"; break;
case Toolbar::TOPRIGHT: toolbar_placement = "TopRight"; break;
case Toolbar::BOTTOMRIGHT: toolbar_placement = "BottomRight"; break;
case Toolbar::BOTTOMCENTER: default:
toolbar_placement = "BottomCenter"; break;
}
@ -2038,19 +2038,19 @@ void Fluxbox::load_rc(BScreen *screen) {
if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
&value)) {
if (! strncasecmp(value.addr, "TopLeft", value.size))
screen->saveToolbarPlacement(Toolbar::TopLeft);
screen->saveToolbarPlacement(Toolbar::TOPLEFT);
else if (! strncasecmp(value.addr, "BottomLeft", value.size))
screen->saveToolbarPlacement(Toolbar::BottomLeft);
screen->saveToolbarPlacement(Toolbar::BOTTOMLEFT);
else if (! strncasecmp(value.addr, "TopCenter", value.size))
screen->saveToolbarPlacement(Toolbar::TopCenter);
screen->saveToolbarPlacement(Toolbar::TOPCENTER);
else if (! strncasecmp(value.addr, "TopRight", value.size))
screen->saveToolbarPlacement(Toolbar::TopRight);
screen->saveToolbarPlacement(Toolbar::TOPRIGHT);
else if (! strncasecmp(value.addr, "BottomRight", value.size))
screen->saveToolbarPlacement(Toolbar::BottomRight);
screen->saveToolbarPlacement(Toolbar::BOTTOMRIGHT);
else
screen->saveToolbarPlacement(Toolbar::BottomCenter);
screen->saveToolbarPlacement(Toolbar::BOTTOMCENTER);
} else
screen->saveToolbarPlacement(Toolbar::BottomCenter);
screen->saveToolbarPlacement(Toolbar::BOTTOMCENTER);
screen->removeWorkspaceNames();