- local MAX_EDITORS = 9
- -- number of valid entries in the list of external programs
- local n_entries
- -- allowed file extensions for external editors
- local allowed_file_types = {"JPG", "jpg", "JPEG", "jpeg", "TIF", "tif", "TIFF", "tiff", "EXR", "exr", "PNG", "png"}
- -- last used editor initialization
- if not dt.preferences.read(MODULE_NAME, "initialized", "bool") then
- dt.preferences.write(MODULE_NAME, "lastchoice", "integer", 0)
- dt.preferences.write(MODULE_NAME, "initialized", "bool", true)
- end
- local lastchoice = 0
- -- update lists of program names and paths, as well as combobox ---------------
- local function UpdateProgramList(combobox, button_edit, button_edit_copy, update_button_pressed)