Reverted register_event calls back to API 6.1.0

This commit is contained in:
Bill Ferguson
2021-06-11 21:44:38 -04:00
parent 9d59479049
commit 4b63240ab9
32 changed files with 67 additions and 88 deletions

View File

@@ -32,7 +32,6 @@ https://www.darktable.org/lua-api/index.html.php#darktable_new_widget
local dt = require "darktable"
local du = require "lib/dtutils"
require "lib/darktable_transition"
du.check_min_api_version("3.0.0", "moduleExample")
local CURR_API_STRING = dt.configuration.api_version_string
@@ -149,7 +148,7 @@ else
if not mE.event_registered then -- if we are not in lighttable view then register an event to signal when we might be
-- https://www.darktable.org/lua-api/index.html#darktable_register_event
dt.register_event(
"mdouleExample", "view-changed", -- we want to be informed when the view changes
"view-changed", -- we want to be informed when the view changes
function(event, old_view, new_view)
if new_view.name == "lighttable" and old_view.name == "darkroom" then -- if the view changes from darkroom to lighttable
install_module() -- register the lib

View File

@@ -52,8 +52,7 @@
]]
local dt = require "darktable"
require "lib/darktable_transition"
--[[
require "lib/..." provides access to functions that have been pulled from various
scripts and consolidated into libraries. Using the libraries eliminates having to
@@ -243,7 +242,7 @@ dt.gui.libs.image.register_action(
]]
dt.register_event(
"multi_os", "shortcut",
"shortcut",
function(event, shortcut) extract_embedded_jpeg(dt.gui.action_images) end,
"extract embedded jpeg"
)