Set background colour when hiding/showing.
[dom-editor.git] / Dome / AppRun
blob1f82b40110c359003d850eb2216d224016d529b4
1 #! /usr/bin/env python
2 # vi: set syntax=python : */
4 import findrox
5 import rox
7 #rox.setup_app_options('Dome')
9 from rox.Menu import Menu, set_save_name
11 set_save_name('Dome')
13 no_gui_mode = 0
15 # Ugly hack to stop wierd chars appearing...
16 #import xml.dom.html
17 #xml.dom.html.HTML_CHARACTER_ENTITIES = {}
19 import sys
20 from os.path import dirname
22 app_dir = dirname(sys.argv[0])
24 from rox import g, mime
25 #from rox.options import Option
26 from Window import Window
28 #default_font = Option('default_font', 'sans 12')
30 # All options must be registered by the time we get here
31 #rox.app_options.notify()
33 #sys.argv.append('--disable-crash-dialog')
34 #import gnome.ui
35 #sys.argv.pop()
37 mime.install_mime_info('Dome')
39 mono = 0
40 while len(sys.argv) > 1 and sys.argv[1].startswith('--'):
41 option = sys.argv[1][2:]
42 del sys.argv[1]
43 if option == 'mono':
44 mono = 1 # Black & White
45 elif option == '':
46 break
47 else:
48 raise Exception("Unknown option", option)
50 def go():
51 if len(sys.argv) > 1:
52 files = sys.argv[1:]
53 del sys.argv[1:] # GnomeCanvas can't cope with -
54 win = apply(Window, files)
55 else:
56 win = Window()
58 win.show()
60 #import profile
61 #profile.run('go()')
62 go()
64 rox.mainloop()