75659 Commits

Author SHA1 Message Date
Alexander Tkachev
758f46ddf0 CLOUD: Fix FolderDownloadRequest TODO 2016-08-24 16:07:55 +06:00
Alexander Tkachev
a30d0d1994 CLOUD: Update DownloadRequest's TODO
We need a way to reopen DumpFile if we want DownloadRequest to support
restarting.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5f9beb76cd CLOUD: Fix HTTP response code TODOs 2016-08-24 16:07:55 +06:00
Alexander Tkachev
bd8f2ed825 CLOUD: Fix some TODOs in CloudManager
"No Storage connected!" error message is passed to the error callback
now when there is no Storage connected to the CloudManager.
2016-08-24 16:07:55 +06:00
Peter Bozsó
8c62993769 CLOUD: Remove remove() from BoxStorage 2016-08-24 16:07:55 +06:00
Alexander Tkachev
efebb5b90d CLOUD: Remove DropboxStorage::remove() 2016-08-24 16:07:55 +06:00
Peter Bozsó
9254df2d96 CLOUD: Fix code formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev
772d8ee42b CLOUD: Fix redirect_uri selection code
Now it's not hardcoded based on USE_SDL_NET, but one or another value is
used depending on currently selected LocalWebserver's port.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
01161ae7dd CLOUD: Do some refactoring/cleanup in Networking 2016-08-24 16:07:55 +06:00
Alexander Tkachev
b180c73675 CLOUD: Do some refactoring/cleanup
Nothing really major.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a449ddce15 CLOUD: Fix Cppcheck warnings 2016-08-24 16:07:55 +06:00
Alexander Tkachev
c7fe842f9a GUI: Fix texts clipping
If it was completely clipped out (empty rectangle), it was drawing the
whole text ("empty means no clipping"), so I had to detect such cases
and change textArea to one small pixel.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
52503a2713 GUI: Add "Clear port" button in Cloud tab 2016-08-24 16:07:55 +06:00
Alexander Tkachev
85f4c69fc9 CLOUD: Update StorageWizardDialog
It now hides code fields not just when built with SDL_Net, but also when
LocalWebserver's using default port.

So that's why NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined
in localwebserver.h now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
39865e6e6c CLOUD: Add port override for LocalWebserver
It's enabled only when NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is
defined.

It's not defined, because override means we have to reconfigure our
redirect links somehow to use the override port.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b1264df120 CLOUD: Check whether Storage is working when replacing it
We do that in CloudManager::replaceStorage(), but I've tried to
eliminate such possibility by adding a check in the StorageWizardDialog.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f743b31963 CLOUD: Fix CloudManager::connectStorage() memory leak 2016-08-24 16:07:55 +06:00
Alexander Tkachev
0200694dd0 CLOUD: Fix backends/module.mk
MinGW failed to compile with the latest fix.

Checked this fix with create_project for MSVC, MinGW's make, make under
kubuntu and while building Android apk.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e833c8f65c CLOUD: Add OSD warning when can't start LocalWebserver 2016-08-24 16:07:55 +06:00
Alexander Tkachev
63311bac26 GUI: Add error callback in Options' Cloud tab
Shows OSD message.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1d78d20fcf CLOUD: Fix Dropbox and Google Drive UploadRequests
Possible segfault there too.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab0f2d1a03 CLOUD: Fix OneDriveUploadRequest
Segfault when given stream is nullptr.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6753c18d6f CLOUD: Add default SavesSync callbacks
With OSD messages indicating whether saves sync is complete, cancelled
or failed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a11b004b6b GUI: Show warning in DownloadDialog
If user's connection seems limited, ScummVM shows a warning message to
prevent using that by accident.
2016-08-24 16:07:55 +06:00
Peter Bozsó
8e9d106658 CLOUD: Fix makefile 2016-08-24 16:07:55 +06:00
Alexander Tkachev
a13e03e988 CLOUD: Add Networking::Connection::isLimited()
`false` everywhere by default, but works on Android (`true` if not
Wi-Fi).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0c1c274abd CLOUD: Fix OneDriveUploadRequest
OneDrive doesn't accept empty files, so UploadRequest just skips such.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d0c54cdd64 CLOUD: Fix DropboxCreateDirectoryRequest
It now calls success callback with `false` on Dropbox's
"path/conflict/folder", indicating that the directory already exists.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
55568d757c CLOUD: Move Dropbox to API v2
We had a few places where their deprecated API v1 was used.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
36b381e411 CLOUD: Make "/create" support AJAX
Now creating directories doesn't refresh the "/filesAJAX" page.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
da229dd84c CLOUD: Add "ajax" parameter for "/create" and "/upload"
If it's set, these redirect to "/filesAJAX" instead of "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e6caa482e1 CLOUD: Add messages in "/filesAJAX" 2016-08-24 16:07:55 +06:00
Alexander Tkachev
cd6d45ecf8 CLOUD: Minor "/filesAJAX" fix 2016-08-24 16:07:55 +06:00
Alexander Tkachev
6442dad710 CLOUD: Add "breadcrumbs" in "/filesAJAX" 2016-08-24 16:07:55 +06:00
Alexander Tkachev
09ae2f7593 CLOUD: Add "/filesAJAX" sketch
It works already, but still requires some polishing.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5163fb4e02 CLOUD: Add ListAjaxHandler
"/list" now returns JSON with directory information. Would be used in
AJAX-based Files Manager.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
8de753b68a GUI: Add Cloud-related dialogs in classic theme's stx
Looks fine.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
737dc91e64 TESTBED: Add openUrl test in MiscTests 2016-08-24 16:07:55 +06:00
Alexander Tkachev
817d831255 TESTBED: Add more Webserver tests 2016-08-24 16:07:55 +06:00
Alexander Tkachev
830c7b578c TESTBED: Add Webserver test suite
Two tests now: IP resolving and index page check.
2016-08-24 16:07:55 +06:00
Peter Bozsó
b616cc3d57 CLOUD: Fix indentation in openurl-osx.cpp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
dcf9041926 TESTBED: Fix CloudTests
Now work with all available Storages.
2016-08-24 16:07:55 +06:00
Peter Bozsó
18fc113aa9 CLOUD: Add URL opening for OS X 2016-08-24 16:07:55 +06:00
Alexander Tkachev
04888cf454 TESTBED: Add CloudTests::testSavesSync() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
4e27251356 TESTBED: Add CloudTests::testFolderDownloading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
7a34abe39e TESTBED: Add CloudTests::testDownloading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
6d227a437a TESTBED: Add CloudTests::testUploading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
721ee9527e TESTBED: Fix CloudTests to ask users whether to wait
Callbacks might be slow (like in SyncSaves), but they also could hang
forever, so users now are being asked whether they want to wait or to
skip the test.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
4a0a5af52e TESTBED: Add first Cloud tests
Adding tests for:
* Storage::info();
* Storage::listDirectory();
* Storage::createDirectory().
2016-08-24 16:07:55 +06:00