2 # vi: set syntax=python : */
6 import findrox
; findrox
.version(1, 9, 8)
13 __builtins__
.bool = lambda x
: not not x
17 #rox.setup_app_options('Dome')
19 from rox
.Menu
import Menu
, set_save_name
25 # Ugly hack to stop wierd chars appearing...
27 #xml.dom.html.HTML_CHARACTER_ENTITIES = {}
30 from os
.path
import dirname
32 app_dir
= dirname(sys
.argv
[0])
34 from rox
import g
, mime
35 from rox
.options
import Option
36 from Window
import Window
37 rox
.setup_app_options('Dome')
39 default_font
= Option('default_font', 'sans 12')
41 # All options must be registered by the time we get here
42 rox
.app_options
.notify()
44 #sys.argv.append('--disable-crash-dialog')
48 mime
.install_mime_info('Dome')
51 while len(sys
.argv
) > 1 and sys
.argv
[1].startswith('--'):
52 option
= sys
.argv
[1][2:]
55 mono
= 1 # Black & White
59 raise Exception("Unknown option", option
)
62 del sys
.argv
[1:] # GnomeCanvas can't cope with -
68 # Run twice, once to make sure everything is initialised, and
69 # again to make sure the memory use doesn't grow further.
73 log
= file('leak-log', 'w')
77 for x
in gc
.get_objects():
83 #profile.run('rox.mainloop()')
88 for x
in gc
.get_objects():
91 print>>log
, "New %s: %s" % (type(x
), `x`
)
92 for y
in gc
.get_referrers(x
):
93 if y
is not globals() and id(y
) in old
:
95 print>>log
, "\t(dict, key is %s)" % [k
for k
in y
if y
[k
] is x
]
96 print>>log
, "\t%s" % `y`