| `String of string
]
-let reloadable = function
- | `About `Current_proof
- | `Dir _ ->
- true
- | _ -> false
-
class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
()
=
ignore (win#browserHomeButton#connect#clicked (handle_error' (fun () ->
self#load (`About `Current_proof))));
ignore (win#browserRefreshButton#connect#clicked
- (handle_error' self#refresh));
+ (handle_error' (self#refresh ~force:true)));
ignore (win#browserBackButton#connect#clicked (handle_error' self#back));
ignore (win#browserForwardButton#connect#clicked
(handle_error' self#forward));
(* loads a uri which can be a cic uri or an about:* uri
* @param uri string *)
- method private _load entry =
+ method private _load ?(force=false) entry =
try
- if entry <> current_entry || reloadable entry then begin
+ if entry <> current_entry || entry = `About `Current_proof || force then
+ begin
(match entry with
| `About `Current_proof -> self#home ()
| `About `Blank -> self#blank ()
method win = win
method history = history
method currentEntry = current_entry
- method refresh () =
- if reloadable current_entry then self#_load current_entry
+ method refresh ~force () = self#_load ~force current_entry
end
(self#get_browser reuse)#load entry
end
-let refresh_all_browsers () = List.iter (fun b -> b#refresh ()) !cicBrowsers
+let refresh_all_browsers () =
+ List.iter (fun b -> b#refresh ~force:false ()) !cicBrowsers
let update_font_sizes () =
List.iter (fun b -> b#updateFontSize) !cicBrowsers;