xbmc/xbmc — pull request #3573 by jmarshallnz (2013-11-05 07:53:34+00:00)
Title: Support a textbox in dialogs derived from dialogboxbase (ok, yes/no, progress etc.)

This is an alternate implementation to #3416 which gets rid of the silliness of having 3 lines in these dialogs rather than using a textbox. Note that the functionality to set text directly on these dialogs is currently unused - this simply lays the groundwork.

The most obvious advantage is that we can fully specify the text for dialog rather than splitting it up - this allows much better translation as translators aren't as constrained in terms of the width of the labels or the English splitting.

If a skin has a textbox we'll use it. If not, it continues to display the first 3 lines. Obviously we should encourage skinners to adopt this.

Two things need review:
1.8b8b46a I've moved the setting of heading/label etc. to use guarded members, and update them in the dialog in Process(). Previously it was done through (thread-safe) UI messages as well as setting unguarded members. The new implementation is safer, but it does mean a critical section.

2. 7b10532 switches to a single string rather than a vector of lines. It's a little more cumbersome given we always call these routines currently using SetLine(). This may change later for some dialogs, but not for others (e.g. progress dialog we almost always update one line at a time) so pros 'n cons.

Comments welcome.