WMaker: rewrote generation of title for the Icon Chooser to avoid problems
The original code did have a few weaknesses, including:
- possible buffer overflow, if the translation was too long;
- possible crash, if either instance or class is NULL but not both
Now the appropriate length is calculated (not counting on a margin) and the
string is generated with the available elements.
As a side note, the variable was renamed from 'tmp' to 'title' for clarity.
This was highlighted by cppcheck (thanks to David Maciejak) and by
Coverity (bug #50078).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>