From 798207dbb44e371aa8a60608877b23fd1ed952a8 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Tue, 25 Apr 2006 04:10:32 +0000 Subject: [PATCH] make manual work in Windows svn: r6433 --- ChangeLog | 3 +++ src/GrampsDisplay.py | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ef444ebb..3001beea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-04-24 Brian Matherly + * src/GrampsDisplay.py: make manual work in Windows + 2006-04-24 Don Allingham * src/GrampsDb/_GrampsBSDDB.py: handle data_map during reload of the database diff --git a/src/GrampsDisplay.py b/src/GrampsDisplay.py index 5d9e55def..d1c3c3bc2 100644 --- a/src/GrampsDisplay.py +++ b/src/GrampsDisplay.py @@ -25,15 +25,16 @@ def help(target): try: import gnome gnome.help_display('gramps-manual',target) - except gobject.GError, msg: + except: url('http://gramps-project.org/gramps-manual/gramps-manual-en/index.html') def url(target): try: import gnome gnome.url_show(target) - except gobject.GError, msg: + except: run_browser(target) + def run_browser(url): import os @@ -46,7 +47,12 @@ def run_browser(url): if os.path.isfile(prog): os.spawnvpe(os.P_NOWAIT, prog, [prog, url], os.environ) return - + + # If we did not find a browser in the path, try this + try: + os.startfile(url) + except: + pass