From edb664f92912d5fed2c6f12489741de5ad6aa4e2 Mon Sep 17 00:00:00 2001 From: pekdon Date: Sun, 6 Jan 2002 09:37:50 +0000 Subject: =?UTF-8?q?Changed=20toolbar=20placement=20enums=20to=20uppercase?= =?UTF-8?q?=20letters.=20(Claes=20N=EF=BF=BDst=EF=BF=BDn)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 2 ++ src/Tab.cc | 6 +++--- src/Toolbar.cc | 24 ++++++++++++------------ src/Toolbar.hh | 4 ++-- src/Window.cc | 24 ++++++++++++------------ src/fluxbox.cc | 26 +++++++++++++------------- 6 files changed, 44 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index edaf2ca..c754e10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) diff --git a/src/Tab.cc b/src/Tab.cc index 410d499..f7ab418 100644 --- a/src/Tab.cc +++ b/src/Tab.cc @@ -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(); diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 6a6dcc8..6ad8327 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -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(); } diff --git a/src/Toolbar.hh b/src/Toolbar.hh index a0aa440..bd59a8c 100644 --- a/src/Toolbar.hh +++ b/src/Toolbar.hh @@ -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 }; }; diff --git a/src/Window.cc b/src/Window.cc index 834c555..7275ba3 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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(); diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 4394fbc..f9c3b6d 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -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(); -- cgit v0.11.2