From 8793c9168d196dde55d6dc35e3694c0dc4ab375f Mon Sep 17 00:00:00 2001 From: pazz Date: Sun, 24 Jul 2011 23:24:42 +0100 Subject: oop-idied settings --- alot/init.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'alot/init.py') diff --git a/alot/init.py b/alot/init.py index 9217bfba..cb96c86a 100755 --- a/alot/init.py +++ b/alot/init.py @@ -21,6 +21,7 @@ import logging import os import settings +from settings import AccountManager from db import DBManager from ui import UI from urwid.command_map import command_map @@ -59,7 +60,11 @@ def main(): #read config file configfilename = os.path.expanduser(args.configfile) - settings.setup(configfilename) + settings.config.read(configfilename) + settings.hooks.setup(settings.config.get('general', 'hooksfile')) + + #accountman + aman = AccountManager(settings.config) # setup logging numeric_loglevel = getattr(logging, args.debug_level.upper(), None) @@ -69,8 +74,6 @@ def main(): # get ourselves a database manager dbman = DBManager(path=args.db_path, ro=args.read_only) - # read accounts - accounts = settings.get_accounts() # set up global urwid command maps command_map['j'] = 'cursor down' @@ -82,7 +85,7 @@ def main(): # set up and start interface ui = UI(dbman, logger, - accounts, + aman, args.query, args.colours, ) -- cgit v1.2.3