all repos — fluxbox @ 17f438db1ee854bbc85e8d1e7f91ee28b501b7ab

custom fork of the fluxbox windowmanager

fixed enums
fluxgen fluxgen
commit

17f438db1ee854bbc85e8d1e7f91ee28b501b7ab

parent

1e6a318f25d3ef69ca9d5ad54603ce735261b227

4 files changed, 55 insertions(+), 54 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -195,7 +195,7 @@

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 @@ /* supported WM check */

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 @@ #else // !NLS

0, 0, #endif // NLS "xterm"), - BScreen::Execute, + BScreen::EXECUTE, i18n->getMessage( #ifdef NLS ScreenSet, Screenxterm,

@@ -1070,7 +1071,7 @@ #else // !NLS

0, 0, #endif // NLS "Restart"), - BScreen::Restart); + BScreen::RESTART); rootmenu->insert(i18n->getMessage( #ifdef NLS ScreenSet, ScreenExit,

@@ -1078,7 +1079,7 @@ #else // !NLS

0, 0, #endif // NLS "Exit"), - BScreen::Exit); + BScreen::EXIT); } else fluxbox->saveMenuFilename(fluxbox->getMenuFilename()); }

@@ -1181,7 +1182,7 @@ "no menu label and/or command defined\n"));

continue; } - menu->insert(label, BScreen::Execute, command); + menu->insert(label, BScreen::EXECUTE, command); break; case 442: // exit

@@ -1198,7 +1199,7 @@ "no menu label defined\n"));

continue; } - menu->insert(label, BScreen::Exit); + menu->insert(label, BScreen::EXIT); break; case 561: // style

@@ -1238,7 +1239,7 @@ strncpy(style, command, command_length);

*(style + command_length) = '\0'; } - menu->insert(label, BScreen::SetStyle, style); + menu->insert(label, BScreen::SETSTYLE, style); } break;

@@ -1380,9 +1381,9 @@ continue;

} 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 @@ "no menu label defined\n"));

continue; } - menu->insert(label, BScreen::Reconfigure); + menu->insert(label, BScreen::RECONFIGURE); } break;

@@ -1488,7 +1489,7 @@ *(style + slen) = '/';

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]; }
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // 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. -// $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 @@ void updateNetizenConfigNotify(XEvent *);

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;
M src/Slit.ccsrc/Slit.cc

@@ -255,7 +255,7 @@ frame.height = 0;

LinkedListIterator<SlitClient> it(clientList); switch (screen->getSlitDirection()) { - case Vertical: + case VERTICAL: for (; it.current(); it++) { frame.height += it.current()->height + screen->getBevelWidth();

@@ -275,7 +275,7 @@ frame.height += screen->getBevelWidth();

break; - case Horizontal: + case HORIZONTAL: for (; it.current(); it++) { frame.width += it.current()->width + screen->getBevelWidth();

@@ -326,7 +326,7 @@ int x, y;

it.reset(); switch (screen->getSlitDirection()) { - case Vertical: + case VERTICAL: x = 0; y = screen->getBevelWidth();

@@ -363,7 +363,7 @@ }

break; - case Horizontal: + case HORIZONTAL: x = screen->getBevelWidth(); y = 0;

@@ -408,10 +408,10 @@

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 @@ - frame.height;

} 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 @@ - frame.width;

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 @@ - screen->getBorderWidth();

} break; - case TopCenter: + case TOPCENTER: frame.x = (screen->getWidth() - frame.width) / 2; frame.y = 0; frame.x_hidden = frame.x;

@@ -452,7 +452,7 @@ frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()

- 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 @@ frame.y_hidden = screen->getHeight() - screen->getBevelWidth()

- 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 @@ - frame.height;

} 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 @@ - screen->getBorderWidth();

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 @@ if (tbar->getX() < frame.x + sw && tbar->getX() + tw > frame.x &&

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 @@ #else // !NLS

0, 0, #endif // NLS "Horizontal"), - Slit::Horizontal); + Slit::HORIZONTAL); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonDirectionVert,

@@ -772,11 +772,11 @@ #else // !NLS

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 @@ if (! item) return;

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 @@ #else // !NLS

0, 0, #endif // NLS "Top Left"), - Slit::TopLeft); + Slit::TOPLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementCenterLeft,

@@ -833,7 +833,7 @@ #else // !NLS

0, 0, #endif // NLS "Center Left"), - Slit::CenterLeft); + Slit::CENTERLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementBottomLeft,

@@ -841,7 +841,7 @@ #else // !NLS

0, 0, #endif // NLS "Bottom Left"), - Slit::BottomLeft); + Slit::BOTTOMLEFT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementTopCenter,

@@ -849,7 +849,7 @@ #else // !NLS

0, 0, #endif // NLS "Top Center"), - Slit::TopCenter); + Slit::TOPCENTER); insert(""); insert(i18n->getMessage( #ifdef NLS

@@ -858,7 +858,7 @@ #else // !NLS

0, 0, #endif // NLS "Bottom Center"), - Slit::BottomCenter); + Slit::BOTTOMCENTER); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementTopRight,

@@ -866,7 +866,7 @@ #else // !NLS

0, 0, #endif // NLS "Top Right"), - Slit::TopRight); + Slit::TOPRIGHT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementCenterRight,

@@ -874,7 +874,7 @@ #else // !NLS

0, 0, #endif // NLS "Center Right"), - Slit::CenterRight); + Slit::CENTERRIGHT); insert(i18n->getMessage( #ifdef NLS CommonSet, CommonPlacementBottomRight,

@@ -882,7 +882,7 @@ #else // !NLS

0, 0, #endif // NLS "Bottom Right"), - Slit::BottomRight); + Slit::BOTTOMRIGHT); update(); }
M src/Slit.hhsrc/Slit.hh

@@ -150,9 +150,9 @@ void configureRequestEvent(XConfigureRequestEvent *);

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 }; };