Juergen Spitzmueller wrote:
> I had a look at this again. The problem is that we only have the
> translated names (from the combo) if we are requesting the contents of
> the toc browser. Since we cannot just "translate back", the only
> alternative to compare against translated strings is, AFAICS, to store
> the translated gui names and its corresponding types in another vector
> (or map, I don't know what is to be perferred). Cf. attached patch.
> 
> What do you think?

Haven't looked at the patch, but this is something that we do elsewhere.
The clean and elegant solution, IMO, would be to have a LyXComboBox that
derives from (or stores internally --- probably better) QComboBox which
would store the "identifier" string. QComboBox would show the "translated"
string, but LyXComboBox->text() would return the "identifier" string.

Ie, nothing more than you're suggesting, but wrapped up inside a OO
interface.

-- 
Angus

Reply via email to