If 'gtk2' isn't available, see if 'gtk' is actually the 2.0 version.
[rox-lib.git] / AppRun
blobcd7b0fa43b9f44bdcdf9c384bc3b04a10a840fa1
1 #!/usr/bin/env python
3 from sys import argv, path
4 from os.path import dirname, abspath
6 import gtk2 as g
8 app_dir = dirname(abspath(argv[0]))
9 path.append(app_dir + '/python')
11 box = g.MessageDialog(None, g.MESSAGE_QUESTION, 0, g.BUTTONS_OK,
12 "ROX-Lib2 contains code that is useful to newer ROX applications. \
13 You should place this directory somewhere where other programs can \
14 find it, such as ~/lib or /usr/local/lib.")
15 box.add_button(g.STOCK_HELP, g.RESPONSE_HELP)
16 box.set_title('ROX-Lib')
17 box.set_position(g.WIN_POS_CENTER)
18 box.set_default_response(g.RESPONSE_OK)
20 if box.run() == g.RESPONSE_HELP:
21 import os
22 os.system("rox %s/Help &" % app_dir)