updated on Mon Jan 16 16:00:41 UTC 2012
[aur-mirror.git] / notalon / notalon.py.patch
blobbfb5221b02deee3580952f2dfe12630507483e2a
1 --- notalon.py.orig 2009-08-10 02:08:08.000000000 +0300
2 +++ notalon.py 2009-08-28 05:40:29.000000000 +0300
3 @@ -17,13 +17,18 @@ import logging
4 import os.path
5 import sys
6 import wx
7 +import shutil
9 from notalonlib.window import NotalonWindow
11 # The next line deals with a known path problem in wxPython
12 -__builtin__.__dict__['homepath'] = os.path.abspath(os.path.dirname(sys.argv[0]))
13 +__builtin__.__dict__['homepath'] = os.path.expanduser('~/.config/notalon')
14 __builtin__.__dict__['_'] = lambda x: x # TODO: later, include locales
16 +# Create homepath directory if it doesn't exist
17 +if not os.path.exists(homepath):
18 + shutil.copytree('/usr/share/notalon', homepath)
20 # Set up loggers programmatically (we want to hard-code the file location based
21 # on `homepath`, which we can't do with a configuration file)
22 for name in ['application', 'root', 'window', 'pdf', 'gui', 'resource']:
23 @@ -78,4 +83,3 @@ if __name__ == "__main__": # if called a
24 app.MainLoop()
26 log.debug('Finished main loop -- exiting.')