create a Config and pass it to the Window
This commit is contained in:
parent
08128f5be0
commit
3c6703771d
@ -1,4 +1,6 @@
|
||||
|
||||
import os
|
||||
|
||||
class Config:
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
|
@ -4,10 +4,12 @@ import gobject
|
||||
from datetime import *
|
||||
|
||||
from AboutWindow import AboutWindow
|
||||
from Config import *
|
||||
|
||||
class Window:
|
||||
def __init__(self, progName, ds):
|
||||
def __init__(self, progName, ds, config):
|
||||
self.ds = ds
|
||||
self.config = config
|
||||
self.shown_projects = []
|
||||
self.taskStart = datetime.now()
|
||||
self.monday = \
|
||||
|
4
dwtt
4
dwtt
@ -6,6 +6,7 @@ import getopt
|
||||
|
||||
from Window import *
|
||||
from DataStore import *
|
||||
from Config import *
|
||||
|
||||
PROGRAM_NAME = 'dwtt'
|
||||
|
||||
@ -39,7 +40,8 @@ def main(argv):
|
||||
|
||||
conf_file = dbfile + '.conf'
|
||||
ds = DataStore(dbfile)
|
||||
w = Window(PROGRAM_NAME, ds)
|
||||
config = Config(conf_file)
|
||||
w = Window(PROGRAM_NAME, ds, config)
|
||||
w.main()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user