UPDATES: Implement Check now button in Options

This commit is contained in:
Eugene Sandulenko 2016-03-31 13:59:01 +02:00
parent 82963f7446
commit 2cde45fe6d
7 changed files with 22 additions and 1 deletions

View File

@ -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);

Binary file not shown.

View File

@ -514,6 +514,9 @@
<widget name = 'UpdatesPopup'
type = 'PopUp'
/>
<widget name = 'UpdatesCheckManuallyButton'
type = 'Button'
/>
</layout>
<widget name='KeysButton'
type='Button'

View File

@ -519,6 +519,9 @@
<widget name = 'UpdatesPopup'
type = 'PopUp'
/>
<widget name = 'UpdatesCheckManuallyButton'
type = 'Button'
/>
</layout>
<widget name='KeysButton'
type='Button'

Binary file not shown.

View File

@ -528,6 +528,9 @@
<widget name = 'UpdatesPopup'
type = 'PopUp'
/>
<widget name = 'UpdatesCheckManuallyButton'
type = 'Button'
/>
</layout>
<widget name='KeysButton'
type='Button'

View File

@ -517,6 +517,9 @@
<widget name = 'UpdatesPopup'
type = 'PopUp'
/>
<widget name = 'UpdatesCheckManuallyButton'
type = 'Button'
/>
</layout>
<widget name='KeysButton'
type='Button'