Commit bbfa8f8e authored by Jehan's avatar Jehan

plug-ins: Lua goat-exercise now showing its own source too.

parent a09b7a9c
Pipeline #105232 passed with stages
in 24 minutes
......@@ -66,6 +66,21 @@ function run(procedure, args, data)
label:show()
-- TODO: show source.
local contents = GLib.file_get_contents(arg[0])
if (contents) then
local scrolled = Gtk.ScrolledWindow()
scrolled:set_vexpand (true)
box:pack_start(scrolled, true, true, 1)
scrolled:show()
local view = Gtk.TextView()
view:set_wrap_mode(Gtk.WrapMode.WORD)
view:set_editable(false)
local buffer = view:get_buffer()
buffer:set_text(contents, -1)
scrolled:add(view)
view:show()
end
while (true) do
local response = dialog:run()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment