From 17f438db1ee854bbc85e8d1e7f91ee28b501b7ab Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 11 Jan 2002 10:21:44 +0000 Subject: fixed enums --- src/Screen.cc | 27 ++++++++++++++------------- src/Screen.hh | 16 ++++++++-------- src/Slit.cc | 60 +++++++++++++++++++++++++++++------------------------------ src/Slit.hh | 6 +++--- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 74b0c22..88fa659 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -195,7 +195,7 @@ rootcommand("") image_control->setDither(resource.image_dither); theme = new Theme(getBaseDisplay()->getXDisplay(), getRootWindow(), getColormap(), getScreenNumber(), image_control, fluxbox->getStyleFilename(), getRootCommand().c_str()); - + #ifdef GNOME /* create the GNOME window */ Window gnome_win = XCreateSimpleWindow(getBaseDisplay()->getXDisplay(), @@ -205,12 +205,13 @@ rootcommand("") XChangeProperty(getBaseDisplay()->getXDisplay(), getRootWindow(), getBaseDisplay()->getGnomeSupportingWMCheckAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); - + XChangeProperty(getBaseDisplay()->getXDisplay(), gnome_win, getBaseDisplay()->getGnomeSupportingWMCheckAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1); - + Atom gnomeatomlist[1] = {getBaseDisplay()->getGnomeWorkspaceAtom()}; + XChangeProperty(getBaseDisplay()->getXDisplay(), getRootWindow(), getBaseDisplay()->getGnomeProtAtom(), XA_ATOM, 32, PropModeReplace, @@ -1055,7 +1056,7 @@ void BScreen::InitMenu(void) { 0, 0, #endif // NLS "xterm"), - BScreen::Execute, + BScreen::EXECUTE, i18n->getMessage( #ifdef NLS ScreenSet, Screenxterm, @@ -1070,7 +1071,7 @@ void BScreen::InitMenu(void) { 0, 0, #endif // NLS "Restart"), - BScreen::Restart); + BScreen::RESTART); rootmenu->insert(i18n->getMessage( #ifdef NLS ScreenSet, ScreenExit, @@ -1078,7 +1079,7 @@ void BScreen::InitMenu(void) { 0, 0, #endif // NLS "Exit"), - BScreen::Exit); + BScreen::EXIT); } else fluxbox->saveMenuFilename(fluxbox->getMenuFilename()); } @@ -1181,7 +1182,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { continue; } - menu->insert(label, BScreen::Execute, command); + menu->insert(label, BScreen::EXECUTE, command); break; case 442: // exit @@ -1198,7 +1199,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { continue; } - menu->insert(label, BScreen::Exit); + menu->insert(label, BScreen::EXIT); break; case 561: // style @@ -1238,7 +1239,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { *(style + command_length) = '\0'; } - menu->insert(label, BScreen::SetStyle, style); + menu->insert(label, BScreen::SETSTYLE, style); } break; @@ -1380,9 +1381,9 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { } if (*command) - menu->insert(label, BScreen::RestartOther, command); + menu->insert(label, BScreen::RESTARTOTHER, command); else - menu->insert(label, BScreen::Restart); + menu->insert(label, BScreen::RESTART); } break; @@ -1403,7 +1404,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { continue; } - menu->insert(label, BScreen::Reconfigure); + menu->insert(label, BScreen::RECONFIGURE); } break; @@ -1488,7 +1489,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) { strncpy(style + slen + 1, ls[n], nlen + 1); if ((! stat(style, &statbuf)) && S_ISREG(statbuf.st_mode)) - stylesmenu->insert(ls[n], BScreen::SetStyle, style); + stylesmenu->insert(ls[n], BScreen::SETSTYLE, style); delete [] ls[n]; } diff --git a/src/Screen.hh b/src/Screen.hh index 92f1849..93825ff 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.8 2002/01/10 12:49:15 fluxgen Exp $ +// $Id: Screen.hh,v 1.9 2002/01/11 10:20:00 fluxgen Exp $ #ifndef _SCREEN_HH_ #define _SCREEN_HH_ @@ -270,13 +270,13 @@ public: void updateNetizenWindowRaise(Window); void updateNetizenWindowLower(Window); - enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, LeftRight, - RightLeft, TopBottom, BottomTop }; - enum { LeftJustify = 1, RightJustify, CenterJustify }; - enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet }; - enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure, - WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise, - WindowLower, WindowStick, WindowKill, SetStyle, WindowTab}; + enum { ROWSMARTPLACEMENT = 1, COLSMARTPLACEMENT, CASCADEPLACEMENT, LEFTRIGHT, + RIGHTLEFT, TOPBOTTOM, BOTTOMTOP }; + enum { LEFTJUSTIFY = 1, RIGHTJUSTIFY, CENTERJUSTIFY }; + enum { ROUNDBULLET = 1, TRIANGELBULLET, SQUAERBULLET, NOBULLET }; + enum { RESTART = 1, RESTARTOTHER, EXIT, SHUTDOWN, EXECUTE, RECONFIGURE, + WINDOWSHADE, WINDOWICONIFY, WINDOWMAXIMIZE, WINDOWCLOSE, WINDOWRAISE, + WINDOWLOWER, WINDOWSTICK, WINDOWKILL, SETSTYLE, WINDOWTAB}; private: Theme *theme; diff --git a/src/Slit.cc b/src/Slit.cc index a46ccba..c263ba9 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -255,7 +255,7 @@ void Slit::reconfigure(void) { LinkedListIterator it(clientList); switch (screen->getSlitDirection()) { - case Vertical: + case VERTICAL: for (; it.current(); it++) { frame.height += it.current()->height + screen->getBevelWidth(); @@ -275,7 +275,7 @@ void Slit::reconfigure(void) { break; - case Horizontal: + case HORIZONTAL: for (; it.current(); it++) { frame.width += it.current()->width + screen->getBevelWidth(); @@ -326,7 +326,7 @@ void Slit::reconfigure(void) { it.reset(); switch (screen->getSlitDirection()) { - case Vertical: + case VERTICAL: x = 0; y = screen->getBevelWidth(); @@ -363,7 +363,7 @@ void Slit::reconfigure(void) { break; - case Horizontal: + case HORIZONTAL: x = screen->getBevelWidth(); y = 0; @@ -408,10 +408,10 @@ void Slit::reconfigure(void) { void Slit::reposition(void) { // place the slit in the appropriate place switch (screen->getSlitPlacement()) { - case TopLeft: + case TOPLEFT: frame.x = 0; frame.y = 0; - if (screen->getSlitDirection() == Vertical) { + if (screen->getSlitDirection() == VERTICAL) { frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth() - frame.width; frame.y_hidden = 0; @@ -422,7 +422,7 @@ void Slit::reposition(void) { } break; - case CenterLeft: + case CENTERLEFT: frame.x = 0; frame.y = (screen->getHeight() - frame.height) / 2; frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth() @@ -430,10 +430,10 @@ void Slit::reposition(void) { frame.y_hidden = frame.y; break; - case BottomLeft: + case BOTTOMLEFT: frame.x = 0; frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x(); - if (screen->getSlitDirection() == Vertical) { + if (screen->getSlitDirection() == VERTICAL) { frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth() - frame.width; frame.y_hidden = frame.y; @@ -444,7 +444,7 @@ void Slit::reposition(void) { } break; - case TopCenter: + case TOPCENTER: frame.x = (screen->getWidth() - frame.width) / 2; frame.y = 0; frame.x_hidden = frame.x; @@ -452,7 +452,7 @@ void Slit::reposition(void) { - frame.height; break; - case BottomCenter: + case BOTTOMCENTER: frame.x = (screen->getWidth() - frame.width) / 2; frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x(); frame.x_hidden = frame.x; @@ -460,10 +460,10 @@ void Slit::reposition(void) { - screen->getBorderWidth(); break; - case TopRight: + case TOPRIGHT: frame.x = screen->getWidth() - frame.width - screen->getBorderWidth2x(); frame.y = 0; - if (screen->getSlitDirection() == Vertical) { + if (screen->getSlitDirection() == VERTICAL) { frame.x_hidden = screen->getWidth() - screen->getBevelWidth() - screen->getBorderWidth(); frame.y_hidden = 0; @@ -474,7 +474,7 @@ void Slit::reposition(void) { } break; - case CenterRight: + case CENTERRIGHT: default: frame.x = screen->getWidth() - frame.width - screen->getBorderWidth2x(); frame.y = (screen->getHeight() - frame.height) / 2; @@ -483,10 +483,10 @@ void Slit::reposition(void) { frame.y_hidden = frame.y; break; - case BottomRight: + case BOTTOMRIGHT: frame.x = screen->getWidth() - frame.width - screen->getBorderWidth2x(); frame.y = screen->getHeight() - frame.height - screen->getBorderWidth2x(); - if (screen->getSlitDirection() == Vertical) { + if (screen->getSlitDirection() == VERTICAL) { frame.x_hidden = screen->getWidth() - screen->getBevelWidth() - screen->getBorderWidth(); frame.y_hidden = frame.y; @@ -508,13 +508,13 @@ void Slit::reposition(void) { tbar->getY() < frame.y + sh && tbar->getY() + th > frame.y) { if (frame.y < th) { frame.y += tbar->getExposedHeight(); - if (screen->getSlitDirection() == Vertical) + if (screen->getSlitDirection() == VERTICAL) frame.y_hidden += tbar->getExposedHeight(); else frame.y_hidden = frame.y; } else { frame.y -= tbar->getExposedHeight(); - if (screen->getSlitDirection() == Vertical) + if (screen->getSlitDirection() == VERTICAL) frame.y_hidden -= tbar->getExposedHeight(); else frame.y_hidden = frame.y; @@ -764,7 +764,7 @@ Slitmenu::Directionmenu::Directionmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Horizontal"), - Slit::Horizontal); + Slit::HORIZONTAL); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonDirectionVert, @@ -772,11 +772,11 @@ Slitmenu::Directionmenu::Directionmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Vertical"), - Slit::Vertical); + Slit::VERTICAL); update(); - if (sm->slit->screen->getSlitDirection() == Slit::Horizontal) + if (sm->slit->screen->getSlitDirection() == Slit::HORIZONTAL) setItemSelected(0, True); else setItemSelected(1, True); @@ -790,7 +790,7 @@ void Slitmenu::Directionmenu::itemSelected(int button, int index) { slitmenu->slit->screen->saveSlitDirection(item->function()); - if (item->function() == Slit::Horizontal) { + if (item->function() == Slit::HORIZONTAL) { setItemSelected(0, True); setItemSelected(1, False); } else { @@ -825,7 +825,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Top Left"), - Slit::TopLeft); + Slit::TOPLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementCenterLeft, @@ -833,7 +833,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Center Left"), - Slit::CenterLeft); + Slit::CENTERLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementBottomLeft, @@ -841,7 +841,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Bottom Left"), - Slit::BottomLeft); + Slit::BOTTOMLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementTopCenter, @@ -849,7 +849,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Top Center"), - Slit::TopCenter); + Slit::TOPCENTER); insert(""); insert(i18n->getMessage( #ifdef NLS @@ -858,7 +858,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Bottom Center"), - Slit::BottomCenter); + Slit::BOTTOMCENTER); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementTopRight, @@ -866,7 +866,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Top Right"), - Slit::TopRight); + Slit::TOPRIGHT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementCenterRight, @@ -874,7 +874,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Center Right"), - Slit::CenterRight); + Slit::CENTERRIGHT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementBottomRight, @@ -882,7 +882,7 @@ Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm) : Basemenu(sm->slit->screen 0, 0, #endif // NLS "Bottom Right"), - Slit::BottomRight); + Slit::BOTTOMRIGHT); update(); } diff --git a/src/Slit.hh b/src/Slit.hh index cce1d97..f79dbd5 100644 --- a/src/Slit.hh +++ b/src/Slit.hh @@ -150,9 +150,9 @@ public: virtual void timeout(void); - enum { Vertical = 1, Horizontal }; - enum { TopLeft = 1, CenterLeft, BottomLeft, TopCenter, BottomCenter, - TopRight, CenterRight, BottomRight }; + enum { VERTICAL = 1, HORIZONTAL }; + enum { TOPLEFT = 1, CENTERLEFT, BOTTOMLEFT, TOPCENTER, BOTTOMCENTER, + TOPRIGHT, CENTERRIGHT, BOTTOMRIGHT }; }; -- cgit v0.11.2