bin: lua-viewer, set window title, permit interacting with .lui scenes

parent 8f5fcaba
......@@ -2,6 +2,10 @@
-- todo : implement thumb-bar of previous/next image
local path = GObject.Object(STATE).path
local source = GObject.Object(STATE).source
mrg:set_title(ffi.string(o.path))
cr:new_path()
cr:rectangle(0,0,mrg:width(),mrg:height())
......@@ -23,6 +27,8 @@ mrg:listen(Mrg.MOTION, function(event)
controls_keepalive()
end)
if not path:find(".lui$") then
mrg:listen(Mrg.DRAG, function(event)
if zoom_pinch_coord == nil then
......@@ -86,7 +92,7 @@ mrg:listen(Mrg.DRAG, function(event)
end
event:stop_propagate()
end)
end
mrg:listen(Mrg.SCROLL, function(event)
local factor = 1.05
......@@ -310,8 +316,6 @@ if o.is_video ~= 0 then
end
local path = GObject.Object(STATE).path
local source = GObject.Object(STATE).source
function pdf_next_page()
local pages = source:get_property('pages').value
......@@ -375,7 +379,6 @@ if path:find(".pdf$") or path:find('.PDF$') then
end
mrg:add_binding("alt-right", NULL, "next image",
function() ffi.C.argvs_eval ("next") end)
......
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