Bastien Bouclet
1a1a5b5f69
CLOUD: Change the cloud icon to be updated by the main thread
...
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.
2016-09-18 17:54:12 +02:00
Eugene Sandulenko
fab199d37e
JANITORIAL: Make GPL headers uniform
2016-09-03 12:46:38 +02: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ó
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
b180c73675
CLOUD: Do some refactoring/cleanup
...
Nothing really major.
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
c431ae6d84
CLOUD: Calculate FolderDownload download speed
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ca7917093
CLOUD: Update FolderDownloadRequest
...
It now keeps track of downloaded bytes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b37b392fa0
CLOUD: Add BoxStorage sketch
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
dc0a956172
CLOUD: Add CloudManager::downloadFolder()
2016-08-24 16:07:55 +06:00
Peter Bozsó
fd6be018a3
CLOUD: Fix include in CloudManager
2016-08-24 16:07:55 +06:00
Peter Bozsó
fc3e7dec1a
CLOUD: Introduce kStoragePrefix in CloudManager
2016-08-24 16:07:55 +06:00
Peter Bozsó
1403cf006c
CLOUD: Make enum StorageIDs' name singular
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
9b15ec9989
CLOUD: Update CloudManager
...
It now has methods to update Storage's information.
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
870e96eb9c
CLOUD: Update CloudManager and Storage
...
* Storage::name();
* CloudManager::getStorageName();
* CloudManager::getStorageIndex();
* CloudManager::listStorages();
* CloudManager::switchStorage().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ce7be17d3
CLOUD: Make ProgressDialog display downloading progress
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e9721976aa
GUI: Add SaveLoadCloudSyncProgressDialog
...
It's shown by SaveLoadChooserDialog when files are downloaded and some
save slots are locked. One can hide that dialog to interact with
non-locked slots or cancel saves sync completely. Dialog's label shows
current sync progress.
Dialog automatically hides itself when all files are downloaded.
WARNING: right now that results in a crash!
2016-08-24 16:07:55 +06:00
Alexander Tkachev
8de2862eaa
CLOUD: Update syncSaves() to return SavesSyncRequest *
...
So other classes could use that information without casting.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
69aed03c4f
CLOUD: Add new CloudManager shortcuts
...
CloudIcon can easily use CloudMan.isWorking()
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b3bf532211
CLOUD: Make CloudManager singleton
...
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00