[API 6.2.3] Added changes for API 6.2.3 compatibility

This commit is contained in:
wpferguson
2021-02-17 22:24:02 -05:00
parent 448da35327
commit 4053ceb9e5
5 changed files with 127 additions and 44 deletions

View File

@@ -114,17 +114,37 @@ local function paste(images)
end
end
dt.gui.libs.image.register_action(
_("copy metadata"),
function(event, images) copy(images[1]) end,
_("copy metadata of the first selected image")
)
if CURR_API_STRING < "6.2.3" then
dt.gui.libs.image.register_action(
_("copy metadata"),
function(event, images) copy(images[1]) end,
_("copy metadata of the first selected image")
)
else
dt.gui.libs.image.register_action(
"metadata_copy", _("copy metadata"),
function(event, images) copy(images[1]) end,
_("copy metadata of the first selected image")
)
end
if CURR_API_STRING < "6.2.3" then
dt.gui.libs.image.register_action(
_("paste metadata"),
function(event, images) paste(images) end,
_("paste metadata to the selected images")
)
else
dt.gui.libs.image.register_action(
"metadata_paste", _("paste metadata"),
function(event, images) paste(images) end,
_("paste metadata to the selected images")
)
end
dt.gui.libs.image.register_action(
_("paste metadata"),
function(event, images) paste(images) end,
_("paste metadata to the selected images")
)
dt.register_event(
"capmd1", "shortcut",