- gui#uriChoice#uriChoiceDialog#set_title title;
- gui#uriChoice#uriChoiceLabel#set_text msg;
- FINQUI
-
- let clist =
- let expected_height = 18 * List.length uris in
- let height = if expected_height > 400 then 400 else expected_height in
- GList.clist ~columns:1 ~packing:scrolled_window#add
- ~height ~selection_mode:(selection_mode :> Gtk.Tags.selection_mode) () in
- let _ = List.map (function x -> clist#append [x]) uris in
- let hbox2 =
- GPack.hbox ~border_width:0
- ~packing:(window#vbox#pack ~expand:false ~fill:false ~padding:5) () in
- let explain_label =
- GMisc.label ~text:"None of the above. Try this one:"
- ~packing:(hbox2#pack ~expand:false ~fill:false ~padding:5) () in
- let manual_input =
- GEdit.entry ~editable:true
- ~packing:(hbox2#pack ~expand:true ~fill:true ~padding:5) () in
- let hbox =
- GPack.hbox ~border_width:0 ~packing:window#action_area#add () in
- let okb =
- GButton.button ~label:ok
- ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in
- let _ = okb#misc#set_sensitive false in
- let nonvarsb =
- GButton.button
- ~packing:
- (function w ->
- if enable_button_for_non_vars then
- hbox#pack ~expand:false ~fill:false ~padding:5 w)
- ~label:"Try constants only" () in
- let autob =
- GButton.button
- ~packing:
- (fun w ->
- if enable_button_for_non_vars then
- hbox#pack ~expand:false ~fill:false ~padding:5 w)
- ~label:"Auto" () in
- let checkb =
- GButton.button ~label:"Check"
- ~packing:(hbox#pack ~padding:5) () in
- let _ = checkb#misc#set_sensitive false in
- let cancelb =
- GButton.button ~label:"Abort"
- ~packing:(hbox#pack ~expand:false ~fill:false ~padding:5) () in
- (* actions *)
- let check_callback () =
- assert (List.length !choices > 0) ;
- check_window !choices
+ win#uriChoiceDialog#set_title title;
+ win#uriChoiceLabel#set_text msg;
+ gui#uriChoices#list_store#clear ();
+ List.iter gui#uriChoices#easy_append uris;
+ win#uriChoiceConstantsButton#misc#set_sensitive nonvars_button;
+ let bye = ref (fun () -> ()) in
+ let id1 =
+ win#uriChoiceConstantsButton#connect#clicked (fun _ ->
+ use_only_constants := true;
+ !bye ())