aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
authorAlexander Tkachev2019-07-18 23:10:49 +0700
committerMatan Bareket2019-07-30 14:51:41 -0400
commit99c2418d1a270c4496b21d6d6c8035b6ef73e8a1 (patch)
tree6670b93b28b24080a8ec40286cbf49804cdd91d9 /backends/networking
parent31628d642881499f7d6833732b096c028087e14e (diff)
downloadscummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.tar.gz
scummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.tar.bz2
scummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.zip
GUI: Rewrite Cloud tab
- 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.
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/sdl_net/handlers/indexpagehandler.cpp32
-rw-r--r--backends/networking/sdl_net/handlers/indexpagehandler.h2
2 files changed, 10 insertions, 24 deletions
diff --git a/backends/networking/sdl_net/handlers/indexpagehandler.cpp b/backends/networking/sdl_net/handlers/indexpagehandler.cpp
index 17e5159768..876bdde9ce 100644
--- a/backends/networking/sdl_net/handlers/indexpagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/indexpagehandler.cpp
@@ -24,7 +24,6 @@
#include "backends/networking/sdl_net/handlerutils.h"
#include "backends/networking/sdl_net/localwebserver.h"
#include "common/translation.h"
-#include "gui/storagewizarddialog.h"
namespace Networking {
@@ -34,28 +33,17 @@ IndexPageHandler::~IndexPageHandler() {}
/// public
-Common::String IndexPageHandler::code() const { return _code; }
-
void IndexPageHandler::handle(Client &client) {
- Common::String queryCode = client.queryParameter("code");
-
- if (queryCode == "") {
- // redirect to "/filesAJAX"
- HandlerUtils::setMessageHandler(
- client,
- Common::String::format(
- "%s<br/><a href=\"files\">%s</a>",
- _("This is a local webserver index page."),
- _("Open Files manager")
- ),
- "/filesAJAX"
- );
- return;
- }
-
- _code = queryCode;
- sendCommand(GUI::kStorageCodePassedCmd, 0);
- HandlerUtils::setMessageHandler(client, _("ScummVM got the code and already connects to your cloud storage!"));
+ // redirect to "/filesAJAX"
+ HandlerUtils::setMessageHandler(
+ client,
+ Common::String::format(
+ "%s<br/><a href=\"files\">%s</a>",
+ _("This is a local webserver index page."),
+ _("Open Files manager")
+ ),
+ "/filesAJAX"
+ );
}
bool IndexPageHandler::minimalModeSupported() {
diff --git a/backends/networking/sdl_net/handlers/indexpagehandler.h b/backends/networking/sdl_net/handlers/indexpagehandler.h
index 0d8e616395..b4841bcdca 100644
--- a/backends/networking/sdl_net/handlers/indexpagehandler.h
+++ b/backends/networking/sdl_net/handlers/indexpagehandler.h
@@ -30,12 +30,10 @@ namespace Networking {
class LocalWebserver;
class IndexPageHandler: public BaseHandler, public GUI::CommandSender {
- Common::String _code;
public:
IndexPageHandler();
virtual ~IndexPageHandler();
- Common::String code() const;
virtual void handle(Client &client);
virtual bool minimalModeSupported();
};