From dff0fc3e95565f7312626a831f828f38150277a6 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 --- gramps2/ChangeLog | 3 +++ gramps2/src/GrampsDisplay.py | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8ef444ebb..3001beea8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/GrampsDisplay.py b/gramps2/src/GrampsDisplay.py index 5d9e55def..d1c3c3bc2 100644 --- a/gramps2/src/GrampsDisplay.py +++ b/gramps2/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