From 06245dca91b460d6e6df80191477ac20f4f1dd21 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 11 Jan 2002 10:43:55 +0000 Subject: fixed enums --- src/Theme.cc | 26 ++++++++++++-------------- src/Window.hh | 4 ++-- src/Workspace.cc | 24 ++++++++++++------------ 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/Theme.cc b/src/Theme.cc index ed43120..5377ecb 100644 --- a/src/Theme.cc +++ b/src/Theme.cc @@ -41,7 +41,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Theme.cc,v 1.13 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Theme.cc,v 1.14 2002/01/11 10:43:55 fluxgen Exp $ #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -69,7 +69,6 @@ #include using namespace std; - Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename, const char *rootcommand): m_imagecontrol(ic), @@ -78,7 +77,6 @@ m_colormap(colormap), m_screennum(screennum), m_rootcommand(rootcommand==0 ? "" : rootcommand) //we dont want to send 0-pointer to std::string { - //default settings m_menustyle.titlefont.set = m_menustyle.framefont.set = m_toolbarstyle.font.set = m_windowstyle.font.set = m_windowstyle.tab.font.set = 0; @@ -362,27 +360,27 @@ void Theme::loadMenuStyle() { &value_type, &value)) { if (! strncasecmp(value.addr, "empty", value.size)) - m_menustyle.bullet = Basemenu::Empty; + m_menustyle.bullet = Basemenu::EMPTY; else if (! strncasecmp(value.addr, "square", value.size)) - m_menustyle.bullet = Basemenu::Square; + m_menustyle.bullet = Basemenu::SQUARE; else if (! strncasecmp(value.addr, "diamond", value.size)) - m_menustyle.bullet = Basemenu::Diamond; + m_menustyle.bullet = Basemenu::DIAMOND; else - m_menustyle.bullet = Basemenu::Triangle; + m_menustyle.bullet = Basemenu::TRIANGLE; } else - m_menustyle.bullet = Basemenu::Triangle; + m_menustyle.bullet = Basemenu::TRIANGLE; if (XrmGetResource(m_database, "menu.bullet.position", "Menu.Bullet.Position", &value_type, &value)) { if (! strncasecmp(value.addr, "right", value.size)) - m_menustyle.bullet_pos = Basemenu::Right; + m_menustyle.bullet_pos = Basemenu::RIGHT; else - m_menustyle.bullet_pos = Basemenu::Left; + m_menustyle.bullet_pos = Basemenu::LEFT; } else - m_menustyle.bullet_pos = Basemenu::Left; + m_menustyle.bullet_pos = Basemenu::LEFT; //---------- font @@ -669,6 +667,7 @@ void Theme::loadRootCommand() { cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<(displaystring.c_str())); + #else // __EMX__ spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL); #endif // !__EMX__ @@ -687,12 +686,12 @@ void Theme::loadRootCommand() { displaystring.append(DisplayString(m_display)); displaystring.append(tmpstring); // append m_screennum cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<(displaystring.c_str())); #else // __EMX__ spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", value.addr, NULL); #endif // !__EMX__ - + #ifdef DEBUG fprintf(stderr, "rootcommand:%s\n", value.addr); #endif @@ -965,7 +964,6 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) { void Theme::reconfigure() { - //Window rootwindow = DefaultRootWindow(m_display); XGCValues gcv; unsigned long gc_value_mask = GCForeground; if (! I18n::instance()->multibyte()) diff --git a/src/Window.hh b/src/Window.hh index c07786b..2c705d8 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.3 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Window.hh,v 1.4 2002/01/11 10:40:59 fluxgen Exp $ #ifndef _WINDOW_HH_ #define _WINDOW_HH_ @@ -257,7 +257,7 @@ private: bevel_w, resize_w, resize_h, snap_w, snap_h; } frame; - enum { F_NoInput = 0, F_Passive, F_LocallyActive, F_GloballyActive }; + enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE }; void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc); Window findTitleButton(int type); diff --git a/src/Workspace.cc b/src/Workspace.cc index ec61e39..676c907 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -355,27 +355,27 @@ void Workspace::placeWindow(FluxboxWindow *win) { (screen->getBorderWidth2x() * 2), place_x = 0, place_y = 0, change_x = 1, change_y = 1; - if (screen->getColPlacementDirection() == BScreen::BottomTop) + if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP) change_y = -1; - if (screen->getRowPlacementDirection() == BScreen::RightLeft) + if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) change_x = -1; register int test_x, test_y, curr_w, curr_h; switch (screen->getPlacementPolicy()) { - case BScreen::RowSmartPlacement: { + case BScreen::ROWSMARTPLACEMENT: { test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); - if (screen->getColPlacementDirection() == BScreen::BottomTop) + if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP) test_y = screen->getHeight() - win_h - test_y; - while (((screen->getColPlacementDirection() == BScreen::BottomTop) ? + while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ? test_y > 0 : test_y + win_h < (signed) screen->getHeight()) && ! placed) { test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); - if (screen->getRowPlacementDirection() == BScreen::RightLeft) + if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) test_x = screen->getWidth() - win_w - test_x; - while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ? + while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ? test_x > 0 : test_x + win_w < (signed) screen->getWidth()) && ! placed) { placed = True; @@ -425,19 +425,19 @@ void Workspace::placeWindow(FluxboxWindow *win) { break; } - case BScreen::ColSmartPlacement: { + case BScreen::COLSMARTPLACEMENT: { test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); - if (screen->getRowPlacementDirection() == BScreen::RightLeft) + if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) test_x = screen->getWidth() - win_w - test_x; - while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ? + while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ? test_x > 0 : test_x + win_w < (signed) screen->getWidth()) && ! placed) { test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); - if (screen->getColPlacementDirection() == BScreen::BottomTop) + if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP) test_y = screen->getHeight() - win_h - test_y; - while (((screen->getColPlacementDirection() == BScreen::BottomTop) ? + while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ? test_y > 0 : test_y + win_h < (signed) screen->getHeight()) && ! placed) { placed = True; -- cgit v0.11.2