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: Changes for 0.1.6:
*02/01/06:
* Changed toolbar placement enums to uppercase letters (Claes Nästén)
*02/01/05: *02/01/05:
* Changed placement/alignment enums to uppercase letters (Claes Nästén) * Changed placement/alignment enums to uppercase letters (Claes Nästén)
* Fixed tab/iconbar resource bug (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; int dtty, dbby, dty, dby;
switch (m_win->getScreen()->getToolbarPlacement()) { switch (m_win->getScreen()->getToolbarPlacement()) {
case Toolbar::TopLeft: case Toolbar::TOPLEFT:
case Toolbar::TopCenter: case Toolbar::TOPCENTER:
case Toolbar::TopRight: case Toolbar::TOPRIGHT:
dtty = m_win->getScreen()->getToolbar()->getExposedHeight() + dtty = m_win->getScreen()->getToolbar()->getExposedHeight() +
m_win->getScreen()->getBorderWidth(); m_win->getScreen()->getBorderWidth();
dbby = m_win->getScreen()->getHeight(); dbby = m_win->getScreen()->getHeight();

View file

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

View file

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

View file

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

View file

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