Skip to content

Commit 69b846a

Browse files
authored
Merge pull request darktable-org#319 from wpferguson/api_6_2_2_register_selection
API 6.2.2 compatibility
2 parents b9804d9 + 1460396 commit 69b846a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/select_untagged.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ du.check_min_api_version("3.0.0", "select_untagged")
2626

2727
-- Tell gettext where to find the .mo file translating messages for a particular domain
2828
gettext.bindtextdomain("select_untagged",dt.configuration.config_dir.."/lua/locale/")
29+
local CURR_API_STRING = dt.configuration.api_version_string
2930

3031
local function _(msgid)
3132
return gettext.dgettext("select_untagged", msgid)
@@ -62,4 +63,7 @@ local function select_untagged_images()
6263
dt.gui.selection(selection)
6364
end
6465

65-
dt.gui.libs.select.register_selection(_("select untagged"),select_untagged_images,_("select all images containing no tags or only tags added by darktable"))
66+
dt.gui.libs.select.register_selection(
67+
CURR_API_STRING >= "6.2.2" and "select_untagged", _("select untagged") or _("select untagged") ,
68+
select_untagged_images,
69+
_("select all images containing no tags or only tags added by darktable"))

0 commit comments

Comments
 (0)