Add URI display, remove attrib print.
[dom-editor.git] / Dome / AppRun
blob91a7fcf4f0ac3d5520d67f16b2b7e72859a297df
1 #! /usr/bin/env python
2 # vi: set syntax=python : */
4 import findrox
6 # Ugly hack to stop wierd chars appearing...
7 import xml.dom.html
8 xml.dom.html.HTML_CHARACTER_ENTITIES = {}
10 import sys
11 from os.path import dirname
13 app_dir = dirname(sys.argv[0])
15 import gtk
16 from Window import Window
18 tl_windows = 0
20 def tl_ref(w = None):
21 global tl_windows
22 tl_windows = tl_windows + 1
24 def tl_unref(w = None):
25 global tl_windows
26 tl_windows = tl_windows - 1
27 if tl_windows < 1:
28 gtk.mainquit()
30 docs = []
32 if len(sys.argv) > 1:
33 files = sys.argv[1:]
34 del sys.argv[1:] # GnomeCanvas can't cope with -
35 for file in files:
36 win = Window(file)
37 win.connect('destroy', tl_unref)
38 tl_ref()
39 win.show()
40 else:
41 win = Window()
42 win.connect('destroy', tl_unref)
43 tl_ref()
44 win.show()
46 if tl_windows > 0:
47 #import profile
48 #profile.run('mainloop()')
50 gtk.mainloop()