run_browser added
svn: r5511
This commit is contained in:
parent
f23b111374
commit
876885b3b1
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user