From e2ddbd4ff1651d5f77e03dc7668b43211deecfcc Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 11 Jan 2002 09:26:33 +0000 Subject: fixed enums --- src/Basemenu.cc | 18 +++---- src/Basemenu.hh | 9 ++-- src/Configmenu.cc | 48 ++++++++--------- src/fluxbox.cc | 154 ++++++++++++++++++++++++++++++++++-------------------- src/fluxbox.hh | 6 +-- 5 files changed, 137 insertions(+), 98 deletions(-) diff --git a/src/Basemenu.cc b/src/Basemenu.cc index 32b1585..659d4d7 100644 --- a/src/Basemenu.cc +++ b/src/Basemenu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Basemenu.cc,v 1.5 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Basemenu.cc,v 1.6 2002/01/11 09:26:33 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library @@ -58,7 +58,7 @@ Basemenu::Basemenu(BScreen *scrn) { image_ctrl = screen->getImageControl(); display = fluxbox->getXDisplay(); parent = (Basemenu *) 0; - alignment = AlignDontCare; + alignment = ALIGNDONTCARE; title_vis = movable = @@ -556,7 +556,7 @@ void Basemenu::drawSubmenu(int index) { x = menu.x + ((menu.item_w * (sbl + 1)) + screen->getBorderWidth()), y; - if (alignment == AlignTop) { + if (alignment == ALIGNTOP) { y = (((shifted) ? menu.y_shift : menu.y) + ((title_vis) ? menu.title_h + screen->getBorderWidth() : 0) - ((item->submenu()->title_vis) ? @@ -569,7 +569,7 @@ void Basemenu::drawSubmenu(int index) { item->submenu()->menu.title_h + screen->getBorderWidth() : 0)); } - if (alignment == AlignBottom && + if (alignment == ALIGNBOTTOM && (y + item->submenu()->menu.height) > ((shifted) ? menu.y_shift : menu.y) + menu.height) { y = (((shifted) ? menu.y_shift : menu.y) + @@ -675,7 +675,7 @@ void Basemenu::drawItem(int index, Bool highlight, Bool clear, sel_x = item_x; - if (screen->getMenuStyle()->bullet_pos == Right) + if (screen->getMenuStyle()->bullet_pos == RIGHT) sel_x += (menu.item_w - menu.item_h - menu.bevel_w); sel_x += quarter_w; @@ -744,14 +744,14 @@ void Basemenu::drawItem(int index, Bool highlight, Bool clear, if (dosel && item->submenu()) { switch (screen->getMenuStyle()->bullet) { - case Square: + case SQUARE: XDrawRectangle(display, menu.frame, gc, sel_x, sel_y, half_w, half_w); break; - case Triangle: + case TRIANGLE: XPoint tri[3]; - if (screen->getMenuStyle()->bullet_pos == Right) { + if (screen->getMenuStyle()->bullet_pos == RIGHT) { tri[0].x = sel_x + quarter_w - 2; tri[0].y = sel_y + quarter_w - 2; tri[1].x = 4; @@ -771,7 +771,7 @@ void Basemenu::drawItem(int index, Bool highlight, Bool clear, CoordModePrevious); break; - case Diamond: + case DIAMOND: XPoint dia[4]; dia[0].x = sel_x + quarter_w - 3; diff --git a/src/Basemenu.hh b/src/Basemenu.hh index c1bef65..24c8078 100644 --- a/src/Basemenu.hh +++ b/src/Basemenu.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Basemenu.hh,v 1.3 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Basemenu.hh,v 1.4 2002/01/11 09:24:46 fluxgen Exp $ #ifndef _BASEMENU_HH_ #define _BASEMENU_HH_ @@ -133,9 +133,10 @@ public: virtual void show(void); virtual void hide(void); - enum { AlignDontCare = 1, AlignTop, AlignBottom }; - enum { Right = 1, Left }; - enum { Empty = 0, Square, Triangle, Diamond }; + enum { ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; + enum { RIGHT = 1, LEFT }; + enum { EMPTY = 0, SQUARE, TRIANGLE, DIAMOND }; + }; diff --git a/src/Configmenu.cc b/src/Configmenu.cc index 1fdf2bf..b54dd1e 100644 --- a/src/Configmenu.cc +++ b/src/Configmenu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Configmenu.cc,v 1.8 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Configmenu.cc,v 1.9 2002/01/11 09:20:42 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library @@ -382,70 +382,70 @@ Configmenu::Placementmenu::Placementmenu(Configmenu *cm) : Basemenu(cm->screen) #else // !NLS 0, 0, #endif // NLS - "Smart Placement (Rows)"), BScreen::RowSmartPlacement); + "Smart Placement (Rows)"), BScreen::ROWSMARTPLACEMENT); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuSmartCols, #else // !NLS 0, 0, #endif // NLS - "Smart Placement (Columns)"), BScreen::ColSmartPlacement); + "Smart Placement (Columns)"), BScreen::COLSMARTPLACEMENT); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuCascade, #else // !NLS 0, 0, #endif // NLS - "Cascade Placement"), BScreen::CascadePlacement); + "Cascade Placement"), BScreen::CASCADEPLACEMENT); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuLeftRight, #else // !NLS 0, 0, #endif // NLS - "Left to Right"), BScreen::LeftRight); + "Left to Right"), BScreen::LEFTRIGHT); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuRightLeft, #else // !NLS 0, 0, #endif // NLS - "Right to Left"), BScreen::RightLeft); + "Right to Left"), BScreen::RIGHTLEFT); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuTopBottom, #else // !NLS 0, 0, #endif // NLS - "Top to Bottom"), BScreen::TopBottom); + "Top to Bottom"), BScreen::TOPBOTTOM); insert(i18n->getMessage( #ifdef NLS ConfigmenuSet, ConfigmenuBottomTop, #else // !NLS 0, 0, #endif // NLS - "Bottom to Top"), BScreen::BottomTop); + "Bottom to Top"), BScreen::BOTTOMTOP); update(); switch (configmenu->screen->getPlacementPolicy()) { - case BScreen::RowSmartPlacement: + case BScreen::ROWSMARTPLACEMENT: setItemSelected(0, True); break; - case BScreen::ColSmartPlacement: + case BScreen::COLSMARTPLACEMENT: setItemSelected(1, True); break; - case BScreen::CascadePlacement: + case BScreen::CASCADEPLACEMENT: setItemSelected(2, True); break; } Bool rl = (configmenu->screen->getRowPlacementDirection() == - BScreen::LeftRight), + BScreen::LEFTRIGHT), tb = (configmenu->screen->getColPlacementDirection() == - BScreen::TopBottom); + BScreen::TOPBOTTOM); setItemSelected(3, rl); setItemSelected(4, ! rl); @@ -461,7 +461,7 @@ void Configmenu::Placementmenu::itemSelected(int button, int index) { if (item->function()) { switch (item->function()) { - case BScreen::RowSmartPlacement: + case BScreen::ROWSMARTPLACEMENT: configmenu->screen->savePlacementPolicy(item->function()); setItemSelected(0, True); @@ -470,7 +470,7 @@ void Configmenu::Placementmenu::itemSelected(int button, int index) { break; - case BScreen::ColSmartPlacement: + case BScreen::COLSMARTPLACEMENT: configmenu->screen->savePlacementPolicy(item->function()); setItemSelected(0, False); @@ -479,7 +479,7 @@ void Configmenu::Placementmenu::itemSelected(int button, int index) { break; - case BScreen::CascadePlacement: + case BScreen::CASCADEPLACEMENT: configmenu->screen->savePlacementPolicy(item->function()); setItemSelected(0, False); @@ -488,32 +488,32 @@ void Configmenu::Placementmenu::itemSelected(int button, int index) { break; - case BScreen::LeftRight: - configmenu->screen->saveRowPlacementDirection(BScreen::LeftRight); + case BScreen::LEFTRIGHT: + configmenu->screen->saveRowPlacementDirection(BScreen::LEFTRIGHT); setItemSelected(3, True); setItemSelected(4, False); break; - case BScreen::RightLeft: - configmenu->screen->saveRowPlacementDirection(BScreen::RightLeft); + case BScreen::RIGHTLEFT: + configmenu->screen->saveRowPlacementDirection(BScreen::RIGHTLEFT); setItemSelected(3, False); setItemSelected(4, True); break; - case BScreen::TopBottom: - configmenu->screen->saveColPlacementDirection(BScreen::TopBottom); + case BScreen::TOPBOTTOM: + configmenu->screen->saveColPlacementDirection(BScreen::TOPBOTTOM); setItemSelected(5, True); setItemSelected(6, False); break; - case BScreen::BottomTop: - configmenu->screen->saveColPlacementDirection(BScreen::BottomTop); + case BScreen::BOTTOMTOP: + configmenu->screen->saveColPlacementDirection(BScreen::BOTTOMTOP); setItemSelected(5, False); setItemSelected(6, True); diff --git a/src/fluxbox.cc b/src/fluxbox.cc index a48f0ef..fd3f2f0 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.18 2002/01/10 12:51:21 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.19 2002/01/11 09:17:37 fluxgen Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library @@ -192,7 +192,7 @@ Fluxbox::Fluxbox(int m_argc, char **m_argv, char *dpy_name, char *rc) no_focus = False; resource.titlebar_file = resource.menu_file = resource.style_file = resource.keys_file = 0; - + resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0; focused_window = masked_window = (FluxboxWindow *) 0; @@ -988,6 +988,7 @@ void Fluxbox::process_event(XEvent *e) { BScreen *screen = searchScreen(e->xclient.window); if (screen) screen->changeWorkspaceID(e->xclient.data.l[0]); + } #endif //!GNOME } @@ -1017,7 +1018,10 @@ void Fluxbox::process_event(XEvent *e) { void Fluxbox::doWindowAction(Keys::KeyAction action) { if (!focused_window) return; - + + unsigned int t_placement = focused_window->getScreen()->getTabPlacement(); + unsigned int t_alignment = focused_window->getScreen()->getTabAlignment(); + switch (action) { case Keys::ICONIFY: focused_window->iconify(); @@ -1093,24 +1097,56 @@ void Fluxbox::doWindowAction(Keys::KeyAction action) { focused_window->configure( focused_window->getXFrame(), focused_window->getYFrame(), focused_window->getWidth()+10, focused_window->getHeight()); + + if (focused_window->hasTab() && + (t_placement == Tab::PTOP || t_placement == Tab::PBOTTOM)) { + if (t_alignment == Tab::ARELATIVE) + focused_window->getTab()->calcIncrease(); + if (t_alignment != Tab::PLEFT) + focused_window->getTab()->setPosition(); + } break; case Keys::VERTINC: if (focused_window->isResizable()) focused_window->configure( focused_window->getXFrame(), focused_window->getYFrame(), focused_window->getWidth(), focused_window->getHeight()+10); + + if (focused_window->hasTab() && + (t_placement == Tab::PLEFT || t_placement == Tab::PRIGHT)) { + if (t_alignment == Tab::ARELATIVE) + focused_window->getTab()->calcIncrease(); + if (t_alignment != Tab::PRIGHT) + focused_window->getTab()->setPosition(); + } break; case Keys::HORIZDEC: if (focused_window->isResizable()) focused_window->configure( focused_window->getXFrame(), focused_window->getYFrame(), focused_window->getWidth()-10, focused_window->getHeight()); + + if (focused_window->hasTab() && + (t_placement == Tab::PTOP || t_placement == Tab::PBOTTOM)) { + if (t_alignment == Tab::ARELATIVE) + focused_window->getTab()->calcIncrease(); + if (t_alignment != Tab::PLEFT) + focused_window->getTab()->setPosition(); + } break; case Keys::VERTDEC: if (focused_window->isResizable()) focused_window->configure( focused_window->getXFrame(), focused_window->getYFrame(), focused_window->getWidth(), focused_window->getHeight()-10); + + if (focused_window->hasTab() && + (t_placement == Tab::PLEFT || t_placement == Tab::PRIGHT)) { + if (t_alignment == Tab::ARELATIVE) + focused_window->getTab()->calcIncrease(); + if (t_alignment != Tab::PRIGHT) + focused_window->getTab()->setPosition(); + } break; default: break; @@ -1417,7 +1453,7 @@ void Fluxbox::save_rc(void) { auto_ptr dbfile(getRcFilename()); -// load_rc(); +// load_rc(); // This overwrites configs made while running, for example // usage of iconbar and tabs @@ -1464,14 +1500,14 @@ void Fluxbox::save_rc(void) { char *slit_placement = (char *) 0; switch (screen->getSlitPlacement()) { - case Slit::TopLeft: slit_placement = "TopLeft"; break; - case Slit::CenterLeft: slit_placement = "CenterLeft"; break; - case Slit::BottomLeft: slit_placement = "BottomLeft"; break; - case Slit::TopCenter: slit_placement = "TopCenter"; break; - case Slit::BottomCenter: slit_placement = "BottomCenter"; break; - case Slit::TopRight: slit_placement = "TopRight"; break; - case Slit::BottomRight: slit_placement = "BottomRight"; break; - case Slit::CenterRight: default: slit_placement = "CenterRight"; break; + case Slit::TOPLEFT: slit_placement = "TopLeft"; break; + case Slit::CENTERLEFT: slit_placement = "CenterLeft"; break; + case Slit::BOTTOMLEFT: slit_placement = "BottomLeft"; break; + case Slit::TOPCENTER: slit_placement = "TopCenter"; break; + case Slit::BOTTOMCENTER: slit_placement = "BottomCenter"; break; + case Slit::TOPRIGHT: slit_placement = "TopRight"; break; + case Slit::BOTTOMRIGHT: slit_placement = "BottomRight"; break; + case Slit::CENTERRIGHT: default: slit_placement = "CenterRight"; break; } sprintf(rc_string, "session.screen%d.slit.placement: %s", screen_number, @@ -1479,7 +1515,7 @@ void Fluxbox::save_rc(void) { XrmPutLineResource(&new_blackboxrc, rc_string); sprintf(rc_string, "session.screen%d.slit.direction: %s", screen_number, - ((screen->getSlitDirection() == Slit::Horizontal) ? "Horizontal" : + ((screen->getSlitDirection() == Slit::HORIZONTAL) ? "Horizontal" : "Vertical")); XrmPutLineResource(&new_blackboxrc, rc_string); @@ -1506,6 +1542,7 @@ void Fluxbox::save_rc(void) { sprintf(rc_string, "session.screen%d.rootCommand: %s", screen_number, screen->getRootCommand().c_str()); + XrmPutLineResource(&new_blackboxrc, rc_string); sprintf(rc_string, "session.screen%d.focusNewWindows: %s", screen_number, @@ -1517,13 +1554,13 @@ void Fluxbox::save_rc(void) { XrmPutLineResource(&new_blackboxrc, rc_string); sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, - ((screen->getRowPlacementDirection() == BScreen::LeftRight) ? - "LeftToRight" : "RightToLeft")); + ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? + "LeftToRight" : "RightToLeft")); XrmPutLineResource(&new_blackboxrc, rc_string); sprintf(rc_string, "session.screen%d.colPlacementDirection: %s", screen_number, - ((screen->getColPlacementDirection() == BScreen::TopBottom) ? - "TopToBottom" : "BottomToTop")); + ((screen->getColPlacementDirection() == BScreen::TOPBOTTOM) ? + "TopToBottom" : "BottomToTop")); XrmPutLineResource(&new_blackboxrc, rc_string); char *placement = (char *) 0; @@ -1532,16 +1569,16 @@ void Fluxbox::save_rc(void) { ((screen->doMaxOverSlit()) ? "True" : "False")); XrmPutLineResource(&new_blackboxrc, rc_string); switch (screen->getPlacementPolicy()) { - case BScreen::CascadePlacement: + case BScreen::CASCADEPLACEMENT: placement = "CascadePlacement"; break; - case BScreen::ColSmartPlacement: + case BScreen::COLSMARTPLACEMENT: placement = "ColSmartPlacement"; break; default: - case BScreen::RowSmartPlacement: + case BScreen::ROWSMARTPLACEMENT: placement = "RowSmartPlacement"; break; } @@ -1679,7 +1716,7 @@ void Fluxbox::save_rc(void) { XrmPutFileDatabase(old_blackboxrc, dbfile.get()); XrmDestroyDatabase(old_blackboxrc); // XrmDestroyDatabase(new_blackboxrc); - + } //-------- getRcFilename ------------- @@ -1690,8 +1727,9 @@ char *Fluxbox::getRcFilename() { char *dbfile=0; if (!rc_file) { - string str(getenv("HOME")+string("/.")+RC_PATH+string("/")+RC_INIT_FILE); + string str(getenv("HOME")+string("/.")+RC_PATH+string("/")+RC_INIT_FILE); return StringUtil::strdup(str.c_str()); + } else dbfile = StringUtil::strdup(rc_file); @@ -1853,17 +1891,17 @@ void Fluxbox::setTitlebar(vector& dir, const char *arg) { vector argv = parseTitleArgs(arg); for (unsigned int i=0; igetScreenNumber(); - sprintf(name_lookup, "session.screen%d.fullMaximization", screen_number); sprintf(class_lookup, "Session.Screen%d.FullMaximization", screen_number); if (XrmGetResource(database, name_lookup, class_lookup, &value_type, @@ -1968,7 +2005,7 @@ void Fluxbox::load_rc(BScreen *screen) { if (XrmGetResource(database, name_lookup, class_lookup, &value_type, &value)) { if (! strncasecmp(value.addr, "righttoleft", value.size)) - screen->saveRowPlacementDirection(BScreen::RightLeft); + screen->saveRowPlacementDirection(BScreen::RIGHTLEFT); else sprintf(name_lookup, "session.screen%d.maxOverSlit", screen_number); @@ -1981,20 +2018,20 @@ void Fluxbox::load_rc(BScreen *screen) { screen->saveMaxOverSlit(False); } else screen->saveMaxOverSlit(False); - screen->saveRowPlacementDirection(BScreen::LeftRight); + screen->saveRowPlacementDirection(BScreen::LEFTRIGHT); } else - screen->saveRowPlacementDirection(BScreen::LeftRight); + screen->saveRowPlacementDirection(BScreen::LEFTRIGHT); sprintf(name_lookup, "session.screen%d.colPlacementDirection", screen_number); sprintf(class_lookup, "Session.Screen%d.ColPlacementDirection", screen_number); if (XrmGetResource(database, name_lookup, class_lookup, &value_type, &value)) { if (! strncasecmp(value.addr, "bottomtotop", value.size)) - screen->saveColPlacementDirection(BScreen::BottomTop); + screen->saveColPlacementDirection(BScreen::BOTTOMTOP); else - screen->saveColPlacementDirection(BScreen::TopBottom); + screen->saveColPlacementDirection(BScreen::TOPBOTTOM); } else - screen->saveColPlacementDirection(BScreen::TopBottom); + screen->saveColPlacementDirection(BScreen::TOPBOTTOM); sprintf(name_lookup, "session.screen%d.workspaces", screen_number); sprintf(class_lookup, "Session.Screen%d.Workspaces", screen_number); @@ -2128,13 +2165,13 @@ void Fluxbox::load_rc(BScreen *screen) { if (XrmGetResource(database, name_lookup, class_lookup, &value_type, &value)) if (! strncasecmp(value.addr, "RowSmartPlacement", value.size)) - screen->savePlacementPolicy(BScreen::RowSmartPlacement); + screen->savePlacementPolicy(BScreen::ROWSMARTPLACEMENT); else if (! strncasecmp(value.addr, "ColSmartPlacement", value.size)) - screen->savePlacementPolicy(BScreen::ColSmartPlacement); + screen->savePlacementPolicy(BScreen::COLSMARTPLACEMENT); else - screen->savePlacementPolicy(BScreen::CascadePlacement); + screen->savePlacementPolicy(BScreen::CASCADEPLACEMENT); else - screen->savePlacementPolicy(BScreen::RowSmartPlacement); + screen->savePlacementPolicy(BScreen::ROWSMARTPLACEMENT); #ifdef SLIT sprintf(name_lookup, "session.screen%d.slit.placement", screen_number); @@ -2142,34 +2179,34 @@ void Fluxbox::load_rc(BScreen *screen) { if (XrmGetResource(database, name_lookup, class_lookup, &value_type, &value)) if (! strncasecmp(value.addr, "TopLeft", value.size)) - screen->saveSlitPlacement(Slit::TopLeft); + screen->saveSlitPlacement(Slit::TOPLEFT); else if (! strncasecmp(value.addr, "CenterLeft", value.size)) - screen->saveSlitPlacement(Slit::CenterLeft); + screen->saveSlitPlacement(Slit::CENTERLEFT); else if (! strncasecmp(value.addr, "BottomLeft", value.size)) - screen->saveSlitPlacement(Slit::BottomLeft); + screen->saveSlitPlacement(Slit::BOTTOMLEFT); else if (! strncasecmp(value.addr, "TopCenter", value.size)) - screen->saveSlitPlacement(Slit::TopCenter); + screen->saveSlitPlacement(Slit::TOPCENTER); else if (! strncasecmp(value.addr, "BottomCenter", value.size)) - screen->saveSlitPlacement(Slit::BottomCenter); + screen->saveSlitPlacement(Slit::BOTTOMCENTER); else if (! strncasecmp(value.addr, "TopRight", value.size)) - screen->saveSlitPlacement(Slit::TopRight); + screen->saveSlitPlacement(Slit::TOPRIGHT); else if (! strncasecmp(value.addr, "BottomRight", value.size)) - screen->saveSlitPlacement(Slit::BottomRight); + screen->saveSlitPlacement(Slit::BOTTOMRIGHT); else - screen->saveSlitPlacement(Slit::CenterRight); + screen->saveSlitPlacement(Slit::CENTERRIGHT); else - screen->saveSlitPlacement(Slit::CenterRight); + screen->saveSlitPlacement(Slit::CENTERRIGHT); sprintf(name_lookup, "session.screen%d.slit.direction", screen_number); sprintf(class_lookup, "Session.Screen%d.Slit.Direction", screen_number); if (XrmGetResource(database, name_lookup, class_lookup, &value_type, &value)) if (! strncasecmp(value.addr, "Horizontal", value.size)) - screen->saveSlitDirection(Slit::Horizontal); + screen->saveSlitDirection(Slit::HORIZONTAL); else - screen->saveSlitDirection(Slit::Vertical); + screen->saveSlitDirection(Slit::VERTICAL); else - screen->saveSlitDirection(Slit::Vertical); + screen->saveSlitDirection(Slit::VERTICAL); sprintf(name_lookup, "session.screen%d.slit.onTop", screen_number); sprintf(class_lookup, "Session.Screen%d.Slit.OnTop", screen_number); @@ -2341,7 +2378,7 @@ void Fluxbox::load_rc(BScreen *screen) { void Fluxbox::loadRootCommand(BScreen *screen) { XrmDatabase database = (XrmDatabase) 0; - + auto_ptr dbfile(getRcFilename()); database = XrmGetFileDatabase(dbfile.get()); @@ -2359,6 +2396,7 @@ void Fluxbox::loadRootCommand(BScreen *screen) { screen->saveRootCommand(""); } + void Fluxbox::reload_rc(void) { load_rc(); reconfigure(); diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 68219d0..17228e9 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.5 2002/01/10 12:51:21 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.6 2002/01/11 09:18:58 fluxgen Exp $ #ifndef _FLUXBOX_HH_ #define _FLUXBOX_HH_ @@ -122,7 +122,7 @@ public: Toolbar *searchToolbar(Window); Tab *searchTab(Window); - enum Titlebar{Shade=0, Minimize, Maximize, Close, Stick, Menu, Empty}; + enum Titlebar{SHADE=0, MINIMIZE, MAXIMIZE, CLOSE, STICK, MENU, EMPTY}; inline const std::vector& getTitlebarRight() { return titlebar.right; } inline const std::vector& getTitlebarLeft() { return titlebar.left; } @@ -184,7 +184,7 @@ public: #ifndef HAVE_STRFTIME - enum { B_AmericanDate = 1, B_EuropeanDate }; + enum { B_AMERICANDATE = 1, B_EUROPEANDATE }; #endif // HAVE_STRFTIME template -- cgit v0.11.2