@Coises, @Alan-Kilborn, @PeterJones
Let me attempt to summarize, hopefully for someone’s benefit, what we know so far:
Problem 1: cryptic language identifiers in the Tab Settings list box
Cause: the window procedure that fills Tab Settings uses an instance of this Lang structure, which has a _langName member, filled by the name= attribute of langs.xml, which is identical to the Lexilla language identifier so that N++ can send it, unmodified, directly to Scintilla when creating the lexer (convenient for the developer, less so for end users).
Potential Solution: There is already a ScintillaEditView::_langNameInfoArray type with a more readable _shortName member. The approriate _shortName could be looked up using the enumerated _langID which every Lang instance already has; or else the Lang type can be refactored to store it’s own pretty name.
Problem 2: the first item, “[Default]”, is always selected in the Tab Settings listbox
Cause: the window procedure that fills Tab Settings does this on purpose by always passing a 0 index to the dialog window.
Potential Solution: the window procedure that sets the preference dialog needs access to an instance ScintillaEditView, which can look up the active lexer by calling getCurrentBuffer()->getCurrentLang(), then setting the index of the selected item appropriately.
Sound like fun? Well, that’s Win32 GUI programming in C++ for you.