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



commit dddc224cef80f5652e2a60c3b3da3e761e7076bb
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Mar 3 17:56:13 2019 +0100

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

 bin/lua/viewer.lua | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/bin/lua/viewer.lua b/bin/lua/viewer.lua
index d2115d666..668a00fac 100644
--- a/bin/lua/viewer.lua
+++ b/bin/lua/viewer.lua
@@ -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)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]