GUI: U32: Downscale changes of U32, fix review issues

This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
This commit is contained in:
aryanrawlani28 2020-07-20 18:06:37 +05:30 committed by Eugene Sandulenko
parent cbff58200f
commit 68d01321d6
32 changed files with 135 additions and 121 deletions

View file

@ -519,10 +519,9 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
// The encoding we need to use is UTF-8. Assume we currently have the
// current TranslationManager encoding or ISO-8859-1.
char *utf8_text = SDL_iconv_string("UTF-8", TransMan.getCurrentCharset().c_str(), text.encode().c_str(), text.size() + 1);
char *utf8_text = (char *)text.encode().c_str();
if (utf8_text) {
int status = SDL_SetClipboardText(utf8_text);
SDL_free(utf8_text);
return status == 0;
}
return SDL_SetClipboardText(text.encode().c_str()) == 0;