Being able to tell different windows apart when they run different processes is important. To that end, I have a .bashrc that creates a random "bgcolor" preference into lxterminal.conf each time Bash starts. Unfortunately, lxterminal only reads the preferences once, on start-up, and new windows do not see the new preferences.
This patch makes lxterminal read preferences once per window, instead of only during startup. It also cleans up the setting struct when the window goes away, to avoid leaking memory. Finally, it fixes a few compiler warnings.
Based on 0.1.11, tested on Ubuntu 10.04 LTS.