From 9f2c3883b7cf08a5f9d311fd8f7fc317574b605b Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 16 Jun 2011 21:09:37 +0200 Subject: Replace ResourceManager with the lua version Loading of an init file with the new manager works ok. Saving and restarting is still not completed. This touches many files because i removed the alternative name of resources. Unlike Xrm, lua does not have native support for alt names. It should be fairly easy to add them, but I think that is unnecessary and would be confusing. --- src/AttentionNoticeHandler.cc | 5 ++- src/ClockTool.cc | 2 +- src/FbTk/Resource.hh | 8 +++++ src/FocusControl.cc | 12 +++----- src/IconbarTool.cc | 12 +++----- src/Screen.cc | 72 ++++++++++++++++++++----------------------- src/Screen.hh | 16 +++++----- src/ScreenPlacement.cc | 15 ++++----- src/Slit.cc | 23 +++++--------- src/Toolbar.cc | 28 ++++++----------- src/Window.cc | 10 ++---- src/fluxbox.cc | 38 +++++++---------------- src/fluxbox.hh | 5 +-- 13 files changed, 100 insertions(+), 146 deletions(-) diff --git a/src/AttentionNoticeHandler.cc b/src/AttentionNoticeHandler.cc index 4243377..f783142 100644 --- a/src/AttentionNoticeHandler.cc +++ b/src/AttentionNoticeHandler.cc @@ -64,13 +64,12 @@ void AttentionNoticeHandler::addAttention(Focusable &client) { using namespace FbTk; - ResourceManager &res = client.screen().resourceManager(); + ResourceManager_base &res = client.screen().resourceManager(); std::string res_name = client.screen().name() + ".demandsAttentionTimeout"; - std::string res_alt_name = client.screen().name() + ".DemandsAttentionTimeout"; IntResource *timeout_res = dynamic_cast(res.findResource(res_name)); if (timeout_res == 0) { // no resource, create one and add it to managed resources - timeout_res = new FbTk::IntResource(res, 500, res_name, res_alt_name); + timeout_res = new FbTk::IntResource(res, 500, res_name); client.screen().addManagedResource(timeout_res); } // disable if timeout is zero diff --git a/src/ClockTool.cc b/src/ClockTool.cc index b4792fe..5d6af9b 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc @@ -158,7 +158,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent, m_screen(screen), m_pixmap(0), m_timeformat(screen.resourceManager(), std::string("%k:%M"), - screen.name() + ".strftimeFormat", screen.altName() + ".StrftimeFormat"), + screen.name() + ".strftimeFormat"), m_stringconvertor(FbTk::StringConvertor::ToFbString) { // attach signals m_tracker.join(theme.reconfigSig(), FbTk::MemFun(*this, &ClockTool::themeReconfigured)); diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh index 00f8769..518d0aa 100644 --- a/src/FbTk/Resource.hh +++ b/src/FbTk/Resource.hh @@ -190,10 +190,18 @@ template class Resource:public Resource_base, public Accessor { public: typedef T Type; + Resource(ResourceManager_base &rm, T val, const std::string &name, const std::string &altname): Resource_base(name, altname), m_value(val), m_defaultval(val), m_rm(rm) { m_rm.addResource(*this); // add this to resource handler } + + // LResourceManager does not use altname, so we provide a constructor which initializes + // altname to name + Resource(ResourceManager_base &rm, T val, const std::string &name): + Resource_base(name, name), m_value(val), m_defaultval(val), m_rm(rm) { + m_rm.addResource(*this); // add this to resource handler + } virtual ~Resource() { m_rm.removeResource(*this); // remove this from resource handler } diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 8f1a94f..317b73a 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc @@ -68,19 +68,15 @@ FocusControl::FocusControl(BScreen &screen): m_screen(screen), m_focus_model(screen.resourceManager(), CLICKFOCUS, - screen.name()+".focusModel", - screen.altName()+".FocusModel"), + screen.name()+".focusModel"), m_tab_focus_model(screen.resourceManager(), CLICKTABFOCUS, - screen.name()+".tabFocusModel", - screen.altName()+".TabFocusModel"), + screen.name()+".tabFocusModel"), m_focus_new(screen.resourceManager(), true, - screen.name()+".focusNewWindows", - screen.altName()+".FocusNewWindows"), + screen.name()+".focusNewWindows"), #ifdef XINERAMA m_focus_same_head(screen.resourceManager(), false, - screen.name()+".focusSameHead", - screen.altName()+".FocusSameHead"), + screen.name()+".focusSameHead"), #endif // XINERAMA m_focused_list(screen), m_creation_order_list(screen), m_focused_win_list(screen), m_creation_order_win_list(screen), diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 1452080..ebf67fe 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc @@ -239,15 +239,13 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, m_winlist(new FocusableList(screen)), m_mode("none"), m_rc_mode(screen.resourceManager(), "{static groups} (workspace)", - screen.name() + ".iconbar.mode", screen.altName() + ".Iconbar.Mode"), + screen.name() + ".iconbar.mode"), m_rc_alignment(screen.resourceManager(), FbTk::Container::RELATIVE, - screen.name() + ".iconbar.alignment", screen.altName() + ".Iconbar.Alignment"), - m_rc_client_width(screen.resourceManager(), 128, - screen.name() + ".iconbar.iconWidth", screen.altName() + ".Iconbar.IconWidth"), + screen.name() + ".iconbar.alignment"), + m_rc_client_width(screen.resourceManager(), 128, screen.name() + ".iconbar.iconWidth"), m_rc_client_padding(screen.resourceManager(), 10, - screen.name() + ".iconbar.iconTextPadding", screen.altName() + ".Iconbar.IconTextPadding"), - m_rc_use_pixmap(screen.resourceManager(), true, - screen.name() + ".iconbar.usePixmap", screen.altName() + ".Iconbar.UsePixmap"), + screen.name() + ".iconbar.iconTextPadding"), + m_rc_use_pixmap(screen.resourceManager(), true, screen.name() + ".iconbar.usePixmap"), m_menu(screen.menuTheme(), screen.imageControl(), *screen.layerManager().getLayer(ResourceLayer::MENU)), m_alpha(255) { diff --git a/src/Screen.cc b/src/Screen.cc index 3c21d5f..027f542 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -261,42 +261,39 @@ const EnumTraits::Pair EnumTraitsgetDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"), - typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"), - workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"), - edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), - focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), - unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"), - menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"), - menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"), - tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), - tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), - allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), - clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), - tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), - max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"), - default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { - - -} - -BScreen::BScreen(FbTk::ResourceManager &rm, +BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager_base &rm, + const string &scrname): + opaque_move(rm, true, scrname + ".opaqueMove"), + full_max(rm, false, scrname+".fullMaximization"), + max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement"), + max_disable_move(rm, false, scrname+".maxDisableMove"), + max_disable_resize(rm, false, scrname+".maxDisableResize"), + workspace_warping(rm, true, scrname+".workspacewarping"), + show_window_pos(rm, false, scrname+".showwindowposition"), + auto_raise(rm, true, scrname+".autoRaise"), + click_raises(rm, true, scrname+".clickRaises"), + default_deco(rm, "NORMAL", scrname+".defaultDeco"), + tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement"), + windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu"), + typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay"), + workspaces(rm, 4, scrname+".workspaces"), + edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold"), + focused_alpha(rm, 255, scrname+".window.focus.alpha"), + unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha"), + menu_alpha(rm, 255, scrname+".menu.alpha"), + menu_delay(rm, 200, scrname + ".menuDelay"), + tab_width(rm, 64, scrname + ".tab.width"), + tooltip_delay(rm, 500, scrname + ".tooltipDelay"), + allow_remote_actions(rm, false, scrname+".allowRemoteActions"), + clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap"), + tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap"), + max_over_tabs(rm, false, scrname+".tabs.maxOver"), + default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar") { + +} + +BScreen::BScreen(FbTk::ResourceManager_base &rm, const string &screenname, - const string &altscreenname, int scrn, int num_layers) : m_layermanager(num_layers), m_image_control(0), @@ -314,10 +311,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm, m_pos_window(new OSDWindow(m_root_window, *this, *m_focused_windowtheme)), m_tooltip_window(new TooltipWindow(m_root_window, *this, *m_focused_windowtheme)), m_dummy_window(scrn, -1, -1, 1, 1, 0, true, false, CopyFromParent, InputOnly), - resource(rm, screenname, altscreenname), + resource(rm, screenname), m_resource_manager(rm), m_name(screenname), - m_altname(altscreenname), m_focus_control(new FocusControl(*this)), m_placement_strategy(new ScreenPlacement(*this)), m_cycling(false), m_cycle_opts(0), @@ -488,8 +484,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm, fluxbox->getSlitlistFilename().c_str())); #endif // USE_SLIT - rm.unlock(); - XFlush(disp); } diff --git a/src/Screen.hh b/src/Screen.hh index 44f91d0..05005f0 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -89,8 +89,8 @@ public: typedef std::vector WorkspaceNames; typedef std::list > ExtraMenus; - BScreen(FbTk::ResourceManager &rm, - const std::string &screenname, const std::string &altscreenname, + BScreen(FbTk::ResourceManager_base &rm, + const std::string &screenname, int scrn, int number_of_layers); ~BScreen(); @@ -284,10 +284,9 @@ public: FbTk::MultLayers &layerManager() { return m_layermanager; } const FbTk::MultLayers &layerManager() const { return m_layermanager; } - FbTk::ResourceManager &resourceManager() { return m_resource_manager; } - const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; } + FbTk::ResourceManager_base &resourceManager() { return m_resource_manager; } + const FbTk::ResourceManager_base &resourceManager() const { return m_resource_manager; } const std::string &name() const { return m_name; } - const std::string &altName() const { return m_altname; } bool isShuttingdown() const { return m_shutdown; } bool isRestart(); @@ -527,8 +526,7 @@ private: FbTk::FbWindow m_dummy_window; struct ScreenResource { - ScreenResource(FbTk::ResourceManager &rm, const std::string &scrname, - const std::string &altscrname); + ScreenResource(FbTk::ResourceManager_base &rm, const std::string &scrname); FbTk::BoolResource opaque_move, full_max, max_ignore_inc, max_disable_move, max_disable_resize, @@ -552,8 +550,8 @@ private: /// Holds manage resources that screen destroys FbTk::ResourceManager::ResourceList m_managed_resources; - FbTk::ResourceManager &m_resource_manager; - const std::string m_name, m_altname; + FbTk::ResourceManager_base &m_resource_manager; + const std::string m_name; FocusControl *m_focus_control; ScreenPlacement *m_placement_strategy; diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index 72efdba..b01633c 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc @@ -44,15 +44,12 @@ using std::cerr; using std::endl; ScreenPlacement::ScreenPlacement(BScreen &screen): - m_row_direction(screen.resourceManager(), LEFTRIGHT, - screen.name()+".rowPlacementDirection", - screen.altName()+".RowPlacementDirection"), - m_col_direction(screen.resourceManager(), TOPBOTTOM, - screen.name()+".colPlacementDirection", - screen.altName()+".ColPlacementDirection"), - m_placement_policy(screen.resourceManager(), ROWMINOVERLAPPLACEMENT, - screen.name()+".windowPlacement", - screen.altName()+".WindowPlacement"), + m_row_direction(screen.resourceManager(), LEFTRIGHT, + screen.name()+".rowPlacementDirection"), + m_col_direction(screen.resourceManager(), TOPBOTTOM, + screen.name()+".colPlacementDirection"), + m_placement_policy(screen.resourceManager(), ROWMINOVERLAPPLACEMENT, + screen.name()+".windowPlacement"), m_old_policy(ROWSMARTPLACEMENT), m_strategy(0), m_screen(screen) diff --git a/src/Slit.cc b/src/Slit.cc index 5bd32ff..6b4344e 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -189,21 +189,14 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename) m_strut(0), // resources // lock in first resource - m_rc_kde_dockapp(scr.resourceManager(), true, - scr.name() + ".slit.acceptKdeDockapps", scr.altName() + ".Slit.AcceptKdeDockapps"), - m_rc_auto_hide(scr.resourceManager().lock(), false, - scr.name() + ".slit.autoHide", scr.altName() + ".Slit.AutoHide"), + m_rc_kde_dockapp(scr.resourceManager(), true, scr.name() + ".slit.acceptKdeDockapps"), + m_rc_auto_hide(scr.resourceManager(), false, scr.name() + ".slit.autoHide"), // TODO: this resource name must change - m_rc_maximize_over(scr.resourceManager(), false, - scr.name() + ".slit.maxOver", scr.altName() + ".Slit.MaxOver"), - m_rc_placement(scr.resourceManager(), RIGHTBOTTOM, - scr.name() + ".slit.placement", scr.altName() + ".Slit.Placement"), - m_rc_alpha(scr.resourceManager(), 255, - scr.name() + ".slit.alpha", scr.altName() + ".Slit.Alpha"), - m_rc_on_head(scr.resourceManager(), 0, - scr.name() + ".slit.onhead", scr.altName() + ".Slit.onHead"), - m_rc_layernum(scr.resourceManager(), ResourceLayer::DOCK, - scr.name() + ".slit.layer", scr.altName() + ".Slit.Layer") { + m_rc_maximize_over(scr.resourceManager(), false, scr.name() + ".slit.maxOver"), + m_rc_placement(scr.resourceManager(), RIGHTBOTTOM, scr.name() + ".slit.placement"), + m_rc_alpha(scr.resourceManager(), 255, scr.name() + ".slit.alpha"), + m_rc_on_head(scr.resourceManager(), 0, scr.name() + ".slit.onhead"), + m_rc_layernum(scr.resourceManager(), ResourceLayer::DOCK, scr.name() + ".slit.layer") { _FB_USES_NLS; @@ -258,8 +251,6 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename) loadClientList(filename); setupMenu(); - - scr.resourceManager().unlock(); } diff --git a/src/Toolbar.cc b/src/Toolbar.cc index cb1ee60..4490a4b 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -173,25 +173,18 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width): m_theme(scrn.screenNumber()), m_tool_factory(scrn), m_strut(0), - // lock rcmanager here - m_rc_auto_hide(scrn.resourceManager().lock(), false, - scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"), - m_rc_maximize_over(scrn.resourceManager(), false, - scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), - m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"), - m_rc_width_percent(scrn.resourceManager(), 100, - scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"), - m_rc_alpha(scrn.resourceManager(), 255, - scrn.name() + ".toolbar.alpha", scrn.altName() + ".Toolbar.Alpha"), - m_rc_layernum(scrn.resourceManager(), ResourceLayer::DOCK, - scrn.name() + ".toolbar.layer", scrn.altName() + ".Toolbar.Layer"), - m_rc_on_head(scrn.resourceManager(), 1, - scrn.name() + ".toolbar.onhead", scrn.altName() + ".Toolbar.onHead"), + m_rc_auto_hide(scrn.resourceManager(), false, scrn.name() + ".toolbar.autoHide"), + m_rc_maximize_over(scrn.resourceManager(), false, scrn.name() + ".toolbar.maxOver"), + m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible"), + m_rc_width_percent(scrn.resourceManager(), 100, scrn.name() + ".toolbar.widthPercent"), + m_rc_alpha(scrn.resourceManager(), 255, scrn.name() + ".toolbar.alpha"), + m_rc_layernum(scrn.resourceManager(), ResourceLayer::DOCK, scrn.name() + ".toolbar.layer"), + m_rc_on_head(scrn.resourceManager(), 1, scrn.name() + ".toolbar.onhead"), m_rc_placement(scrn.resourceManager(), Toolbar::BOTTOMCENTER, - scrn.name() + ".toolbar.placement", scrn.altName() + ".Toolbar.Placement"), - m_rc_height(scrn.resourceManager(), 0, scrn.name() + ".toolbar.height", scrn.altName() + ".Toolbar.Height"), + scrn.name() + ".toolbar.placement"), + m_rc_height(scrn.resourceManager(), 0, scrn.name() + ".toolbar.height"), m_rc_tools(scrn.resourceManager(), "prevworkspace, workspacename, nextworkspace, iconbar, systemtray, clock", - scrn.name() + ".toolbar.tools", scrn.altName() + ".Toolbar.Tools"), + scrn.name() + ".toolbar.tools"), m_shape(new FbTk::Shape(frame.window, 0)), m_resize_lock(false) { _FB_USES_NLS; @@ -239,7 +232,6 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width): frame.window.showSubwindows(); // frame.window.show(); - scrn.resourceManager().unlock(); // setup to listen to child events FbTk::EventManager::instance()->addParent(*this, window()); Fluxbox::instance()->keys()->registerWindow(window().window(), *this, diff --git a/src/Window.cc b/src/Window.cc index a46ced7..0296e13 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3416,17 +3416,13 @@ void FluxboxWindow::setupWindow() { // we allow both to be done at once to share the commands string titlebar_name[2]; - string titlebar_alt_name[2]; titlebar_name[0] = screen().name() + ".titlebar.left"; - titlebar_alt_name[0] = screen().altName() + ".Titlebar.Left"; titlebar_name[1] = screen().name() + ".titlebar.right"; - titlebar_alt_name[1] = screen().altName() + ".Titlebar.Right"; WinButtonsResource *titlebar_side[2]; - - ResourceManager &rm = screen().resourceManager(); + ResourceManager_base &rm = screen().resourceManager(); // create resource for titlebar for (int i=0; i < 2; ++i) { @@ -3460,7 +3456,7 @@ void FluxboxWindow::setupWindow() { titlebar_side[i] = new WinButtonsResource(rm, WinButtonsResource::Type(begin, end), - titlebar_name[i], titlebar_alt_name[i]); + titlebar_name[i]); screen().addManagedResource(titlebar_side[i]); @@ -3478,7 +3474,7 @@ void FluxboxWindow::updateButtons() { titlebar_name[1] = screen().name() + ".titlebar.right"; WinButtonsResource *titlebar_side[2]; - ResourceManager &rm = screen().resourceManager(); + ResourceManager_base &rm = screen().resourceManager(); bool need_update = false; // get resource for titlebar diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 73d91ba..7d0fc15 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -45,7 +45,7 @@ #include "FbTk/EventManager.hh" #include "FbTk/StringUtil.hh" #include "FbTk/Util.hh" -#include "FbTk/Resource.hh" +#include "FbTk/LResource.hh" #include "FbTk/SimpleCommand.hh" #include "FbTk/XrmDatabaseHelper.hh" #include "FbTk/Command.hh" @@ -236,10 +236,9 @@ Fluxbox::Fluxbox(int argc, char **argv, const std::string& dpy_name, const std::string& rc_path, const std::string& rc_filename, bool xsync) : FbTk::App(dpy_name.c_str()), + m_l(new lua::state()), m_fbatoms(FbAtoms::instance()), - m_resourcemanager("session", "Session", rc_filename.c_str(), true), - // TODO: shouldn't need a separate one for screen - m_screen_rm(m_resourcemanager), + m_resourcemanager("session", *m_l), m_RC_PATH(rc_path), m_rc_ignoreborder(m_resourcemanager, false, "ignoreBorder", "IgnoreBorder"), @@ -399,9 +398,8 @@ Fluxbox::Fluxbox(int argc, char **argv, // create screens for (size_t s = 0; s < screens.size(); s++) { std::string sc_nr = FbTk::StringUtil::number2String(screens[s]); - BScreen *screen = new BScreen(m_screen_rm.lock(), + BScreen *screen = new BScreen(m_resourcemanager, std::string("screen") + sc_nr, - std::string("Screen") + sc_nr, screens[s], ::ResourceLayer::NUM_LAYERS); // already handled @@ -443,20 +441,13 @@ Fluxbox::Fluxbox(int argc, char **argv, m_reconfigure_wait = false; - m_resourcemanager.unlock(); ungrab(); - if (m_resourcemanager.lockDepth() != 0) { - fbdbg<<"--- resource manager lockdepth = "<loadfile(dbfile.c_str()); + m_l->call(0, 0); + + /* XXX if (!dbfile.empty()) { if (!m_resourcemanager.load(dbfile.c_str())) { cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<empty()) m_rc_menufile.setDefaultValue(); @@ -1239,6 +1234,7 @@ void Fluxbox::load_rc(BScreen &screen) { XrmDatabaseHelper database; + // XXX make this a regular resource database = XrmGetFileDatabase(dbfile.c_str()); if (database==0) database = XrmGetFileDatabase(DEFAULT_INITFILE); @@ -1273,18 +1269,6 @@ void Fluxbox::load_rc(BScreen &screen) { } } - - if (!dbfile.empty()) { - if (!m_screen_rm.load(dbfile.c_str())) { - cerr<<_FB_CONSOLETEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"< m_l; std::auto_ptr m_fbatoms; - FbTk::ResourceManager m_resourcemanager, &m_screen_rm; + FbTk::LResourceManager m_resourcemanager; std::string m_RC_PATH; -- cgit v0.11.2