2824 Commits

Author SHA1 Message Date
Alexander Tkachev
b37b392fa0 CLOUD: Add BoxStorage sketch 2016-08-24 16:07:55 +06:00
Alexander Tkachev
03f33be54c GUI: Fix Options Cloud tab widgets visibility
As it's controlled by ScrollContainer also, we have to explicitly
setVisible(true) for "always" visible widgets.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d795c77ef5 GUI: Fix DownloadDialog detection
Now it calls Launcher directly, so it updates games list on success.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
2f5138f795 GUI: Minor Container fixes
I should've done these in PR, I guess.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f01402f4d8 GUI: Remove unnecessary DownloadDialog's flag 2016-08-24 16:07:55 +06:00
Alexander Tkachev
9975307caf GUI: Fix Container's visibility issue
Now it respects outer code's decision to hide or move some widgets
around. Outer code must be CommandReceiver which is set as
ScrollContainer's target.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ee3ce47606 GUI: Use Container in the Cloud tab
It has a visibility issue, but we're already working on it.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d5753a4847 CLOUD: Add auto-detect for downloaded game
If that's the game, that is.

Method is copy-pasted from Launcher, but fixed not to ask the directory
and thus doesn't contain the loop.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e601c39802 CLOUD: Make "Run server" button active
It should show the real server's IP over there, but that doesn't work
yet.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3da38ca60b CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
211d9ed5f6 GUI: Fix Options' Cloud tab reflowing 2016-08-24 16:07:55 +06:00
Alexander Tkachev
81c85b6651 CLOUD: Fix SaveLoadDialogs to check USE_CLOUD
Linking was failing when disabling curl support.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ad069f442c GUI: Add "Run server" button in Cloud tab 2016-08-24 16:07:55 +06:00
Alexander Tkachev
2284333b1c GUI: Add lowres support for DownloadDialog's button
No actual translations, though. Should be just "Cancel", because "Cancel
download" is too long for lowres mode.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a5765a339e GUI: Update DownloadDialog
It now less empty, because if there is no download in progress, user
sees the RemoteBrowser instead of empty dialog. The cancel button is now
in the left bottom corner.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
659dcd9702 GUI: Fix SaveLoadDialog
It was SavesSyncRequest's target even when closed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
052d8bf0ae GUI: Forbid using download directory in "Add Game" 2016-08-24 16:07:55 +06:00
Alexander Tkachev
458bfcec79 GUI: Fix DownloadDialog path creation
Was adding a path separator even when none is required.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ddb1a6ccb6 GUI: Upgrade DownloadDialog
It now shows the remote and local directories and a progress bar.

Storage now shows OSD messages on download success and failure.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b8ee9d4e7d CLOUD: Add FolderDownload-related methods in Storage
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.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
71a326493b GUI: Initiate download in DownloadDialog 2016-08-24 16:07:55 +06:00
Alexander Tkachev
d776b53971 GUI: Use RemoteBrowser's result in DownloadDialog
It now checks the selected local directory, and shows different
MessageDialogs to notify user of mistake or ambiguous situation.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c32d6fa047 GUI: Add error message in RemoteBrowser
For the error callback case.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
8972f28bc1 GUI: Add RemoteBrowser file list sorting
Because Dropbox has no means to specify files order.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6faf2c2617 GUI: Add RemoteBrowser parent directories remembering
No wait when "Go up" is pressed. These contents could be invalid,
though. In order to refresh contents, one has to go up one more time and
then get back inside (in root folder - just press "Go up" to refresh
it).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
51a7232c73 GUI: Fix RemoteBrowser Request handling
Init with NULL, ignore callbacks, and such.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
73bb2e20af GUI: Clean up in RemoteBrowser 2016-08-24 16:07:55 +06:00
Alexander Tkachev
4aa8e23ea2 GUI: Make RemoteBrowser show "Loading..." 2016-08-24 16:07:55 +06:00
Alexander Tkachev
e388accda3 GUI: Fix "Go up"
OneDrive and Google Drive paths do not start with '/', so one was unable
to go up to root.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
72b82bd2aa GUI: Add RemoteBrowserDialog
WIP. Tested with Dropbox.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
97c0bbd238 GUI: Add DownloadDialog sketch 2016-08-24 16:07:55 +06:00
Alexander Tkachev
b908b286b9 CLOUD: Fix "signed/unsigned integers" warning
The "comparison between signed and unsigned integer expressions" one.

Note that in UploadRequests size() and pos() are acutally signed,
because they could return -1. This commit implies that Requests are
working with such Streams which doesn't.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c2c2ba908f GUI: Hide StorageWizardDialog fields if server present 2016-08-24 16:07:55 +06:00
Alexander Tkachev
5ac3adbd4f CLOUD: Add IndexPageHandler
This commit also adds LocalWebserver's stopOnIdle().
That means server is not stopped immediately, but only when all clients
are served.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ceb86a0dd8 CLOUD: Clarify calculatedChecksum's initial value 2016-08-24 16:07:55 +06:00
Peter Bozsó
434b740f4d CLOUD: Remove a couple of unnecessary whitespaces 2016-08-24 16:07:55 +06:00
Alexander Tkachev
0af97e59bc CLOUD: Add LocalWebserver
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f571f3dd28 CLOUD: Add comments for StorageWizardDialog methods 2016-08-24 16:07:55 +06:00
Alexander Tkachev
a83e91e1ca CLOUD: Update StorageWizardDialog's code check
Now the code contains its own crc16 in it, plus the way checksum is
calculated has changed.

Some online tool calls this exact way of calculating crc16
"CRC16_CCITT_FALSE".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3db4915b66 CLOUD: Add checks in StorageWizardDialog
It now calculates the checksums for code pieces to determine whether
it's correct and CRC-32 for user to compare with one shown on site.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a651a983dd GUI: Add warning message for game's savepath 2016-08-24 16:07:55 +06:00
Alexander Tkachev
9ee2eb4e60 GUI: Add EditText in StorageWizardDialog
One can enter the code, press 'Connect' button and get a working
Storage!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e6242b0be8 GUI: Add Refresh button in Options Cloud tab
Commit changes CloudManager and Storages so they would automatically
refresh the fields when the could.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
beb168a3a5 GUI: Add Cloud tab StorageWizardDialog
This is a dialog which guides user through Storage connection procedure.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e1e48968b4 GUI: Replace Cloud tab's StorageBrowser with PopUp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
af9930482e CLOUD: Update CloudManager
It now supports only one storage of each type. Only one Storage could be
loaded to the memory as well.

Options' Cloud tab now changes the Storage only when user pressed OK
button, giving the ability to look through the Storages without actually
changing them.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
4ff1ed5fe9 GUI: Add Cloud tab information labels
And corresponding stub implementations in CloudManager.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
90ae7b7337 GUI: Add Options dialog Cloud tab
With StorageBrowser to select a Storage. It actually uses CloudMan to
switch active Storage.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
62a640ff44 GUI: Disable "Run in background" for "difficult" engines
During saves sync slots of MetaEngines with simpleSaveNames() == false
would not be available at all. User would have to wait for sync to
complete.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab1d160ec8 ALL: Add MetaEngine::simpleSaveNames()
Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
2016-08-24 16:07:55 +06:00