aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-16 19:09:37 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-06-16 19:13:35 (GMT)
commitabe30f34b20970420b09a3b02ea98444d39afc94 (patch)
tree7aaf91f299301718f07cdac5be4e4b9b0122dab4 /src/Screen.cc
parent76af1583937dbf0321fe607954abbd97c266b395 (diff)
downloadfluxbox_pavel-abe30f34b20970420b09a3b02ea98444d39afc94.zip
fluxbox_pavel-abe30f34b20970420b09a3b02ea98444d39afc94.tar.bz2
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.
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc72
1 files changed, 33 insertions, 39 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 3936474..114c440 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -243,42 +243,39 @@ const EnumTraits<FbWinFrame::TabPlacement>::Pair EnumTraits<FbWinFrame::TabPlace
243} // end namespace FbTk 243} // end namespace FbTk
244 244
245 245
246BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, 246BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager_base &rm,
247 const string &scrname, 247 const string &scrname):
248 const string &altscrname): 248 opaque_move(rm, true, scrname + ".opaqueMove"),
249 opaque_move(rm, true, scrname + ".opaqueMove", altscrname+".OpaqueMove"), 249 full_max(rm, false, scrname+".fullMaximization"),
250 full_max(rm, false, scrname+".fullMaximization", altscrname+".FullMaximization"), 250 max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement"),
251 max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement", altscrname+".MaxIgnoreIncrement"), 251 max_disable_move(rm, false, scrname+".maxDisableMove"),
252 max_disable_move(rm, false, scrname+".maxDisableMove", altscrname+".MaxDisableMove"), 252 max_disable_resize(rm, false, scrname+".maxDisableResize"),
253 max_disable_resize(rm, false, scrname+".maxDisableResize", altscrname+".MaxDisableResize"), 253 workspace_warping(rm, true, scrname+".workspacewarping"),
254 workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), 254 show_window_pos(rm, false, scrname+".showwindowposition"),
255 show_window_pos(rm, false, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), 255 auto_raise(rm, true, scrname+".autoRaise"),
256 auto_raise(rm, true, scrname+".autoRaise", altscrname+".AutoRaise"), 256 click_raises(rm, true, scrname+".clickRaises"),
257 click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), 257 default_deco(rm, "NORMAL", scrname+".defaultDeco"),
258 default_deco(rm, "NORMAL", scrname+".defaultDeco", altscrname+".DefaultDeco"), 258 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement"),
259 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"), 259 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu"),
260 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"), 260 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay"),
261 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"), 261 workspaces(rm, 4, scrname+".workspaces"),
262 workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"), 262 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold"),
263 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), 263 focused_alpha(rm, 255, scrname+".window.focus.alpha"),
264 focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), 264 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha"),
265 unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"), 265 menu_alpha(rm, 255, scrname+".menu.alpha"),
266 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"), 266 menu_delay(rm, 200, scrname + ".menuDelay"),
267 menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"), 267 tab_width(rm, 64, scrname + ".tab.width"),
268 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), 268 tooltip_delay(rm, 500, scrname + ".tooltipDelay"),
269 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), 269 allow_remote_actions(rm, false, scrname+".allowRemoteActions"),
270 allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), 270 clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap"),
271 clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), 271 tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap"),
272 tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), 272 max_over_tabs(rm, false, scrname+".tabs.maxOver"),
273 max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"), 273 default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar") {
274 default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { 274
275 275}
276 276
277} 277BScreen::BScreen(FbTk::ResourceManager_base &rm,
278
279BScreen::BScreen(FbTk::ResourceManager &rm,
280 const string &screenname, 278 const string &screenname,
281 const string &altscreenname,
282 int scrn, int num_layers) : 279 int scrn, int num_layers) :
283 m_layermanager(num_layers), 280 m_layermanager(num_layers),
284 m_image_control(0), 281 m_image_control(0),
@@ -297,10 +294,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
297 m_tooltip_window(new TooltipWindow(m_root_window, *this, *m_focused_windowtheme)), 294 m_tooltip_window(new TooltipWindow(m_root_window, *this, *m_focused_windowtheme)),
298 m_dummy_window(scrn, -1, -1, 1, 1, 0, true, false, CopyFromParent, 295 m_dummy_window(scrn, -1, -1, 1, 1, 0, true, false, CopyFromParent,
299 InputOnly), 296 InputOnly),
300 resource(rm, screenname, altscreenname), 297 resource(rm, screenname),
301 m_resource_manager(rm), 298 m_resource_manager(rm),
302 m_name(screenname), 299 m_name(screenname),
303 m_altname(altscreenname),
304 m_focus_control(new FocusControl(*this)), 300 m_focus_control(new FocusControl(*this)),
305 m_placement_strategy(new ScreenPlacement(*this)), 301 m_placement_strategy(new ScreenPlacement(*this)),
306 m_cycling(false), m_cycle_opts(0), 302 m_cycling(false), m_cycle_opts(0),
@@ -471,8 +467,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
471 fluxbox->getSlitlistFilename().c_str())); 467 fluxbox->getSlitlistFilename().c_str()));
472#endif // SLIT 468#endif // SLIT
473 469
474 rm.unlock();
475
476 XFlush(disp); 470 XFlush(disp);
477} 471}
478 472