Work around change in Python 2.5
[rox-edit/bju.git] / setup.py
blob60f7110516e793cff72a9281891f282fa12633b7
1 import findrox; findrox.version(1, 19, 14)
3 import sys, os
4 import rox
5 from rox import g
7 import __main__
9 __main__.__builtins__._ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages'))
11 g.rc_parse_string('style "edit-text-area" { GtkWidget::cursor-color = "#e00"\n'
12 'GtkWidget::cursor-aspect-ratio = 0.1}\n'
13 'style "edit-scrolled" { GtkScrolledWindow::scrollbar-spacing = 0}\n'
14 'class "GtkScrolledWindow" style : gtk "edit-scrolled"\n'
15 'class "GtkTextView" style : gtk "edit-text-area"\n')
17 # Load icons
18 factory = g.IconFactory()
19 for name in ['rox-diff']:
20 path = os.path.join(rox.app_dir, "images", name + ".png")
21 pixbuf = g.gdk.pixbuf_new_from_file(path)
22 if not pixbuf:
23 print >>sys.stderr, "Can't load stock icon '%s'" % name
24 g.stock_add([(name, name, 0, 0, "")])
25 factory.add(name, g.IconSet(pixbuf = pixbuf))
26 factory.add_default()
28 from rox import choices
29 choices.migrate('Edit', 'rox.sourceforge.net')
30 rox.setup_app_options('Edit', site='rox.sourceforge.net')
32 # Register options...
33 import EditWindow
35 import diff
37 # All options must be registered by the time we get here
38 rox.app_options.notify()