Put description area in its own class.
[zeroinstall.git] / 0launch-gui
blob4d9ccbba793fd856528ac8303ca1ac2222d7e964
1 #!/usr/bin/env python
2 import os, sys
3 from optparse import OptionParser
5 __builtins__._ = lambda x: x
7 parser = OptionParser(usage="usage: %prog [options] interface [args]")
8 parser.add_option("-d", "--download-only", help="fetch but don't run", action='store_true')
9 parser.disable_interspersed_args()
11 (options, args) = parser.parse_args()
13 if len(args) < 1:
14 parser.print_help()
15 sys.exit(1)
17 interface_uri = args[0]
18 prog_args = args[1:]
20 import model
21 from gui import GUIPolicy
22 import gui, gtk
24 gtk.rc_parse_string('style "scrolled" { '
25 'GtkScrolledWindow::scrollbar-spacing = 0}\n'
26 'class "GtkScrolledWindow" style : gtk "scrolled"\n')
28 policy = GUIPolicy(interface_uri, prog_args,
29 download_only = bool(options.download_only))
30 policy.main()