run_browser added

svn: r5511
This commit is contained in:
Don Allingham 2005-12-09 02:55:04 +00:00
parent f23b111374
commit 876885b3b1

View File

@ -29,4 +29,25 @@ def help(target):
gnome.url_show('http://gramps-project.org/gramps-manual/gramps-manual-en/index.html')
def url(target):
gnome.url_show(target)
try:
gnome.url_show(target)
except gobject.GError, msg:
run_browser(target)
def run_browser(url):
import os
search = os.environ['PATH'].split(':')
for browser in ['firefox','konqueror','epiphany','galeon','mozilla']:
for path in search:
prog = os.path.join(path,browser)
if os.path.isfile(prog):
os.system("%s %s" % (prog, url))
return