[contrib/select_untagged] Added check for API 6.2.2 and added name

field to register_selection if it is
This commit is contained in:
wpferguson
2021-02-04 23:04:21 -05:00
parent da0235ab27
commit 1460396d4f

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"))