Merge pull request #319 from wpferguson/api_6_2_2_register_selection

API 6.2.2 compatibility
This commit is contained in:
wpferguson
2021-02-04 23:07:56 -05:00
committed by GitHub

View File

@@ -26,6 +26,7 @@ du.check_min_api_version("3.0.0", "select_untagged")
-- Tell gettext where to find the .mo file translating messages for a particular domain
gettext.bindtextdomain("select_untagged",dt.configuration.config_dir.."/lua/locale/")
local CURR_API_STRING = dt.configuration.api_version_string
local function _(msgid)
return gettext.dgettext("select_untagged", msgid)
@@ -62,4 +63,7 @@ local function select_untagged_images()
dt.gui.selection(selection)
end
dt.gui.libs.select.register_selection(_("select untagged"),select_untagged_images,_("select all images containing no tags or only tags added by darktable"))
dt.gui.libs.select.register_selection(
CURR_API_STRING >= "6.2.2" and "select_untagged", _("select untagged") or _("select untagged") ,
select_untagged_images,
_("select all images containing no tags or only tags added by darktable"))