Commit Graph

7417 Commits

Author SHA1 Message Date
aryanrawlani28
9edc2f0a0a BACKENDS: DS: Fix compilation error arisen due to extra U32 wrappers. 2020-08-30 21:45:29 +02:00
aryanrawlani28
2fdb7bb894 BACKENDS: PSP: Fix compilation due to incorrect type in TimedMessageDialog 2020-08-30 20:03:26 +01:00
Thierry Crozat
3fc952a999 MACOSX: Fix compilation with SDK 10.4 (hopefully) 2020-08-30 19:42:19 +01:00
Thierry Crozat
d158866505 BACKENDS: Fix discord presence compilation with U32String 2020-08-30 14:43:41 +02:00
aryanrawlani28
a089fe47e7 BACKENDS: Display messages on OSD takes in U32Strings for modular backend. 2020-08-30 14:43:41 +02:00
aryanrawlani28
984e7fae99 BACKENDS: DIALOGS: Remove redundant code for GTK Dialogs.
- Dialogs take in const gchar *, so no need to convert to char* and then pass it along.
2020-08-30 14:43:41 +02:00
aryanrawlani28
455a05b059 BACKENDS: SDL: Remove redundant code when set text in clipboard. 2020-08-30 14:43:41 +02:00
aryanrawlani28
4cef06d7a8 BACKENDS: WIN32: Use calloc to allocate memory for UTF8ToUnicode wrapper. 2020-08-30 14:43:41 +02:00
aryanrawlani28
c855f6259a GUI: U32: Fix incorrect code for redirecting constructors.
- The changes previously were creating a temporary object whose lifetime was limited to that line.
- Additionally, use Strings instead of const char* in MessageDialogs.
2020-08-30 14:43:41 +02:00
aryanrawlani28
29b6274e67 BACKENDS: CLIPBOARD: Improve usage for SDL & Android.
- Fix possible issue for setting text inside clipboard for SDL.
- Always return a decoded string when from UTF-8 in Android when fetch clipboard.
2020-08-30 14:43:41 +02:00
aryanrawlani28
d41d0e9b22 JANITORIAL: Fix formatting issues 2020-08-30 14:43:41 +02:00
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
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
c87d0d6834 BACKENDS: NETWORKING: Remove unused toUtf8 helper
- All conversions are handled by Common:: helpers.
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
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
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
Thierry Crozat
733df0bfa1 MACOSX: Fix getting text from clipboard 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
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
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
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
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
bd19eaa5bf GUI: U32: More code improvements in engines and misc fixes
- Xeen's GUIError now takes in U32String
- Scumm's ValueDisplayDialog takes in U32
- Mohawk's InfoDialog & PauseDialog takes in U32
- Mohawk - in riven.cpp, Some assignment fixes
- Backends -in sdl.cpp, Remove incorrect conversion from iso8859 when setting text in clipboard
- Graphics - Add u32 strings instead of decoding each piece in format
2020-08-30 14:43:41 +02:00
aryanrawlani28
f46be5c766 GUI: U32: Improve splitting osd messages
Use iterators for construction instead of continous adding
2020-08-30 14:43:41 +02:00
aryanrawlani28
d12c6c4338 GUI: U32: Code cleanup
- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp
2020-08-30 14:43:41 +02:00
aryanrawlani28
185fb72783 GUI: U32: Improve U32 code
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
2020-08-30 14:43:41 +02:00
aryanrawlani28
e91f968992 GUI: U32: encode and use c strings for translations in macos dialogs 2020-08-30 14:43:41 +02:00
aryanrawlani28
8cfa8a5589 GUI: U32: Use u32 for menu items in mac 2020-08-30 14:43:41 +02:00
aryanrawlani28
4bcac1df17 GUI: U32: Use u32 in clipboards for MacOS 2020-08-30 14:43:41 +02:00
aryanrawlani28
a9bfe35216 GUI: U32: More issue fixes and general improvements
- Use the fake constructor for message dialog less often
- solve errors regarding comparision between string and u32string in midi
- solve errors in testbed/speech related to ttsMan->say
- fix unsigned comparision warning in tab.cpp
- fix issue with static strings and translations in sdl-graphics
2020-08-30 14:43:41 +02:00
aryanrawlani28
da380a9002 GUI: U32: Fix issues with ustr formatting
- Fix one off error with 'pos'
- Fix last line not being inserted in osdMessage when display
2020-08-30 14:43:41 +02:00
aryanrawlani28
4506bcd9f3 GUI: U32: Fix compilation errors
After rebasing to get even with master, some compilation errors occured. This commit fixes that.
2020-08-30 14:43:41 +02:00
aryanrawlani28
e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
2020-08-30 14:43:41 +02:00
aryanrawlani28
1ca1712b4d GUI: U32: Fix problems with u32strings formatting
- Improve U32's format helper
- Add insertString helper to u32
2020-08-30 14:43:41 +02:00