1 # This file is part of MyPaint.
2 # Copyright (C) 2007-2009 by Martin Renold <martinxyz@gmx.ch>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
11 from gui import application
13 # main entry, called from the "mypaint" script
14 def main(datapath, confpath):
17 print sys.argv[0], '[OPTION]... [FILENAME]'
19 print ' -c /path/to/config use this directory instead of ~/.mypaint/'
20 print ' -p profile (debug only; simulate some strokes and quit)'
30 confpath = args.pop(0)
33 elif arg.startswith('-'):
37 print 'Cannot open more than one file!'
40 if not os.path.isfile(filename):
41 print 'File', filename, 'does not exist!'
44 print 'confpath =', confpath
45 app = application.Application(datapath, confpath, filename, profile)
47 # Recent gtk versions don't allow changing those menu shortcuts by
48 # default. <rant>Sigh. This very useful feature used to be the
49 # default behaviour even in the GIMP some time ago. I guess
50 # assigning a keyboard shortcut without a complicated dialog
51 # clicking marathon must have totally upset the people coming from
53 gtksettings = gtk.settings_get_default()
54 gtksettings.set_property('gtk-can-change-accels', True)