changes after review

This commit is contained in:
deekayhd
2026-03-19 10:15:26 +01:00
parent 03eb79e83a
commit 2635e261a0

View File

@@ -96,11 +96,6 @@ local function stop_job(job)
job.valid = false
end
local function reset_callback()
rename.widgets.pattern.text = ""
dt.preferences.write(MODULE_NAME, "pattern", "string", rename.widgets.pattern.text)
end
local function install_module()
if not rename.module_installed then
dt.register_lib(
@@ -110,9 +105,6 @@ local function install_module()
true,
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_RIGHT_CENTER",700}},
dt.new_widget("box"){
reset_callback = function (self)
reset_callback()
end,
orientation = "vertical",
rename.widgets.pattern,
rename.widgets.button,
@@ -201,7 +193,10 @@ end
rename.widgets.pattern = dt.new_widget("entry"){
tooltip = ds.get_substitution_tooltip(),
placeholder = _("enter pattern") .. "$(FILE_FOLDER)/$(FILE_NAME)",
text = ""
text = "",
reset_callback = function(self)
self.text = ""
end
}
local pattern_pref = dt.preferences.read(MODULE_NAME, "pattern", "string")