Commit Graph
137148 Commits
Author SHA1 Message Date
aryanrawlani28 d4a280ef29 BACKENDS: DIALOGS: GTK: Fix incorrect memory usage & replace unsafe code.
- Encoding::convert which was previously used needed to be freed by the caller.
- With the direct conversion to utf8 by .encode(), this doesn't need to happen anymore
2020-08-30 14:43:41 +02:00
aryanrawlani28 d2da98d3b0 GLK: More usage of translations
- Add helpers in Advsys, Comprehend & ZCode to match functionality provided for strings.
2020-08-30 14:43:41 +02:00
aryanrawlani28 dd31b45be3 GLK: SCOTT: Fix unsafe memory usage 2020-08-30 14:43:41 +02:00
aryanrawlani28 dfc53b60e3 3DS: Use U32Strings for options dialog. 2020-08-30 14:43:41 +02:00
aryanrawlani28 f295d642a1 DS: Use U32Strings for Options dialog. 2020-08-30 14:43:41 +02:00
aryanrawlani28 ad20df4b27 SYMBIAN: Properly return U32String when get action name. 2020-08-30 14:43:41 +02:00
aryanrawlani28 6b7c646ba4 WII: Use U32Strings for options dialog. 2020-08-30 14:43:41 +02:00
Thierry Crozat 58d13fb863 IPHONE: Fix compilation 2020-08-30 14:43:41 +02:00
Thierry Crozat e3c1fece97 IOS7: Fix compilation 2020-08-30 14:43:41 +02:00
aryanrawlani28 840f08d537 GUI: U32: Code cleanup & misc fixes
- Fix a translation for scumm subtitle settings dialogs.
2020-08-30 14:43:41 +02:00
aryanrawlani28 edec55cf64 GLK: SCOTT: Add new helpers to use translated strings. 2020-08-30 14:43:41 +02:00
aryanrawlani28 e29e5f1156 GUI: TTS: Fix compilation
- While building options, TTS used some translations-dependant variables.
2020-08-30 14:43:41 +02:00
aryanrawlani28 87df975686 GUI: U32: Wrap string in U32 if not using translations. 2020-08-30 14:43:41 +02:00
aryanrawlani28 bc8ead4a7c AGOS: GUI: U32: Remove redundant code 2020-08-30 14:43:41 +02:00
aryanrawlani28 c87d0d6834 BACKENDS: NETWORKING: Remove unused toUtf8 helper
- All conversions are handled by Common:: helpers.
2020-08-30 14:43:41 +02:00
aryanrawlani28 8c5611c3ca GUI: U32: Fix unused u32format where translations are used.
- Misc: Remove incorrect space.
2020-08-30 14:43:41 +02:00
Thierry Crozat 1e8cb29a54 IOS7: Fix memory leak and compilation for copy to clipboard 2020-08-30 14:43:41 +02:00
Thierry Crozat caa8a5d7bb MACOSX: Fix memory leak in copy to clipboard 2020-08-30 14:43:41 +02:00
aryanrawlani28 d48453693c GUI: U32: Use translated strings as arguments for formatting function usage. 2020-08-30 14:43:41 +02:00
aryanrawlani28 140eddf90a GUI: U32: Allow vformat to take in a pointer to a translated string
- Fix signed/unsigned comparision in U32String::contains(U32String)
2020-08-30 14:43:41 +02:00
aryanrawlani28 6fa5d7ee2f CRYOMNI3D: Assign char outside if condition to avoid ambiguity with new contains utility 2020-08-30 14:43:41 +02:00
aryanrawlani28 1d85a3d8e1 GUI: U32: Fix incorrect type for single char in U32::vformat 2020-08-30 14:43:41 +02:00
aryanrawlani28 a647812bfb iOS: Use U32 for clipboards. 2020-08-30 14:43:41 +02:00
aryanrawlani28 3fc336300f 3DS: Use U32Strings for displaying OSD Messages 2020-08-30 14:43:41 +02:00
aryanrawlani28 388473656e GUI: U32: Add contains utility for string, which takes in a uint. 2020-08-30 14:43:41 +02:00
aryanrawlani28 3c79c2a519 GUI: U32: Fix incorrect format specifier for aspect ratio message. 2020-08-30 14:43:41 +02:00
aryanrawlani28 1950e38154 ANDROID: Support OSD Messages for U32. 2020-08-30 14:43:41 +02:00
Thierry Crozat a54b5826ea UPDATES: Fix compilation with U32 strings 2020-08-30 14:43:41 +02:00
aryanrawlani28 a9c5e930f0 ANDROID: Make clipboards work with U32Strings. 2020-08-30 14:43:41 +02:00
aryanrawlani28 f0ad817716 SDL: Fix clipboard fetching internally
- This doesn't mean that it displays properly in the GUI, but it does return the proper value from getTextFromClipboard.
2020-08-30 14:43:41 +02:00
aryanrawlani28 35386aab4c TTS: Remove more redundant code 2020-08-30 14:43:41 +02:00
Thierry Crozat 66342fb89c TTS: Fix conversion to UTF-32 for text to speak 2020-08-30 14:43:41 +02:00
Thierry Crozat dc977ffd85 GLK: Avoid back and forth conversion between UTF-32 and UTF-8 for TTS 2020-08-30 14:43:41 +02:00
Thierry Crozat 94035cf7aa COMMON: Fix creating a String from a U32String
There were memory issues due to class member variables not initialized
by the constructor.
2020-08-30 14:43:41 +02:00
Thierry Crozat 733df0bfa1 MACOSX: Fix getting text from clipboard 2020-08-30 14:43:41 +02:00
Thierry Crozat 58203e09fd COMMON: Fix encoding conversion using iconv
It was not always setting to 0 all the newly allocated bytes,
and if you were unlucky this could result in additional spurious
characters at the end of the converted string.
2020-08-30 14:43:41 +02:00
aryanrawlani28 f9b05f5e5a BACKENDS: DIALOGS: MACOS: Improve readability and remove redundant code. 2020-08-30 14:43:41 +02:00
aryanrawlani28 0ca5a40d85 TTS: ALL: Improve u32-ity
- Allow the base class to take in a string with custom charset, convert to U32 and pass it along.
- Remove redudandant functions in all tts-subsystems
- Remove unnecessary "charset" argument, as U32Strings imply that we are using a UTF-32 charset
- Adjust relative code appropriately according to the above point.
2020-08-30 14:43:41 +02:00
Thierry Crozat 1e5788d048 I18N: Improve utf-8 check in create_translations 2020-08-30 14:43:41 +02:00
Thierry Crozat 9737b0d300 I18N: Add missing EOL in create_translations error message 2020-08-30 14:43:41 +02:00
aryanrawlani28 95aae12527 GUI: ULTIMA: Use u32 strings for keymap description 2020-08-30 14:43:41 +02:00
aryanrawlani28 01176e43f7 GUI: U32: Use unicode based generateGameReport correctly in all places
- UnknownGameDialog: Use u32 for gameReport dependant functions
2020-08-30 14:43:41 +02:00
aryanrawlani28 f95762881e GUI: U32: Use unicode strings for native Windows dialogs
These make use of newly added win-wrapper UTF8ToUnicode.
2020-08-30 14:43:41 +02:00
aryanrawlani28 93cb408c05 BACKENDS: WIN32: Add UTF8ToUnicode for Win32wrapper
- The new changes for converting GUI to U32 will need these.
- Provide missing notes for codepage params in other wrapper functions
2020-08-30 14:43:41 +02:00
aryanrawlani28 9bf3f73d8a GUI: U32: Use U32Strings for native dialogs
- Make DialogManager showFileBrowser take in u32
- Show filebrowser with u32 in MacOS and GTK
2020-08-30 14:43:41 +02:00
aryanrawlani28 2ca907b4a2 GUI: U32: Use game-list filters with u32
- Add a contains utility function to ustr
- setFilter uses U32String and U32Tokenizers
- Make consequent changes in launcher to allow sending u32strings
2020-08-30 14:43:41 +02:00
aryanrawlani28 56911beea2 GUI: U32: Add and use a U32Tokenizer
- Added in common/tokenizer.cpp
- Uses iterators to function
2020-08-30 14:43:41 +02:00
aryanrawlani28 12e4f871a3 GUI: U32: Improve u32 in all engine subsystems
- Common: add wordWrap function to ustr.cpp
- Bladerunner: Explicitly state we have a U32String in subs (same as Subtitles::loadOuttakeSubsText)
- Don't use translations for engine specific "put strings", because they might not support.
- SCI: Use const references for showScummVMDialog
- SCUMM:
-- Don't use translation in md5 warning. left comments with the translated version.
-- Remove some redundant headers in help.cpp
-- Don't use translation in handleSaveload when printing to console
-- Also, display success transaction correctly via u32::format
- TESTBED: Use fake constructor when setting label of button
- SKY: Correctly use translation when using SaveStateDescription
- ULTIMA: Don't use translations when display_string
- ENGINES:
-- GenerateUnknownGameReport correctly, with proper translations.
-- There was an error, where a function had been declared twice, in a header file. Correct this.
2020-08-30 14:43:41 +02:00
aryanrawlani28 68d01321d6 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
2020-08-30 14:43:41 +02:00
aryanrawlani28 cbff58200f GUI: U32: Use u32 for EditRecordDialog and RecorderDialog
- Mark _authors as U32String
- Adjust accordingly in EditRecordDialog
- Some janitorial whitespaces fixes
2020-08-30 14:43:41 +02:00