From 364902a41bf9e01bb749f0bf44f054db0b8ec686 Mon Sep 17 00:00:00 2001 From: pboutill Date: Thu, 28 Apr 2011 17:16:59 +0000 Subject: Attempt to use more local doc in coqide git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14083 85f007b7-540e-0410-9357-904b9bb8a0f7 --- ide/ideutils.ml | 9 ++------- ide/minilib.ml | 2 +- ide/preferences.ml | 6 ++++-- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'ide') diff --git a/ide/ideutils.ml b/ide/ideutils.ml index 1b2cd0f899..a27a621701 100644 --- a/ide/ideutils.ml +++ b/ide/ideutils.ml @@ -298,13 +298,8 @@ let browse f url = let doc_url () = if !current.doc_url = use_default_doc_url || !current.doc_url = "" then - if Sys.file_exists - (String.sub Coq_config.localwwwrefman 7 - (String.length Coq_config.localwwwrefman - 7)) - then - Coq_config.localwwwrefman - else - Coq_config.wwwrefman + let addr = List.fold_left Filename.concat (Coq_config.docdir) ["html";"refman";"index.html"] in + if Sys.file_exists addr then "file://"^addr else Coq_config.wwwrefman else !current.doc_url let url_for_keyword = diff --git a/ide/minilib.ml b/ide/minilib.ml index f072ff9fa2..b1f85d2fe3 100644 --- a/ide/minilib.ml +++ b/ide/minilib.ml @@ -56,7 +56,7 @@ let list_filter_i p = filter_i_rec 0 let subst_command_placeholder s t = - Str.global_replace (Str.regexp_string "%s") s t + Str.global_replace (Str.regexp_string "%s") t s (* On win32, the home directory is probably not in $HOME, but in some other environment variable *) diff --git a/ide/preferences.ml b/ide/preferences.ml index 97b1d00dd4..7beacfcd26 100644 --- a/ide/preferences.ml +++ b/ide/preferences.ml @@ -505,8 +505,7 @@ let configure ?(apply=(fun () -> ())) () = "netscape -remote \"openURL(%s)\""; "mozilla -remote \"openURL(%s)\""; "firefox -remote \"openURL(%s,new-windows)\" || firefox %s &"; - "seamonkey -remote \"openURL(%s)\" || seamonkey %s &"; - "open -a Safari %s &" + "seamonkey -remote \"openURL(%s)\" || seamonkey %s &" ] in combo ~help:"(%s for url)" @@ -519,6 +518,8 @@ let configure ?(apply=(fun () -> ())) () = in let doc_url = let predefined = [ + "file://"^(List.fold_left Filename.concat (Coq_config.docdir) ["html";"refman";""]); + Coq_config.wwwrefman; use_default_doc_url ] in combo @@ -530,6 +531,7 @@ let configure ?(apply=(fun () -> ())) () = !current.doc_url in let library_url = let predefined = [ + "file://"^(List.fold_left Filename.concat (Coq_config.docdir) ["html";"stdlib";""]); Coq_config.wwwstdlib ] in combo -- cgit v1.2.3