Give some love to LUA preferences#20694
Give some love to LUA preferences#20694masterpiga wants to merge 2 commits intodarktable-org:masterfrom
Conversation
|
I like it but I'll let @wpferguson have the final word on this. Thanks @masterpiga and Claude. |
|
@masterpiga I like it. You can take out I'm trying to decide about
I'll play with it a little bit. Thanks @masterpiga and Claude |
|
After a little testing.... Boy, it's so much nicer... I tried option 2 above, script_data.metadata.name and it works. However, that is translatable and I'm not sure how well Lua with handle the translated string, so I think it's probably best to go with the additional function. That way we don't have compatibility issues. It's good for me. Thanks again @masterpiga EDIT: @TurboGit 👍 👍 |
|
Glad that you like it, @wpferguson and @TurboGit :) @wpferguson so in the end I am not sure if you asked for any changes other than the handling of |
Correct
Yes, it's going to go away in a few weeks (or less, I hope). If you don't include it in the _global_scripts, it will hang around as a separate entry in the combobox and then just disappear when it's removed. |
|
Thanks for clarifying, @wpferguson. Done. |
Lua preferences UI improvements
Addresses #20692 — the flat, unsorted list of Lua preferences is replaced with a structured UI.
Co-authored with Claude.
As requested by @wpferguson.
Screen.Recording.2026-03-28.at.07.31.42.mp4
UI changes
script_manager,_scripts_install) keep their preferences at the top level, ungroupedNew Lua API
Scripts can register a human-readable display name used in the combobox:
Falls back to the internal script name if no display name is registered.
Bug fixes
destroy_tab_lua: the extrag_object_refbeforegtk_container_removewas unnecessary (the widget is already kept alive bypref_elementviag_object_ref_sink) and was never balancedGtkSizeGroupleak on early return when no per-script preferences existCode cleanup
dt_ui_label_newinstead ofgtk_label_newper GUI guidelines (ensures proper text ellipsization)read_prefinto a single fallthroughwrite_prefinto a single fallthroughresponse_callback_dirandresponse_callback_fileintoresponse_callback_filechooser