more cleanup
This commit is contained in:
40
oplevel.ml
40
oplevel.ml
@ -70,8 +70,8 @@ let () =
|
||||
(* Thread which is woken up when the main window is closed. *)
|
||||
let _waiter, _wakener = Lwt.wait () in
|
||||
|
||||
(* F.pr "oplevel.ml: Toploop.initialize_toplevel_env@.";
|
||||
Toploop.initialize_toplevel_env (); *)
|
||||
F.pr "oplevel.ml: Toploop.initialize_toplevel_env@.";
|
||||
Toploop.initialize_toplevel_env ();
|
||||
let rootrepo =
|
||||
Store.init_default
|
||||
(F.str "%s/console/rootstore.git" Secrets.giturl)
|
||||
@ -100,20 +100,30 @@ let () =
|
||||
|
||||
F.pr "oplevel.ml: building initial page@.";
|
||||
let page =
|
||||
Layout.(
|
||||
vbox
|
||||
[
|
||||
textedit
|
||||
(TextEdit.multiline ui
|
||||
(TextBuffer.of_repo ~path:[ "README" ] ~repo:rootrepo));
|
||||
textedit
|
||||
(TextEdit.multiline ui
|
||||
(TextBuffer.of_repo
|
||||
~path:[ ".config"; "init.ml" ]
|
||||
~repo:rootrepo));
|
||||
])
|
||||
ref
|
||||
Layout.(
|
||||
vbox
|
||||
[
|
||||
textedit
|
||||
(TextEdit.multiline ui
|
||||
(TextBuffer.of_repo ~path:[ "README" ] ~repo:rootrepo));
|
||||
textedit
|
||||
(TextEdit.multiline ui
|
||||
(TextBuffer.of_repo
|
||||
~path:[ ".config"; "init.ml" ]
|
||||
~repo:rootrepo));
|
||||
])
|
||||
in
|
||||
|
||||
(let open GLFW in
|
||||
let open Event in
|
||||
let open Ui in
|
||||
update_bindings ui
|
||||
(adds
|
||||
[
|
||||
[ Key (Press, X, [ Control ]); Key (Press, E, [ Control ]) ];
|
||||
]
|
||||
[ Custom (fun () -> Lwt.return ()) ]));
|
||||
F.pr "oplevel.ml: entering drawing loop@.";
|
||||
let period_min = 1.0 /. 30. in
|
||||
let t = GLFW.getTime () |> ref in
|
||||
@ -149,7 +159,7 @@ let () =
|
||||
Perfgraph.render graph ctx (width -. 205.) 5.;
|
||||
(* F.epr "box=%a@." Gg.Box2.pp box;
|
||||
F.epr "Painter.layout=%a@." Gg.Box2.pp *)
|
||||
Painter.layout box ui page >>= fun _ ->
|
||||
Painter.layout box ui !page >>= fun _ ->
|
||||
(* Demo.render_demo ctx mx my win_w win_h now !blowup data; *)
|
||||
Gv.end_frame ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user