- allow OPTIONS HTTP method to be handled by local webserver;
- add /connect_cloud endpoint;
- add new DropboxStorage constructor that works with JSON response instead of requesting that via shortcode;
- add CloudManager::connectStorage() overload for this new JSON flow.
/connect_cloud endpoint allows cross-origin request (via CORS HTTP headers) from cloud.scummvm.org, so user's browser sends the JSON response directly to ScummVM app, instead of the app requesting that response from the site.
This commit is WIP, introducing a new constructor for Dropbox only, and not changing the GUI part at all.
Also adds Cloud::Storage::SyncDownloadingInfo struct to pass around a bunch of numbers instead of having 3 methods for each number (in CloudManager, Storage and SavesSyncRequest).
Removing GUI::CommandSender from SavesSyncRequest, so it doesn't update SaveLoadCloudSyncProgressDialog or SaveLoadChooserDialog from another thread.
Instead, these two are now polling CloudMan once per second themselves.
uint64 is unsigned long on linux64 (first match in
configure:find_type_with_size), so the format should be lu, but this is
incompatible with Win64, so just cast to make it portable and warning-
clean.
Amends commit 1496ad6bb5.
This commit also includes some additional major changes.
- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
Resolves a bug with displaying the wrong (previous) translation when switch theme language
Previously, a translated string was stored in cloudmanager _storages config items, which would become stale if the theme language was changed.
In PR#1754 we've discussed and decided to ignore hidden (having a name
starting with '.') files while syncing saves or downloading game files.
This commit adds a CloudManager method to test whether file should be
ignored, and this method could be extended later if we need to ignore
some other specific file names.
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
This variable is not used as the constructors for the storage type
classes store the resulting objects into the Cloud Manager using
replaceStorage(this) instead.
The cloud manager registers itself as an event source as a mean to be polled
periodically by the GUI or engine code. The periodical polling is used to
update the OSD icon indicating background sync activity.
Also move the cloud icon from ConnectionManager to CloudManager,
allowing to decouple icon handling from network connections updates.
CloudManager's shortcuts are added too.
The idea is to keep FolderDownload request within Storage, and provide
necessary means to access it. The download is started and cancelled
through the DownloadDialog.