aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-05 12:40:52 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-06-15 23:12:51 (GMT)
commitc8c612eccf722cff6427ac4e3e5ed118b7deb69e (patch)
tree871547702ed8ccfbea02ce2cc1ef6028b3f4ecd6 /src
parentcd9df3b8144c4c41f7b57f0075fbb98ef7561296 (diff)
downloadfluxbox_pavel-c8c612eccf722cff6427ac4e3e5ed118b7deb69e.zip
fluxbox_pavel-c8c612eccf722cff6427ac4e3e5ed118b7deb69e.tar.bz2
temporary commit for testing lua resource manager
Diffstat (limited to 'src')
-rw-r--r--src/main.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 057a863..f340ada 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -34,6 +34,8 @@
34#include "FbTk/I18n.hh" 34#include "FbTk/I18n.hh"
35#include "FbTk/CommandParser.hh" 35#include "FbTk/CommandParser.hh"
36#include "FbTk/FileUtil.hh" 36#include "FbTk/FileUtil.hh"
37#include "FbTk/Luamm.hh"
38#include "FbTk/LResource.hh"
37 39
38//use GNU extensions 40//use GNU extensions
39#ifndef _GNU_SOURCE 41#ifndef _GNU_SOURCE
@@ -414,6 +416,17 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) {
414 416
415int main(int argc, char **argv) { 417int main(int argc, char **argv) {
416 418
419 lua::state l;
420 FbTk::LResourceManager::initState(l);
421 FbTk::LResourceManager man(l, "session");
422 l.loadstring("session.asdf = 321; session.q=456;");
423 l.call(0,0);
424 FbTk::Resource<int> asdf(man, 123, "asdf", "ASDF");
425 cout << "asdf: " << asdf << endl;
426 man.save("/dev/stdout", NULL);
427 return 0;
428
429
417 FbTk::NLSInit("fluxbox.cat"); 430 FbTk::NLSInit("fluxbox.cat");
418 431
419 Options opts; 432 Options opts;