From 2cde45fe6d94211d005cd32e7368769f8524bdec Mon Sep 17 00:00:00 2001
From: Eugene Sandulenko
Date: Thu, 31 Mar 2016 13:59:01 +0200
Subject: UPDATES: Implement Check now button in Options
---
gui/options.cpp | 11 ++++++++++-
gui/themes/scummclassic.zip | Bin 111931 -> 112109 bytes
gui/themes/scummclassic/classic_layout.stx | 3 +++
gui/themes/scummclassic/classic_layout_lowres.stx | 3 +++
gui/themes/scummmodern.zip | Bin 1487717 -> 1487883 bytes
gui/themes/scummmodern/scummmodern_layout.stx | 3 +++
.../scummmodern/scummmodern_layout_lowres.stx | 3 +++
7 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/gui/options.cpp b/gui/options.cpp
index 06f79e94b7..c4a82982b2 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -62,7 +62,8 @@ enum {
kChooseExtraDirCmd = 'chex',
kExtraPathClearCmd = 'clex',
kChoosePluginsDirCmd = 'chpl',
- kChooseThemeCmd = 'chtf'
+ kChooseThemeCmd = 'chtf',
+ kUpdatesCheckCmd = 'updc'
};
enum {
@@ -1245,6 +1246,8 @@ GlobalOptionsDialog::GlobalOptionsDialog()
_updatesPopUp->setSelectedTag(ConfMan.getInt("updates_check"));
else
_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalNotSupported);
+
+ new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), 0, kUpdatesCheckCmd);
#endif
// Activate the first tab
@@ -1518,6 +1521,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
case kFluidSynthSettingsCmd:
_fluidSynthSettingsDialog->runModal();
break;
+#endif
+#ifdef USE_UPDATES
+ case kUpdatesCheckCmd:
+ if (g_system->getUpdateManager())
+ g_system->getUpdateManager()->checkForUpdates();
+ break;
#endif
default:
OptionsDialog::handleCommand(sender, cmd, data);
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 028e5f23c7..43fcea12fd 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index b8b0d9a85d..65724d9faf 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -514,6 +514,9 @@
+
+
+
+