inline if didn't work. Added intermediate register_event function in transition library

This commit is contained in:
wpferguson
2021-02-10 00:18:48 -05:00
parent 2b28f021ee
commit b1498aa664
33 changed files with 139 additions and 57 deletions

View File

@@ -30,6 +30,7 @@ This plugin will add a widget at the bottom of the left column in lighttable mod
]]
local dt = require "darktable"
local du = require "lib/dtutils"
require "lib/darktable_transition"
du.check_min_api_version("2.0.0", "image_path_in_ui")
local CURR_API_STRING = dt.configuration.api_version_string
@@ -74,7 +75,7 @@ if dt.gui.current_view().id == "lighttable" then
else
if not ipiu.event_registered then
dt.register_event(
CURR_API_STRING >= "6.2.1" and "ipiu", "view-changed" or "view-changed" ,
"ipiu", "view-changed",
function(event, old_view, new_view)
if new_view.name == "lighttable" and old_view.name == "darkroom" then
install_module()
@@ -85,7 +86,7 @@ else
end
end
dt.register_event(CURR_API_STRING >= "6.2.1" and "ipiu", "mouse-over-image-changed" or "mouse-over-image-changed" , reset_widget);
dt.register_event("ipiu", "mouse-over-image-changed", reset_widget);
--
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua