aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-12 13:17:47 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-06-15 23:12:52 (GMT)
commitfe4b924bcb7d059e5ca059f88ba863a74c0d8760 (patch)
tree23b2fb89b1301b586a67edb17bac43b8b0df73f7 /src/main.cc
parentba6a65c3d020e2a57eb805da6ed30d796b383060 (diff)
downloadfluxbox_pavel-fe4b924bcb7d059e5ca059f88ba863a74c0d8760.zip
fluxbox_pavel-fe4b924bcb7d059e5ca059f88ba863a74c0d8760.tar.bz2
Factor out "session." from resource names
this reduces typing and it makes more sense in lua, since there the resources are implemented as hierarchical tables and the topmost table has to be handled a bit specially.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc
index a18ae56..4723c09 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -383,8 +383,8 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) {
383 383
384 const int CONFIG_VERSION = 13; // TODO: move this to 'defaults.hh' or 'config.h' 384 const int CONFIG_VERSION = 13; // TODO: move this to 'defaults.hh' or 'config.h'
385 385
386 FbTk::ResourceManager r_mgr(rc_file.c_str(), false); 386 FbTk::ResourceManager r_mgr("session", "Session", rc_file.c_str(), false);
387 FbTk::IntResource c_version(r_mgr, 0, "session.configVersion", "Session.ConfigVersion"); 387 FbTk::IntResource c_version(r_mgr, 0, "configVersion", "ConfigVersion");
388 388
389 if (!r_mgr.load(rc_file.c_str())) { 389 if (!r_mgr.load(rc_file.c_str())) {
390 _FB_USES_NLS; 390 _FB_USES_NLS;
@@ -416,9 +416,10 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) {
416#include "WinButton.hh" 416#include "WinButton.hh"
417int main(int argc, char **argv) { 417int main(int argc, char **argv) {
418 418
419#if 0
419 lua::state l; 420 lua::state l;
420 FbTk::LResourceManager::initState(l); 421 FbTk::LResourceManager::initState(l);
421 FbTk::LResourceManager man(l, "session"); 422 FbTk::LResourceManager man("session", l);
422 l.loadstring("session.asdf = {'close', 'close'}; session.q={{1,2,{3,4}},{{z={{5}}}}};"); 423 l.loadstring("session.asdf = {'close', 'close'}; session.q={{1,2,{3,4}},{{z={{5}}}}};");
423 l.call(0,0); 424 l.call(0,0);
424 man.save("/dev/stdout", NULL); 425 man.save("/dev/stdout", NULL);
@@ -426,7 +427,7 @@ int main(int argc, char **argv) {
426 cout << "asdf: " << asdf.getString() << endl; 427 cout << "asdf: " << asdf.getString() << endl;
427 man.save("/dev/stdout", NULL); 428 man.save("/dev/stdout", NULL);
428 return 0; 429 return 0;
429 430#endif
430 431
431 FbTk::NLSInit("fluxbox.cat"); 432 FbTk::NLSInit("fluxbox.cat");
432 433