self#check_widgets ();
let combo_widget = combo#coerce in
uriHBox#pack ~from:`END ~fill:true ~expand:true combo_widget;
- self#toplevel#set_transient_for main#toplevel#as_window;
combo#misc#grab_focus ()
method browserUri = combo
end
tree_store#get ~row:iter ~column:interp_no_col
end
+
let interactive_string_choice
text prefix_len ?(title = "") ?(msg = "") () ~id locs uris
=
-
- let text = Pcre.replace ~pat:"<" ~templ:"<" text in
- let text = Pcre.replace ~pat:"'" ~templ:"'" text in
- let text = Pcre.replace ~pat:"\"" ~templ:""" text in
- let text = Pcre.replace ~pat:">" ~templ:">" text in
let gui = instance () in
let dialog = gui#newUriDialog () in
dialog#uriEntryHBox#misc#hide ();
let rec colorize acc_len = function
| [] ->
let floc = HExtlib.floc_of_loc (acc_len,hack_len) in
- fst(MatitaGtkMisc.utf8_parsed_text text floc)
+ escape_pango_markup (fst(MatitaGtkMisc.utf8_parsed_text text floc))
| he::tl ->
let start, stop = HExtlib.loc_of_floc he in
let floc1 = HExtlib.floc_of_loc (acc_len,start) in
let str1,_=MatitaGtkMisc.utf8_parsed_text text floc1 in
let str2,_ = MatitaGtkMisc.utf8_parsed_text text he in
- str1 ^ "<b>" ^ str2 ^ "</b>" ^ colorize stop tl
+ escape_pango_markup str1 ^ "<b>" ^
+ escape_pango_markup str2 ^ "</b>" ^
+ colorize stop tl
in
(* List.iter (fun l -> let start, stop = HExtlib.loc_of_floc l in
Printf.eprintf "(%d,%d)" start stop) locs; *)
let txt,_ = MatitaGtkMisc.utf8_parsed_text txt
(HExtlib.floc_of_loc (prefix_len,MatitaGtkMisc.utf8_string_length txt))
in
+ prerr_endline ("txt:" ^ txt);
dialog#uriChoiceLabel#set_label txt;
List.iter model#easy_append uris;
let return v =