From f5f02c1615a30d88fbd0d77709ee9c924c048849 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Mon, 29 Apr 2013 00:07:16 +0200 Subject: add template dir to config --- src/web/main.vala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/web/main.vala') diff --git a/src/web/main.vala b/src/web/main.vala index 07dbb03..b5fdde3 100644 --- a/src/web/main.vala +++ b/src/web/main.vala @@ -16,13 +16,19 @@ Database db; public CSVMemberFile csvimport; public PGP pgp; +public Config cfg; +string templatedir; public static int main(string[] args) { try { db = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database"); pgp = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.PGP", "/io/mainframe/shopsystem/pgp"); + cfg = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config"); + templatedir = cfg.get_string("WEB", "filepath"); } catch(IOError e) { error("IOError: %s\n", e.message); + } catch(KeyFileError e) { + error("KeyFileError: %s\n", e.message); } /* attach WebServer to MainLoop */ -- cgit v1.2.3