2 # vi: set syntax=python : */
10 #rox.setup_app_options('Dome')
12 from rox
.Menu
import Menu
, set_save_name
18 # Ugly hack to stop wierd chars appearing...
20 #xml.dom.html.HTML_CHARACTER_ENTITIES = {}
23 from os
.path
import dirname
25 app_dir
= dirname(sys
.argv
[0])
27 from rox
import g
, mime
28 from rox
.options
import Option
29 from Window
import Window
30 rox
.setup_app_options('Dome')
32 default_font
= Option('default_font', 'sans 12')
34 # All options must be registered by the time we get here
35 rox
.app_options
.notify()
37 #sys.argv.append('--disable-crash-dialog')
41 mime
.install_mime_info('Dome')
44 while len(sys
.argv
) > 1 and sys
.argv
[1].startswith('--'):
45 option
= sys
.argv
[1][2:]
48 mono
= 1 # Black & White
52 raise Exception("Unknown option", option
)
55 del sys
.argv
[1:] # GnomeCanvas can't cope with -
61 # Run twice, once to make sure everything is initialised, and
62 # again to make sure the memory use doesn't grow further.
66 log
= file('leak-log', 'w')
70 for x
in gc
.get_objects():
76 #profile.run('rox.mainloop()')
81 for x
in gc
.get_objects():
84 print>>log
, "New %s: %s" % (type(x
), `x`
)
85 for y
in gc
.get_referrers(x
):
86 if y
is not globals() and id(y
) in old
:
88 print>>log
, "\t(dict, key is %s)" % [k
for k
in y
if y
[k
] is x
]
89 print>>log
, "\t%s" % `y`