On 5/26/10, David Anderson <[email protected]> wrote:
> Another idea (pseudocode):
>
> x = _("Transfer at most %1 MB every %2 days")
> (a,b,c) = split x at %* boundaries
> if %1 precedes %2 in x
> insert a, text field for MB, b, text field for days, c
> else
> insert a, text field for days, b, text field for MB, c
>
> We could use this idea everywhere a control breaks up a string
That doesn't scale to three placeholders though.
I managed to generalize it to the point you can do this:
mbField = new wxTextCtrl(...);
mbField->SetToolTip(...);
daysField = new wxTextCtrl(...);
daysField->SetToolTip(...);
buildLayout(sizer, _("Transfer at most %1 MB every %2 days"), mbField,
daysField);
But some of the code is still too clever for its own good. And I'm
only using it in two prefs; I still have time to hit problems trying
to fit it to the rest :)
--
Nicolas
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.