Reverted register_event calls back to API 6.1.0
This commit is contained in:
@@ -37,7 +37,7 @@ selected images, the other button performs grouping on the entire active collect
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local MOD = 'autogrouper'
|
local MOD = 'autogrouper'
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
@@ -176,7 +176,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not Ag.event_registered then
|
if not Ag.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"AutoGrouper", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Select a style, whether you want tags to be copied from the original, and any ad
|
|||||||
|
|
||||||
local dt = require 'darktable'
|
local dt = require 'darktable'
|
||||||
local df = require 'lib/dtutils.file'
|
local df = require 'lib/dtutils.file'
|
||||||
require "lib/darktable_transition"
|
|
||||||
local dsys = require 'lib/dtutils.system'
|
local dsys = require 'lib/dtutils.system'
|
||||||
local mod = 'module_HDRMerge'
|
local mod = 'module_HDRMerge'
|
||||||
local os_path_seperator = '/'
|
local os_path_seperator = '/'
|
||||||
@@ -439,7 +439,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not HDRM.event_registered then
|
if not HDRM.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"HDRmerge", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
|
|
||||||
local darktable = require("darktable")
|
local darktable = require("darktable")
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
du.check_min_api_version("3.0.0", "LabelsToTags")
|
du.check_min_api_version("3.0.0", "LabelsToTags")
|
||||||
|
|
||||||
@@ -249,7 +248,7 @@ if darktable.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not ltt.event_registered then
|
if not ltt.event_registered then
|
||||||
darktable.register_event(
|
darktable.register_event(
|
||||||
LIB_ID, "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ As an alternative option you can choose to show the image file names as symbolic
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local dsys = require "lib/dtutils.system"
|
local dsys = require "lib/dtutils.system"
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
@@ -211,7 +210,7 @@ if act_os ~= "windows" then
|
|||||||
end
|
end
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"OpenInExplorer", "shortcut",
|
"shortcut",
|
||||||
function(event, shortcut) open_in_fmanager() end,
|
function(event, shortcut) open_in_fmanager() end,
|
||||||
"OpenInExplorer"
|
"OpenInExplorer"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ GPLv2
|
|||||||
|
|
||||||
local darktable = require "darktable"
|
local darktable = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local filelib = require "lib/dtutils.file"
|
local filelib = require "lib/dtutils.file"
|
||||||
|
|
||||||
-- Forward declare the functions
|
-- Forward declare the functions
|
||||||
@@ -153,12 +152,12 @@ function get_stdout(cmd)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Registering events
|
-- Registering events
|
||||||
darktable.register_event("autostyle", "shortcut", autostyle_apply,
|
darktable.register_event("shortcut", autostyle_apply,
|
||||||
"Apply your chosen style from exiftool tags")
|
"Apply your chosen style from exiftool tags")
|
||||||
|
|
||||||
darktable.preferences.register("autostyle","exif_tag","string","Autostyle: EXIF_tag=value=>style","apply a style automatically if an EXIF_tag matches value. Find the tag with exiftool","")
|
darktable.preferences.register("autostyle","exif_tag","string","Autostyle: EXIF_tag=value=>style","apply a style automatically if an EXIF_tag matches value. Find the tag with exiftool","")
|
||||||
|
|
||||||
darktable.register_event("autostyle", "post-import-image",
|
darktable.register_event("post-import-image",
|
||||||
autostyle_apply_one_image_event)
|
autostyle_apply_one_image_event)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
-- not a number
|
-- not a number
|
||||||
@@ -71,7 +71,7 @@ dt.gui.libs.image.register_action(
|
|||||||
)
|
)
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"clearGPS", "shortcut",
|
"shortcut",
|
||||||
function(event, shortcut) clear_GPS(dt.gui.action_images) end,
|
function(event, shortcut) clear_GPS(dt.gui.action_images) end,
|
||||||
_("Clear GPS data")
|
_("Clear GPS data")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ USAGE
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local debug = require "darktable.debug"
|
local debug = require "darktable.debug"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
@@ -235,7 +234,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not cadt.event_registered then
|
if not cadt.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"cadt", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
@@ -248,22 +247,22 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- shortcut for copy
|
-- shortcut for copy
|
||||||
dt.register_event("cadt_ct", "shortcut",
|
dt.register_event("shortcut",
|
||||||
mcopy_tags,
|
mcopy_tags,
|
||||||
_('copy tags from selected image(s)'))
|
_('copy tags from selected image(s)'))
|
||||||
|
|
||||||
-- shortcut for attach
|
-- shortcut for attach
|
||||||
dt.register_event("cadt_at", "shortcut",
|
dt.register_event("shortcut",
|
||||||
attach_tags,
|
attach_tags,
|
||||||
_('paste tags to selected image(s)'))
|
_('paste tags to selected image(s)'))
|
||||||
|
|
||||||
-- shortcut for detaching tags
|
-- shortcut for detaching tags
|
||||||
dt.register_event("cadt_dt", "shortcut",
|
dt.register_event("shortcut",
|
||||||
detach_tags,
|
detach_tags,
|
||||||
_('remove tags from selected image(s)'))
|
_('remove tags from selected image(s)'))
|
||||||
|
|
||||||
-- shortcut for replace tags
|
-- shortcut for replace tags
|
||||||
dt.register_event("cadt_rt", "shortcut",
|
dt.register_event("shortcut",
|
||||||
replace_tags,
|
replace_tags,
|
||||||
_('replace tags from selected image(s)'))
|
_('replace tags from selected image(s)'))
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ USAGE
|
|||||||
|
|
||||||
local darktable = require "darktable"
|
local darktable = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
-- Tested with darktable 2.0.1
|
-- Tested with darktable 2.0.1
|
||||||
du.check_min_api_version("2.0.0", "cr2hdr")
|
du.check_min_api_version("2.0.0", "cr2hdr")
|
||||||
@@ -109,11 +108,11 @@ local function convert_action_images(shortcut)
|
|||||||
convert_images()
|
convert_images()
|
||||||
end
|
end
|
||||||
|
|
||||||
darktable.register_event("cr2hdr", "shortcut",
|
darktable.register_event("shortcut",
|
||||||
convert_action_images, "Run cr2hdr (Magic Lantern DualISO converter) on selected images")
|
convert_action_images, "Run cr2hdr (Magic Lantern DualISO converter) on selected images")
|
||||||
darktable.register_event("cr2hdr", "post-import-image",
|
darktable.register_event("post-import-image",
|
||||||
file_imported)
|
file_imported)
|
||||||
darktable.register_event("cr2hdr", "post-import-film",
|
darktable.register_event("post-import-film",
|
||||||
film_imported)
|
film_imported)
|
||||||
|
|
||||||
darktable.preferences.register("cr2hdr", "onimport", "bool", "Invoke on import", "If true then cr2hdr will try to proccess every file during importing. Warning: cr2hdr is quite slow even in figuring out on whether the file is Dual ISO or not.", false)
|
darktable.preferences.register("cr2hdr", "onimport", "bool", "Invoke on import", "If true then cr2hdr will try to proccess every file during importing. Warning: cr2hdr is quite slow even in figuring out on whether the file is Dual ISO or not.", false)
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ local dt = require "darktable"
|
|||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require("lib/dtutils.file")
|
local df = require("lib/dtutils.file")
|
||||||
local ds = require("lib/dtutils.system")
|
local ds = require("lib/dtutils.system")
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
@@ -163,7 +162,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not eL.event_registered then
|
if not eL.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"exportLUT", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local dtsys = require "lib/dtutils.system"
|
local dtsys = require "lib/dtutils.system"
|
||||||
|
|
||||||
|
|
||||||
@@ -429,7 +428,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not ee.event_registered then
|
if not ee.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
MODULE_NAME, "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module(show_dr)
|
install_module(show_dr)
|
||||||
@@ -466,7 +465,7 @@ dt.preferences.register(MODULE_NAME, "show_in_darkrooom", "bool",
|
|||||||
|
|
||||||
-- register the new shortcuts -------------------------------------------------
|
-- register the new shortcuts -------------------------------------------------
|
||||||
for i = 1, MAX_EDITORS do
|
for i = 1, MAX_EDITORS do
|
||||||
dt.register_event(MODULE_NAME .. i, "shortcut",
|
dt.register_event("shortcut",
|
||||||
program_shortcut, _("edit with program ")..string.format("%02d", i))
|
program_shortcut, _("edit with program ")..string.format("%02d", i))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ local dt = require "darktable"
|
|||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
local dtsys = require "lib/dtutils.system"
|
local dtsys = require "lib/dtutils.system"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
-- constants
|
-- constants
|
||||||
@@ -491,7 +491,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not fc.event_registered then
|
if not fc.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
MODULE, "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ cameras may behave in other ways.
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
du.check_min_api_version("4.0.0", "fujifilm_dynamic_range")
|
du.check_min_api_version("4.0.0", "fujifilm_dynamic_range")
|
||||||
local CURR_API_STRING = dt.configuration.api_version_string
|
local CURR_API_STRING = dt.configuration.api_version_string
|
||||||
@@ -106,7 +105,7 @@ local function detect_dynamic_range(event, image)
|
|||||||
dt.print_log("[fujifilm_dynamic_range] raw exposure bias " .. tostring(raf_result))
|
dt.print_log("[fujifilm_dynamic_range] raw exposure bias " .. tostring(raf_result))
|
||||||
end
|
end
|
||||||
|
|
||||||
dt.register_event("fujifilm_dr", "post-import-image",
|
dt.register_event("post-import-image",
|
||||||
detect_dynamic_range)
|
detect_dynamic_range)
|
||||||
|
|
||||||
dt.print_log("[fujifilm_dynamic_range] loaded")
|
dt.print_log("[fujifilm_dynamic_range] loaded")
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Dependencies:
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
du.check_min_api_version("4.0.0", "fujifilm_ratings")
|
du.check_min_api_version("4.0.0", "fujifilm_ratings")
|
||||||
@@ -68,7 +68,7 @@ local function detect_rating(event, image)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dt.register_event("fujifilm_rat", "post-import-image",
|
dt.register_event("post-import-image",
|
||||||
detect_rating)
|
detect_rating)
|
||||||
|
|
||||||
print(_("fujifilm_ratings loaded."))
|
print(_("fujifilm_ratings loaded."))
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ require "geoToolbox"
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
du.check_min_api_version("3.0.0", "geoToolbox")
|
du.check_min_api_version("3.0.0", "geoToolbox")
|
||||||
@@ -689,7 +689,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not gT.event_registered then
|
if not gT.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"geoToolbox", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
@@ -709,14 +709,14 @@ dt.preferences.register("geoToolbox",
|
|||||||
'' )
|
'' )
|
||||||
|
|
||||||
-- Register
|
-- Register
|
||||||
dt.register_event("geoToolbox_cd", "shortcut",
|
dt.register_event("shortcut",
|
||||||
print_calc_distance, _("Calculate the distance from latitude and longitude in km"))
|
print_calc_distance, _("Calculate the distance from latitude and longitude in km"))
|
||||||
dt.register_event("geoToolbox", "mouse-over-image-changed",
|
dt.register_event("mouse-over-image-changed",
|
||||||
toolbox_calc_distance)
|
toolbox_calc_distance)
|
||||||
|
|
||||||
dt.register_event("geoToolbox_wg", "shortcut",
|
dt.register_event("shortcut",
|
||||||
select_with_gps, _("Select all images with GPS information"))
|
select_with_gps, _("Select all images with GPS information"))
|
||||||
dt.register_event("geoToolbox_ng", "shortcut",
|
dt.register_event("shortcut",
|
||||||
select_without_gps, _("Select all images without GPS information"))
|
select_without_gps, _("Select all images without GPS information"))
|
||||||
|
|
||||||
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
|
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ For each source folder, a separate <trk> is generated in the gpx file.
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
local dl = require "lib/dtutils"
|
local dl = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
dl.check_min_api_version("3.0.0", "gpx-export")
|
dl.check_min_api_version("3.0.0", "gpx-export")
|
||||||
@@ -175,7 +175,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not gpx.event_registered then
|
if not gpx.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"gpx_export", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ local dt = require "darktable"
|
|||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
local ds = require "lib/dtutils.string"
|
local ds = require "lib/dtutils.string"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
local img_time = {}
|
local img_time = {}
|
||||||
@@ -553,7 +553,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not img_time.event_registered then
|
if not img_time.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"image_time", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local dtsys = require "lib/dtutils.system"
|
local dtsys = require "lib/dtutils.system"
|
||||||
|
|
||||||
local MODULE_NAME = "photils"
|
local MODULE_NAME = "photils"
|
||||||
@@ -454,7 +454,7 @@ dt.preferences.register(MODULE_NAME,
|
|||||||
"The embedded thumbnail could speedup the tag suggestion but can fail if the RAW file is not supported."),
|
"The embedded thumbnail could speedup the tag suggestion but can fail if the RAW file is not supported."),
|
||||||
true)
|
true)
|
||||||
|
|
||||||
dt.register_event("photils", "mouse-over-image-changed",
|
dt.register_event("mouse-over-image-changed",
|
||||||
PHOTILS.image_changed)
|
PHOTILS.image_changed)
|
||||||
|
|
||||||
if dt.gui.current_view().id == "lighttable" then
|
if dt.gui.current_view().id == "lighttable" then
|
||||||
@@ -462,7 +462,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not PHOTILS.event_registered then
|
if not PHOTILS.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"photils", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ USAGE
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local debug = require "darktable.debug"
|
local debug = require "darktable.debug"
|
||||||
|
|
||||||
local qt = {}
|
local qt = {}
|
||||||
@@ -258,7 +257,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not qt.event_registered then
|
if not qt.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"quicktag", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
@@ -271,7 +270,7 @@ end
|
|||||||
|
|
||||||
-- create shortcuts
|
-- create shortcuts
|
||||||
for i=1,qnr do
|
for i=1,qnr do
|
||||||
dt.register_event("quicktag", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut) tagattach(tostring(quicktag_table[i])) end,
|
function(event, shortcut) tagattach(tostring(quicktag_table[i])) end,
|
||||||
string.format(_("quicktag %i"),i))
|
string.format(_("quicktag %i"),i))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
-- added version check
|
-- added version check
|
||||||
du.check_min_api_version("3.0.0", "rate_group")
|
du.check_min_api_version("3.0.0", "rate_group")
|
||||||
@@ -61,37 +60,37 @@ local function apply_rating(rating)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dt.register_event("rg_reject", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(-1)
|
apply_rating(-1)
|
||||||
end, "Reject group")
|
end, "Reject group")
|
||||||
|
|
||||||
dt.register_event("rg0", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(0)
|
apply_rating(0)
|
||||||
end, "Rate group 0")
|
end, "Rate group 0")
|
||||||
|
|
||||||
dt.register_event("rg1", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(1)
|
apply_rating(1)
|
||||||
end, "Rate group 1")
|
end, "Rate group 1")
|
||||||
|
|
||||||
dt.register_event("rg2", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(2)
|
apply_rating(2)
|
||||||
end, "Rate group 2")
|
end, "Rate group 2")
|
||||||
|
|
||||||
dt.register_event("rg3", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(3)
|
apply_rating(3)
|
||||||
end, "Rate group 3")
|
end, "Rate group 3")
|
||||||
|
|
||||||
dt.register_event("rg4", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(4)
|
apply_rating(4)
|
||||||
end, "Rate group 4")
|
end, "Rate group 4")
|
||||||
|
|
||||||
dt.register_event("rg5", "shortcut",
|
dt.register_event("shortcut",
|
||||||
function(event, shortcut)
|
function(event, shortcut)
|
||||||
apply_rating(5)
|
apply_rating(5)
|
||||||
end, "Rate group 5")
|
end, "Rate group 5")
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ Changes
|
|||||||
|
|
||||||
local darktable = require "darktable"
|
local darktable = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local debug = require "darktable.debug"
|
local debug = require "darktable.debug"
|
||||||
|
|
||||||
-- check API version
|
-- check API version
|
||||||
@@ -138,7 +137,7 @@ if darktable.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not rt.event_registered then
|
if not rt.event_registered then
|
||||||
darktable.register_event(
|
darktable.register_event(
|
||||||
"rename_tags", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ USAGE
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
du.check_min_api_version("2.0.2", "slideshowMusic")
|
du.check_min_api_version("2.0.2", "slideshowMusic")
|
||||||
@@ -79,5 +79,5 @@ dt.preferences.register("slideshowMusic",
|
|||||||
_("Plays music with rhythmbox if a slideshow starts"),
|
_("Plays music with rhythmbox if a slideshow starts"),
|
||||||
true)
|
true)
|
||||||
-- Register
|
-- Register
|
||||||
dt.register_event("slideshow_music", "view-changed",
|
dt.register_event("view-changed",
|
||||||
playSlideshowMusic)
|
playSlideshowMusic)
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ local darktable = require("darktable")
|
|||||||
local dtutils = require("lib/dtutils")
|
local dtutils = require("lib/dtutils")
|
||||||
local dtutils_file = require("lib/dtutils.file")
|
local dtutils_file = require("lib/dtutils.file")
|
||||||
local dtutils_system = require("lib/dtutils.system")
|
local dtutils_system = require("lib/dtutils.system")
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local LIB_ID = "transfer_hierarchy"
|
local LIB_ID = "transfer_hierarchy"
|
||||||
dtutils.check_min_api_version("5.0.0", LIB_ID)
|
dtutils.check_min_api_version("5.0.0", LIB_ID)
|
||||||
@@ -368,7 +367,7 @@ if darktable.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not th.event_registered then
|
if not th.event_registered then
|
||||||
darktable.register_event(
|
darktable.register_event(
|
||||||
LIB_ID, "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ https://www.darktable.org/lua-api/index.html.php#darktable_new_widget
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
du.check_min_api_version("3.0.0", "moduleExample")
|
du.check_min_api_version("3.0.0", "moduleExample")
|
||||||
local CURR_API_STRING = dt.configuration.api_version_string
|
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
|
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
|
-- https://www.darktable.org/lua-api/index.html#darktable_register_event
|
||||||
dt.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)
|
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
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then -- if the view changes from darkroom to lighttable
|
||||||
install_module() -- register the lib
|
install_module() -- register the lib
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
require "lib/..." provides access to functions that have been pulled from various
|
require "lib/..." provides access to functions that have been pulled from various
|
||||||
@@ -243,7 +242,7 @@ dt.gui.libs.image.register_action(
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"multi_os", "shortcut",
|
"shortcut",
|
||||||
function(event, shortcut) extract_embedded_jpeg(dt.gui.action_images) end,
|
function(event, shortcut) extract_embedded_jpeg(dt.gui.action_images) end,
|
||||||
"extract embedded jpeg"
|
"extract embedded jpeg"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ USAGE
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
du.check_min_api_version("3.0.0", "copy_paste_metadata")
|
du.check_min_api_version("3.0.0", "copy_paste_metadata")
|
||||||
@@ -127,13 +126,13 @@ dt.gui.libs.image.register_action(
|
|||||||
)
|
)
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"capmd1", "shortcut",
|
"shortcut",
|
||||||
function(event, shortcut) copy(dt.gui.action_images[1]) end,
|
function(event, shortcut) copy(dt.gui.action_images[1]) end,
|
||||||
"copy metadata"
|
"copy metadata"
|
||||||
)
|
)
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"capmd2", "shortcut",
|
"shortcut",
|
||||||
function(event, shortcut) paste(dt.gui.action_images) end,
|
function(event, shortcut) paste(dt.gui.action_images) end,
|
||||||
"paste metadata"
|
"paste metadata"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ local dt = require "darktable"
|
|||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
local dtsys = require "lib/dtutils.system"
|
local dtsys = require "lib/dtutils.system"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||||
local CURR_API_STRING = dt.configuration.api_version_string
|
local CURR_API_STRING = dt.configuration.api_version_string
|
||||||
@@ -270,7 +269,7 @@ if enfuse_installed then
|
|||||||
else
|
else
|
||||||
if not enf.event_registered then
|
if not enf.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"enfuse", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ USAGE
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
require "darktable.debug"
|
require "darktable.debug"
|
||||||
|
|
||||||
du.check_min_api_version("2.1.0", "generate_image_txt")
|
du.check_min_api_version("2.1.0", "generate_image_txt")
|
||||||
@@ -67,7 +66,7 @@ end
|
|||||||
local command_setting = dt.preferences.read("generate_image_txt", "command", "string")
|
local command_setting = dt.preferences.read("generate_image_txt", "command", "string")
|
||||||
check_command(command_setting)
|
check_command(command_setting)
|
||||||
|
|
||||||
dt.register_event("gen_img_txt", "mouse-over-image-changed",
|
dt.register_event("mouse-over-image-changed",
|
||||||
function(event, img)
|
function(event, img)
|
||||||
-- no need to waste processing time if the image has a txt file already
|
-- no need to waste processing time if the image has a txt file already
|
||||||
if not img or img.has_txt or not dt.preferences.read("generate_image_txt", "enabled", "bool") then
|
if not img or img.has_txt or not dt.preferences.read("generate_image_txt", "enabled", "bool") then
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ This plugin will add a widget at the bottom of the left column in lighttable mod
|
|||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
du.check_min_api_version("2.0.0", "image_path_in_ui")
|
du.check_min_api_version("2.0.0", "image_path_in_ui")
|
||||||
local CURR_API_STRING = dt.configuration.api_version_string
|
local CURR_API_STRING = dt.configuration.api_version_string
|
||||||
@@ -86,7 +85,7 @@ else
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dt.register_event("ipiu", "mouse-over-image-changed", reset_widget);
|
dt.register_event("mouse-over-image-changed", reset_widget);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
|
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ USAGE
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local import_filter_list = {}
|
local import_filter_list = {}
|
||||||
local n_import_filters = 1
|
local n_import_filters = 1
|
||||||
@@ -58,7 +57,7 @@ dt.gui.libs.import.register_widget(filter_dropdown)
|
|||||||
|
|
||||||
|
|
||||||
-- this is just a wrapper which calls the active import filter
|
-- this is just a wrapper which calls the active import filter
|
||||||
dt.register_event("ifm", "pre-import", function(event, images)
|
dt.register_event("pre-import", function(event, images)
|
||||||
local active_filter = dt.preferences.read("import_filter_manager", "active_filter", "string")
|
local active_filter = dt.preferences.read("import_filter_manager", "active_filter", "string")
|
||||||
if active_filter == "" then return end
|
if active_filter == "" then return end
|
||||||
local callback = import_filter_list[active_filter]
|
local callback = import_filter_list[active_filter]
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ increase it if you need more temporary selection buffers
|
|||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
require "lib/darktable_transition"
|
|
||||||
du.check_min_api_version("2.0.0", "save_selection")
|
du.check_min_api_version("2.0.0", "save_selection")
|
||||||
local CURR_API_STRING = dt.configuration.api_version_string
|
local CURR_API_STRING = dt.configuration.api_version_string
|
||||||
|
|
||||||
@@ -43,16 +43,16 @@ local buffer_count = 5
|
|||||||
|
|
||||||
for i=1,buffer_count do
|
for i=1,buffer_count do
|
||||||
local saved_selection
|
local saved_selection
|
||||||
dt.register_event("save_selection", "shortcut", function()
|
dt.register_event("shortcut", function()
|
||||||
saved_selection = dt.gui.selection()
|
saved_selection = dt.gui.selection()
|
||||||
end,"save to buffer "..i)
|
end,"save to buffer "..i)
|
||||||
dt.register_event("save_selection1", "shortcut", function()
|
dt.register_event("shortcut", function()
|
||||||
dt.gui.selection(saved_selection)
|
dt.gui.selection(saved_selection)
|
||||||
end,"restore from buffer "..i)
|
end,"restore from buffer "..i)
|
||||||
end
|
end
|
||||||
|
|
||||||
local bounce_buffer = {}
|
local bounce_buffer = {}
|
||||||
dt.register_event("save_selection2", "shortcut", function()
|
dt.register_event("shortcut", function()
|
||||||
bounce_buffer = dt.gui.selection(bounce_buffer)
|
bounce_buffer = dt.gui.selection(bounce_buffer)
|
||||||
end,"switch selection with temporary buffer")
|
end,"switch selection with temporary buffer")
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local du = require "lib/dtutils"
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
du.check_min_api_version("5.0.0", "executable_manager")
|
du.check_min_api_version("5.0.0", "executable_manager")
|
||||||
|
|
||||||
@@ -216,7 +215,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not exec_man.event_registered then
|
if not exec_man.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"executable_manager", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ local df = require "lib/dtutils.file"
|
|||||||
local ds = require "lib/dtutils.string"
|
local ds = require "lib/dtutils.string"
|
||||||
local dtsys = require "lib/dtutils.system"
|
local dtsys = require "lib/dtutils.system"
|
||||||
local log = require "lib/dtutils.log"
|
local log = require "lib/dtutils.log"
|
||||||
require "lib/darktable_transition"
|
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
@@ -875,7 +874,7 @@ if dt.gui.current_view().id == "lighttable" then
|
|||||||
else
|
else
|
||||||
if not sm.event_registered then
|
if not sm.event_registered then
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
"script_manager", "view-changed",
|
"view-changed",
|
||||||
function(event, old_view, new_view)
|
function(event, old_view, new_view)
|
||||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||||
install_module()
|
install_module()
|
||||||
|
|||||||
Reference in New Issue
Block a user