I have a program with a pretty complex number-crunching logic and quite a few configuration parameters. The program is (almost) non-interactive and is configured via command-line arguments and configuration files.
I have been asked to add GUI to this program. Naturally, this GUI has to contain a configuration screen (tab, whatever) with all the required parameters. I have never done any serious GUI before in my life, so I’m not sure how to approach this task.
Of course, it is possible to load a configuration file and create the required widgets. However, using this approach the widget labels will be “technical and not informative”. I’m looking for a way to store human-readable parameter names, as well as tooltip brings only a minimal additional burden for maintenance of the parameters, labels and tooltip text. Is storing this information withing the default configuration file using a self-made format a good approach?
FWIW I’m writing the GUI in wxPython and my configuration files are ConfigObj files. The program will be used by my team mates, so malicious user scenario is not considered.
The usual approach uses several parts.
First, you have the code that builds the UI. This reads a file with the texts for all the labels and buttons and tooltips and puts them in the right place.
The second part is code which reads and writes the config file. You want to use technical keys in the config file (= readable only for some humans) to avoid problems when new languages are added to the UI (you don’t want the config keys to change when someone translates the UI to German).
So each UI element will have an technical ID. In the config for the texts, you will use
ID.labelandID.tooltip. In the “real” config (a.k.a preferences), you will use the ID to map the selected value to the UI element.