[Scummvm-cvs-logs] scummvm branch-1-8 -> 84268387d3ad39a47f205ae7901a816bd96ed7fb

sev- sev at scummvm.org
Sun Apr 3 12:58:50 CEST 2016


This automated email contains information about 22 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1c8897f7ea GUI: Added stub for Update frequency check widgets.
1d1fedece7 GUI: Store secelcted update frequency in config
fa6e465cea GUI: Added initial implementation for Updates opt-in wizard
f0ff2dbada UPDATES: Plug updates dialog in.
d9dbd29910 GUI: Enhanced StaticTextWidget with font style
79a729f698 UPDATES: Improve update dialog message
240a6262b4 UPDATES: Beginnings of the update frequency control
b6051faf3b GUI: Implement immediate coordinate mode for PopUp widget
fb773d919f UPDATES: Made dialog functional
9837db4caf UPDATES: Made interval set/get functions accept normal integers
d1f34c2ef6 UPDATES: Hook dialogs to UpdateManager
0df4c565d0 UPDATES: Merge two steps into one
b44a98c76b UPDATES: Got rid of hardcoded update intervals list
004f8b3183 UPDATES: Read values from config file in MacOS X update manager
f5853fe6bd UPDATES: Implement Check now button in Options
330de5ce71 UPDATES: Normalize update intervals at setting
801a97c178 UPDATES: Normalize updates_check value
4fd039b742 I18N: Add update files to POTFILES
30f665e854 UPDATES: Added documentation to new methods
4bc5484e06 UPDATES: Implement and use method for normalizing interval value to accepted values
9681452bd8 UPDATES: Remove an unneeded check
84268387d3 GUI: Sync built-in theme


Commit: 1c8897f7eab223fd2179b62206c561dde5132448
    https://github.com/scummvm/scummvm/commit/1c8897f7eab223fd2179b62206c561dde5132448
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:26+02:00

Commit Message:
GUI: Added stub for Update frequency check widgets.

Changed paths:
    gui/options.cpp
    gui/options.h
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/scummmodern_layout.stx
    gui/themes/scummmodern/scummmodern_layout_lowres.stx



diff --git a/gui/options.cpp b/gui/options.cpp
index ba247e5..832f793 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -36,6 +36,7 @@
 #include "common/system.h"
 #include "common/textconsole.h"
 #include "common/translation.h"
+#include "common/updates.h"
 
 #include "audio/mididrv.h"
 #include "audio/musicplugin.h"
@@ -1229,6 +1230,16 @@ GlobalOptionsDialog::GlobalOptionsDialog()
 
 #endif // USE_TRANSLATION
 
+#ifdef USE_UPDATES
+	_updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
+	_updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup");
+
+	_updatesPopUp->appendEntry(_("Never"), Common::UpdateManager::kUpdateIntervalNotSupported);
+	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
+	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
+	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
+#endif
+
 	// Activate the first tab
 	tab->setActiveTab(0);
 	_tabWidget = tab;
diff --git a/gui/options.h b/gui/options.h
index 1e65bfd..6f40463 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -236,6 +236,11 @@ protected:
 	PopUpWidget *_autosavePeriodPopUp;
 	StaticTextWidget *_guiLanguagePopUpDesc;
 	PopUpWidget *_guiLanguagePopUp;
+
+#ifdef USE_UPDATES
+	StaticTextWidget *_updatesPopUpDesc;
+	PopUpWidget *_updatesPopUp;
+#endif
 };
 
 } // End of namespace GUI
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 1d8b8da..028e5f2 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 18c2a1f..b8b0d9a 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -507,6 +507,14 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+				<widget name = 'UpdatesPopupDesc'
+						type = 'OptionsLabel'
+				/>
+				<widget name = 'UpdatesPopup'
+						type = 'PopUp'
+				/>
+			</layout>
 			<widget name='KeysButton'
  				     type='Button'
 			/>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 6cc9eed..7481f9e 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -510,6 +510,16 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
+				<widget name = 'UpdatesPopupDesc'
+						width = '80'
+						height = 'Globals.Line.Height'
+						textalign = 'right'
+				/>
+				<widget name = 'UpdatesPopup'
+						type = 'PopUp'
+				/>
+			</layout>
 			<widget name='KeysButton'
  				     type='Button'
 			/>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 43826ab..52655a5 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index fd6a3c5..8ce9a00 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -521,6 +521,14 @@
 						type = 'PopUp'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+				<widget name = 'UpdatesPopupDesc'
+						type = 'OptionsLabel'
+				/>
+				<widget name = 'UpdatesPopup'
+						type = 'PopUp'
+				/>
+			</layout>
 			<widget name='KeysButton'
  				     type='Button'
 			/>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 9d8f797..7de2c48 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -508,6 +508,16 @@
 						type = 'PopUp'
 				/>
 			</layout>
+            <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
+				<widget name = 'UpdatesPopupDesc'
+						width = '80'
+						height = 'Globals.Line.Height'
+						textalign = 'right'
+				/>
+				<widget name = 'UpdatesPopup'
+						type = 'PopUp'
+				/>
+			</layout>
 			<widget name='KeysButton'
  				     type='Button'
 			/>


Commit: 1d1fedece7a8abe2ec898f9c02cfd25adc6b0c2c
    https://github.com/scummvm/scummvm/commit/1d1fedece7a8abe2ec898f9c02cfd25adc6b0c2c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:26+02:00

Commit Message:
GUI: Store secelcted update frequency in config

Changed paths:
    gui/options.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index 832f793..0dd5d95 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1238,6 +1238,11 @@ GlobalOptionsDialog::GlobalOptionsDialog()
 	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
 	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
 	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
+
+	if (ConfMan.hasKey("updates_check"))
+		_updatesPopUp->setSelectedTag(ConfMan.getInt("updates_check"));
+	else
+		_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalNotSupported);
 #endif
 
 	// Activate the first tab
@@ -1378,6 +1383,10 @@ void GlobalOptionsDialog::close() {
 		}
 #endif // USE_TRANSLATION
 
+#ifdef USE_UPDATES
+		ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
+#endif
+
 	}
 	OptionsDialog::close();
 }


Commit: fa6e465ceab1876a3a33442cf88a8d78aea2f792
    https://github.com/scummvm/scummvm/commit/fa6e465ceab1876a3a33442cf88a8d78aea2f792
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
GUI: Added initial implementation for Updates opt-in wizard

Changed paths:
  A gui/updates-dialog.cpp
  A gui/updates-dialog.h
    gui/module.mk



diff --git a/gui/module.mk b/gui/module.mk
index bbb3def..9e821e7 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -65,5 +65,10 @@ MODULE_OBJS += \
 	fluidsynth-dialog.o
 endif
 
+ifdef USE_UPDATES
+MODULE_OBJS += \
+	updates-dialog.o
+endif
+
 # Include common rules
 include $(srcdir)/rules.mk
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
new file mode 100644
index 0000000..23d5db9
--- /dev/null
+++ b/gui/updates-dialog.cpp
@@ -0,0 +1,101 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/str.h"
+#include "common/system.h"
+#include "common/translation.h"
+#include "gui/updates-dialog.h"
+#include "gui/gui-manager.h"
+#include "gui/ThemeEval.h"
+#include "gui/widget.h"
+
+namespace GUI {
+
+enum {
+	kOkCmd = 'OK  ',
+	kCancelCmd = 'CNCL'
+};
+
+
+UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
+
+	const int screenW = g_system->getOverlayWidth();
+	const int screenH = g_system->getOverlayHeight();
+
+	int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
+	int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
+
+	const char *message = _(
+		"ScummVM now supports automatic check for updates\n"
+		"which requires access to the Internet.\n"
+  		"\n"
+		"Would you like to enable this feature?\n"
+	    "(You can always enable it in the options\n"
+		"dialog on the Misc tab)");
+
+	// First, determine the size the dialog needs. For this we have to break
+	// down the string into lines, and taking the maximum of their widths.
+	// Using this, and accounting for the space the button(s) need, we can set
+	// the real size of the dialog
+	Common::Array<Common::String> lines;
+	int lineCount, okButtonPos, cancelButtonPos;
+	int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
+
+	_w = MAX(maxlineWidth, (2 * buttonWidth) + 10) + 20;
+
+	lineCount = lines.size();
+
+	_h = 16;
+	_h += buttonHeight + 8;
+
+	_h += lineCount * kLineHeight;
+
+	// Center the dialog
+	_x = (screenW - _w) / 2;
+	_y = (screenH - _h) / 2;
+
+	// Each line is represented by one static text item.
+	int y = 10;
+	for (int i = 0; i < lines.size(); i++) {
+		new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight,
+								lines[i], Graphics::kTextAlignCenter);
+		y += kLineHeight;
+	}
+
+	okButtonPos = (_w - (buttonWidth * 2)) / 2;
+	cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
+
+	new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, "OK", 0, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, "Cancel", 0, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+}
+
+void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+	if (cmd == kOkCmd) {
+		close();
+	} else if (cmd == kCancelCmd) {
+		close();
+	} else {
+		Dialog::handleCommand(sender, cmd, data);
+	}
+}
+
+} // End of namespace GUI
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
new file mode 100644
index 0000000..fa46057
--- /dev/null
+++ b/gui/updates-dialog.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef GUI_UPDATES_DIALOG_H
+#define GUI_UPDATES_DIALOG_H
+
+#include "gui/dialog.h"
+
+namespace GUI {
+
+class CommandSender;
+
+/**
+ * Wizard for updates opt-in
+ */
+class UpdatesDialog : public Dialog {
+public:
+	UpdatesDialog();
+
+	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+};
+
+} // End of namespace GUI
+
+#endif


Commit: f0ff2dbada7e137f0d9621d502e3fc8913d16aff
    https://github.com/scummvm/scummvm/commit/f0ff2dbada7e137f0d9621d502e3fc8913d16aff
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
UPDATES: Plug updates dialog in.

Launched when ScummVM is run first time with updates feature.

Changed paths:
    base/main.cpp



diff --git a/base/main.cpp b/base/main.cpp
index ff441df..587e328 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -75,6 +75,9 @@
 #include "gui/launcher.h"
 #endif
 
+#ifdef USE_UPDATES
+#include "gui/updates-dialog.h"
+#endif
 
 static bool launcherDialog() {
 
@@ -458,6 +461,13 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
 	// Now as the event manager is created, setup the keymapper
 	setupKeymapper(system);
 
+#ifdef USE_UPDATES
+	if (!ConfMan.hasKey("updates_check")) {
+		GUI::UpdatesDialog dlg;
+		dlg.runModal();
+	}
+#endif
+
 	// Unless a game was specified, show the launcher dialog
 	if (0 == ConfMan.getActiveDomain())
 		launcherDialog();


Commit: d9dbd299104971c674595bd57ca4fe5ff4b31afc
    https://github.com/scummvm/scummvm/commit/d9dbd299104971c674595bd57ca4fe5ff4b31afc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
GUI: Enhanced StaticTextWidget with font style

Changed paths:
    gui/widget.cpp
    gui/widget.h



diff --git a/gui/widget.cpp b/gui/widget.cpp
index 851774f..4c2ae1b 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -229,20 +229,22 @@ Common::String Widget::cleanupHotkey(const Common::String &label) {
 
 #pragma mark -
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, x, y, w, h, tooltip), _align(align) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
 	_label = text;
+	_font = font;
 }
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, name, tooltip) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
 	_label = text;
 
 	_align = g_gui.xmlEval()->getWidgetTextHAlign(name);
+	_font = font;
 }
 
 void StaticTextWidget::setValue(int value) {
@@ -270,7 +272,7 @@ void StaticTextWidget::setAlign(Graphics::TextAlign align) {
 
 
 void StaticTextWidget::drawWidget() {
-	g_gui.theme()->drawText(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, _align);
+	g_gui.theme()->drawText(Common::Rect(_x, _y, _x+_w, _y+_h), _label, _state, _align, ThemeEngine::kTextInversionNone, 0, true, _font);
 }
 
 #pragma mark -
diff --git a/gui/widget.h b/gui/widget.h
index 9891f32..d4915e8 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -168,9 +168,10 @@ class StaticTextWidget : public Widget {
 protected:
 	Common::String			_label;
 	Graphics::TextAlign		_align;
+	ThemeEngine::FontStyle	_font;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = 0);
-	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
 	void setLabel(const Common::String &label);
 	const Common::String &getLabel() const		{ return _label; }


Commit: 79a729f69878f706b7448f1b09a50c59a9abda40
    https://github.com/scummvm/scummvm/commit/79a729f69878f706b7448f1b09a50c59a9abda40
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
UPDATES: Improve update dialog message

Changed paths:
    gui/updates-dialog.cpp



diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 23d5db9..7b98e4f 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -31,8 +31,8 @@
 namespace GUI {
 
 enum {
-	kOkCmd = 'OK  ',
-	kCancelCmd = 'CNCL'
+	kYesCmd = 'YES ',
+	kNoCmd = 'NO  '
 };
 
 
@@ -48,21 +48,21 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 		"ScummVM now supports automatic check for updates\n"
 		"which requires access to the Internet.\n"
   		"\n"
-		"Would you like to enable this feature?\n"
-	    "(You can always enable it in the options\n"
-		"dialog on the Misc tab)");
+		"Would you like to enable this feature?");
+	const char *message2 = _("(You can always enable it in the options dialog on the Misc tab)");
 
 	// First, determine the size the dialog needs. For this we have to break
 	// down the string into lines, and taking the maximum of their widths.
 	// Using this, and accounting for the space the button(s) need, we can set
 	// the real size of the dialog
-	Common::Array<Common::String> lines;
+	Common::Array<Common::String> lines, lines2;
 	int lineCount, okButtonPos, cancelButtonPos;
 	int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
+	int maxlineWidth2 = g_gui.getFont(ThemeEngine::kFontStyleTooltip).wordWrapText(message2, screenW - 2 * 20, lines2);
 
-	_w = MAX(maxlineWidth, (2 * buttonWidth) + 10) + 20;
+	_w = MAX(MAX(maxlineWidth, maxlineWidth2), (2 * buttonWidth) + 10) + 20;
 
-	lineCount = lines.size();
+	lineCount = lines.size() + 1 + lines2.size();
 
 	_h = 16;
 	_h += buttonHeight + 8;
@@ -80,18 +80,23 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 								lines[i], Graphics::kTextAlignCenter);
 		y += kLineHeight;
 	}
+	for (int i = 0; i < lines2.size(); i++) {
+		new StaticTextWidget(this, 10, y, maxlineWidth2, kLineHeight,
+								lines2[i], Graphics::kTextAlignCenter, 0, ThemeEngine::kFontStyleTooltip);
+		y += kLineHeight;
+	}
 
 	okButtonPos = (_w - (buttonWidth * 2)) / 2;
 	cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
 
-	new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, "OK", 0, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
-	new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, "Cancel", 0, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
-	if (cmd == kOkCmd) {
+	if (cmd == kYesCmd) {
 		close();
-	} else if (cmd == kCancelCmd) {
+	} else if (cmd == kNoCmd) {
 		close();
 	} else {
 		Dialog::handleCommand(sender, cmd, data);


Commit: 240a6262b4ec9a36fe8e4af217fbafd7213b7efb
    https://github.com/scummvm/scummvm/commit/240a6262b4ec9a36fe8e4af217fbafd7213b7efb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
UPDATES: Beginnings of the update frequency control

Changed paths:
    gui/updates-dialog.cpp
    gui/updates-dialog.h



diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 7b98e4f..b08f317 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -23,10 +23,11 @@
 #include "common/str.h"
 #include "common/system.h"
 #include "common/translation.h"
+#include "common/updates.h"
 #include "gui/updates-dialog.h"
 #include "gui/gui-manager.h"
 #include "gui/ThemeEval.h"
-#include "gui/widget.h"
+#include "gui/widgets/popup.h"
 
 namespace GUI {
 
@@ -56,13 +57,12 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	// Using this, and accounting for the space the button(s) need, we can set
 	// the real size of the dialog
 	Common::Array<Common::String> lines, lines2;
-	int lineCount, okButtonPos, cancelButtonPos;
 	int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
 	int maxlineWidth2 = g_gui.getFont(ThemeEngine::kFontStyleTooltip).wordWrapText(message2, screenW - 2 * 20, lines2);
 
 	_w = MAX(MAX(maxlineWidth, maxlineWidth2), (2 * buttonWidth) + 10) + 20;
 
-	lineCount = lines.size() + 1 + lines2.size();
+	int lineCount = lines.size() + 1 + lines2.size();
 
 	_h = 16;
 	_h += buttonHeight + 8;
@@ -86,11 +86,20 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 		y += kLineHeight;
 	}
 
-	okButtonPos = (_w - (buttonWidth * 2)) / 2;
-	cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
+	_updatesPopUpDesc = new StaticTextWidget(this, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
+	_updatesPopUp = new PopUpWidget(this, "GlobalOptions_Misc.UpdatesPopup");
 
-	new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);	// Confirm dialog
-	new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	_updatesPopUp->appendEntry(_("Never"), Common::UpdateManager::kUpdateIntervalNotSupported);
+	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
+	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
+	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
+
+
+	int yesButtonPos = (_w - (buttonWidth * 2)) / 2;
+	int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
+
+	new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
index fa46057..8f89a8f 100644
--- a/gui/updates-dialog.h
+++ b/gui/updates-dialog.h
@@ -28,6 +28,8 @@
 namespace GUI {
 
 class CommandSender;
+class PopUpWidget;
+class StaticTextWidget;
 
 /**
  * Wizard for updates opt-in
@@ -35,8 +37,13 @@ class CommandSender;
 class UpdatesDialog : public Dialog {
 public:
 	UpdatesDialog();
+	virtual ~UpdatesDialog() {}
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+
+private:
+	StaticTextWidget *_updatesPopUpDesc;
+	PopUpWidget *_updatesPopUp;
 };
 
 } // End of namespace GUI


Commit: b6051faf3b5895c49ee10b307ed43f3c802ae473
    https://github.com/scummvm/scummvm/commit/b6051faf3b5895c49ee10b307ed43f3c802ae473
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:56:27+02:00

Commit Message:
GUI: Implement immediate coordinate mode for PopUp widget

Changed paths:
    gui/widgets/popup.cpp
    gui/widgets/popup.h



diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 6186492..b10b4fb 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -382,6 +382,14 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *toolti
 	_selectedItem = -1;
 }
 
+PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)
+	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss) {
+	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
+	_type = kPopUpWidget;
+
+	_selectedItem = -1;
+}
+
 void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
 	if (isEnabled()) {
 		PopUpDialog popupDialog(this, x + getAbsX(), y + getAbsY());
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index 102c7fd..37ddc27 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -58,6 +58,7 @@ protected:
 
 public:
 	PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0);
+	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
 
 	void handleMouseDown(int x, int y, int button, int clickCount);
 	void handleMouseWheel(int x, int y, int direction);


Commit: fb773d919feca7c73a128a28647602222afceb5a
    https://github.com/scummvm/scummvm/commit/fb773d919feca7c73a128a28647602222afceb5a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Made dialog functional

Changed paths:
    gui/updates-dialog.cpp
    gui/updates-dialog.h



diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index b08f317..fe963e8 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -24,6 +24,7 @@
 #include "common/system.h"
 #include "common/translation.h"
 #include "common/updates.h"
+#include "common/config-manager.h"
 #include "gui/updates-dialog.h"
 #include "gui/gui-manager.h"
 #include "gui/ThemeEval.h"
@@ -64,7 +65,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 
 	int lineCount = lines.size() + 1 + lines2.size();
 
-	_h = 16;
+	_h = 16 + 3 * kLineHeight;
 	_h += buttonHeight + 8;
 
 	_h += lineCount * kLineHeight;
@@ -86,26 +87,48 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 		y += kLineHeight;
 	}
 
-	_updatesPopUpDesc = new StaticTextWidget(this, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
-	_updatesPopUp = new PopUpWidget(this, "GlobalOptions_Misc.UpdatesPopup");
+	y += kLineHeight;
+	_updatesPopUpDesc = new StaticTextWidget(this, 10, y, _w, kLineHeight,  _("How often you would like to check for updates?"), Graphics::kTextAlignCenter);
+	y += kLineHeight + 3;
+
+	_updatesPopUp = new PopUpWidget(this, 10, y, _w - 20, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight));
 
 	_updatesPopUp->appendEntry(_("Never"), Common::UpdateManager::kUpdateIntervalNotSupported);
 	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
 	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
 	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
 
+	_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalOneWeek);
+
+	_updatesPopUp->setVisible(false);
+	_updatesPopUpDesc->setVisible(false);
 
 	int yesButtonPos = (_w - (buttonWidth * 2)) / 2;
 	int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
 
-	new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);	// Confirm dialog
-	new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	_yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);
+	_noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);
+
+	_state = 0;
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	if (cmd == kYesCmd) {
-		close();
+		if (_state == 0) {
+			_yesButton->setLabel(_("Proceed"));
+			_noButton->setLabel(_("Cancel"));
+			_updatesPopUp->setVisible(true);
+			_updatesPopUpDesc->setVisible(true);
+
+			_state = 1;
+
+			draw();
+		} else {
+			ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
+			close();
+		}
 	} else if (cmd == kNoCmd) {
+		ConfMan.setInt("updates_check", Common::UpdateManager::kUpdateIntervalNotSupported);
 		close();
 	} else {
 		Dialog::handleCommand(sender, cmd, data);
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
index 8f89a8f..b0626df 100644
--- a/gui/updates-dialog.h
+++ b/gui/updates-dialog.h
@@ -28,6 +28,7 @@
 namespace GUI {
 
 class CommandSender;
+class ButtonWidget;
 class PopUpWidget;
 class StaticTextWidget;
 
@@ -44,6 +45,10 @@ public:
 private:
 	StaticTextWidget *_updatesPopUpDesc;
 	PopUpWidget *_updatesPopUp;
+	ButtonWidget *_yesButton;
+	ButtonWidget *_noButton;
+
+	int _state;
 };
 
 } // End of namespace GUI


Commit: 9837db4caf8659864ad43ae18219174c2a3cef00
    https://github.com/scummvm/scummvm/commit/9837db4caf8659864ad43ae18219174c2a3cef00
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Made interval set/get functions accept normal integers

Changed paths:
    backends/updates/macosx/macosx-updates.h
    backends/updates/macosx/macosx-updates.mm
    common/updates.h



diff --git a/backends/updates/macosx/macosx-updates.h b/backends/updates/macosx/macosx-updates.h
index fd2d1f4..9f541ad 100644
--- a/backends/updates/macosx/macosx-updates.h
+++ b/backends/updates/macosx/macosx-updates.h
@@ -39,8 +39,8 @@ public:
 	virtual void setAutomaticallyChecksForUpdates(UpdateState state);
 	virtual UpdateState getAutomaticallyChecksForUpdates();
 
-	virtual void setUpdateCheckInterval(UpdateInterval interval);
-	virtual UpdateInterval getUpdateCheckInterval();
+	virtual void setUpdateCheckInterval(int interval);
+	virtual int getUpdateCheckInterval();
 };
 
 #endif
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index a94f1c2..c13f05f 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -103,14 +103,14 @@ Common::UpdateManager::UpdateState MacOSXUpdateManager::getAutomaticallyChecksFo
 		return kUpdateStateDisabled;
 }
 
-void MacOSXUpdateManager::setUpdateCheckInterval(UpdateInterval interval) {
+void MacOSXUpdateManager::setUpdateCheckInterval(int interval) {
 	if (interval == kUpdateIntervalNotSupported)
 		return;
 
 	[sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval];
 }
 
-Common::UpdateManager::UpdateInterval MacOSXUpdateManager::getUpdateCheckInterval() {
+int MacOSXUpdateManager::getUpdateCheckInterval() {
 	// This is kind of a hack but necessary, as the value stored by Sparkle
 	// might have been changed outside of ScummVM (in which case we return the
 	// default interval of one day)
diff --git a/common/updates.h b/common/updates.h
index 4c30987..8863a58 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -85,14 +85,14 @@ public:
 	 *
 	 * @param  interval    The interval.
 	 */
-	virtual void setUpdateCheckInterval(UpdateInterval interval) {}
+	virtual void setUpdateCheckInterval(int interval) {}
 
 	/**
 	 * Gets the update check interval.
 	 *
 	 * @return  the update check interval.
 	 */
-	virtual UpdateInterval getUpdateCheckInterval() { return kUpdateIntervalNotSupported; }
+	virtual int getUpdateCheckInterval() { return kUpdateIntervalNotSupported; }
 };
 
 } // End of namespace Common


Commit: d1f34c2ef63010c187422a026f2d3452a6a08c3e
    https://github.com/scummvm/scummvm/commit/d1f34c2ef63010c187422a026f2d3452a6a08c3e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Hook dialogs to UpdateManager

Changed paths:
    gui/options.cpp
    gui/updates-dialog.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index 0dd5d95..96db1d7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1385,6 +1385,15 @@ void GlobalOptionsDialog::close() {
 
 #ifdef USE_UPDATES
 		ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
+
+		if (g_system->getUpdateManager()) {
+			if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
+				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
+			} else {
+				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
+				g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
+			}
+		}
 #endif
 
 	}
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index fe963e8..56d8085 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -20,11 +20,11 @@
  *
  */
 
-#include "common/str.h"
 #include "common/system.h"
 #include "common/translation.h"
 #include "common/updates.h"
 #include "common/config-manager.h"
+
 #include "gui/updates-dialog.h"
 #include "gui/gui-manager.h"
 #include "gui/ThemeEval.h"
@@ -106,8 +106,10 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	int yesButtonPos = (_w - (buttonWidth * 2)) / 2;
 	int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
 
-	_yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("Yes"), 0, kYesCmd, Common::ASCII_RETURN);
-	_noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, _("No"), 0, kNoCmd, Common::ASCII_ESCAPE);
+	_yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
+				_("Yes"), 0, kYesCmd, Common::ASCII_RETURN);
+	_noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
+				_("No"), 0, kNoCmd, Common::ASCII_ESCAPE);
 
 	_state = 0;
 }
@@ -125,10 +127,21 @@ void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 			draw();
 		} else {
 			ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
+
+			if (g_system->getUpdateManager()) {
+				if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
+					g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
+				} else {
+					g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
+					g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
+				}
+			}
 			close();
 		}
 	} else if (cmd == kNoCmd) {
 		ConfMan.setInt("updates_check", Common::UpdateManager::kUpdateIntervalNotSupported);
+		g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
+
 		close();
 	} else {
 		Dialog::handleCommand(sender, cmd, data);


Commit: 0df4c565d0a3b6a1c5c26599588b5d0b653bca30
    https://github.com/scummvm/scummvm/commit/0df4c565d0a3b6a1c5c26599588b5d0b653bca30
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Merge two steps into one

Changed paths:
    gui/updates-dialog.cpp
    gui/updates-dialog.h



diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 56d8085..260bc59 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -34,7 +34,8 @@ namespace GUI {
 
 enum {
 	kYesCmd = 'YES ',
-	kNoCmd = 'NO  '
+	kNoCmd = 'NO  ',
+	kCheckBoxCmd = 'CHK '
 };
 
 
@@ -88,7 +89,8 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	}
 
 	y += kLineHeight;
-	_updatesPopUpDesc = new StaticTextWidget(this, 10, y, _w, kLineHeight,  _("How often you would like to check for updates?"), Graphics::kTextAlignCenter);
+	_updatesCheckbox = new CheckboxWidget(this, 10, y, _w, kLineHeight, _("Check for updates automatically"), 0, kCheckBoxCmd);
+
 	y += kLineHeight + 3;
 
 	_updatesPopUp = new PopUpWidget(this, 10, y, _w - 20, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight));
@@ -100,49 +102,42 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 
 	_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalOneWeek);
 
-	_updatesPopUp->setVisible(false);
-	_updatesPopUpDesc->setVisible(false);
-
 	int yesButtonPos = (_w - (buttonWidth * 2)) / 2;
 	int noButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
 
 	_yesButton = new ButtonWidget(this, yesButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
-				_("Yes"), 0, kYesCmd, Common::ASCII_RETURN);
+				_("Proceed"), 0, kYesCmd, Common::ASCII_RETURN);
 	_noButton = new ButtonWidget(this, noButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
-				_("No"), 0, kNoCmd, Common::ASCII_ESCAPE);
+				_("Cancel"), 0, kNoCmd, Common::ASCII_ESCAPE);
 
-	_state = 0;
+	_updatesPopUp->setEnabled(false);
+	_yesButton->setEnabled(false);
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	if (cmd == kYesCmd) {
-		if (_state == 0) {
-			_yesButton->setLabel(_("Proceed"));
-			_noButton->setLabel(_("Cancel"));
-			_updatesPopUp->setVisible(true);
-			_updatesPopUpDesc->setVisible(true);
-
-			_state = 1;
-
-			draw();
-		} else {
-			ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
-
-			if (g_system->getUpdateManager()) {
-				if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
-					g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
-				} else {
-					g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
-					g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
-				}
+		ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
+
+		if (g_system->getUpdateManager()) {
+			if (_updatesCheckbox->getState() == false ||
+					_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {
+				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
+			} else {
+				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
+				g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
 			}
-			close();
 		}
+		close();
 	} else if (cmd == kNoCmd) {
 		ConfMan.setInt("updates_check", Common::UpdateManager::kUpdateIntervalNotSupported);
 		g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateDisabled);
 
 		close();
+	} else if (cmd == kCheckBoxCmd) {
+		_updatesPopUp->setEnabled(_updatesCheckbox->getState());
+		_yesButton->setEnabled(_updatesCheckbox->getState());
+
+		draw();
 	} else {
 		Dialog::handleCommand(sender, cmd, data);
 	}
diff --git a/gui/updates-dialog.h b/gui/updates-dialog.h
index b0626df..9c429c9 100644
--- a/gui/updates-dialog.h
+++ b/gui/updates-dialog.h
@@ -27,10 +27,10 @@
 
 namespace GUI {
 
+class CheckboxWidget;
 class CommandSender;
 class ButtonWidget;
 class PopUpWidget;
-class StaticTextWidget;
 
 /**
  * Wizard for updates opt-in
@@ -43,12 +43,10 @@ public:
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
 
 private:
-	StaticTextWidget *_updatesPopUpDesc;
 	PopUpWidget *_updatesPopUp;
 	ButtonWidget *_yesButton;
 	ButtonWidget *_noButton;
-
-	int _state;
+	CheckboxWidget *_updatesCheckbox;
 };
 
 } // End of namespace GUI


Commit: b44a98c76bbbecaed4e033fcbd16faf06eda830a
    https://github.com/scummvm/scummvm/commit/b44a98c76bbbecaed4e033fcbd16faf06eda830a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Got rid of hardcoded update intervals list

Changed paths:
  A common/updates.cpp
    common/module.mk
    common/updates.h
    gui/options.cpp
    gui/updates-dialog.cpp



diff --git a/common/module.mk b/common/module.mk
index 67c498d..570040c 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -56,5 +56,10 @@ MODULE_OBJS += \
 	recorderfile.o
 endif
 
+ifdef USE_UPDATES
+MODULE_OBJS += \
+	updates.o
+endif
+
 # Include common rules
 include $(srcdir)/rules.mk
diff --git a/common/updates.cpp b/common/updates.cpp
new file mode 100644
index 0000000..0318864
--- /dev/null
+++ b/common/updates.cpp
@@ -0,0 +1,56 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/system.h"
+#include "common/updates.h"
+#include "common/translation.h"
+
+namespace Common {
+
+static const int updateIntervals[] = {
+	UpdateManager::kUpdateIntervalNotSupported,
+	UpdateManager::kUpdateIntervalOneDay,
+	UpdateManager::kUpdateIntervalOneWeek,
+	UpdateManager::kUpdateIntervalOneMonth,
+	-1
+};
+
+const int *UpdateManager::getUpdateIntervals() {
+	return updateIntervals;
+}
+
+const char *UpdateManager::updateIntervalToString(int interval) {
+	switch (interval) {
+	case kUpdateIntervalNotSupported:
+		return _("Never");
+	case kUpdateIntervalOneDay:
+		return _("Daily");
+	case kUpdateIntervalOneWeek:
+		return _("Weekly");
+	case kUpdateIntervalOneMonth:
+		return _("Monthly");
+	default:
+		return _("<Bad value>");
+	}
+}
+
+} // End of namespace Common
diff --git a/common/updates.h b/common/updates.h
index 8863a58..986d56c 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef BACKENDS_UPDATES_ABSTRACT_H
-#define BACKENDS_UPDATES_ABSTRACT_H
+#ifndef COMMON_UPDATES_H
+#define COMMON_UPDATES_H
 
 #if defined(USE_UPDATES)
 
@@ -93,10 +93,13 @@ public:
 	 * @return  the update check interval.
 	 */
 	virtual int getUpdateCheckInterval() { return kUpdateIntervalNotSupported; }
+
+	static const int *getUpdateIntervals();
+	static const char *updateIntervalToString(int interval);
 };
 
 } // End of namespace Common
 
 #endif
 
-#endif // BACKENDS_UPDATES_ABSTRACT_H
+#endif // COMMON_UPDATES_H
diff --git a/gui/options.cpp b/gui/options.cpp
index 96db1d7..06f79e9 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1234,10 +1234,12 @@ GlobalOptionsDialog::GlobalOptionsDialog()
 	_updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
 	_updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup");
 
-	_updatesPopUp->appendEntry(_("Never"), Common::UpdateManager::kUpdateIntervalNotSupported);
-	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
-	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
-	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
+	const int *vals = Common::UpdateManager::getUpdateIntervals();
+
+	while (*vals != -1) {
+		_updatesPopUp->appendEntry(Common::UpdateManager::updateIntervalToString(*vals), *vals);
+		vals++;
+	}
 
 	if (ConfMan.hasKey("updates_check"))
 		_updatesPopUp->setSelectedTag(ConfMan.getInt("updates_check"));
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 260bc59..960b3f3 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -95,10 +95,12 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 
 	_updatesPopUp = new PopUpWidget(this, 10, y, _w - 20, g_gui.xmlEval()->getVar("Globals.PopUp.Height", kLineHeight));
 
-	_updatesPopUp->appendEntry(_("Never"), Common::UpdateManager::kUpdateIntervalNotSupported);
-	_updatesPopUp->appendEntry(_("Daily"), Common::UpdateManager::kUpdateIntervalOneDay);
-	_updatesPopUp->appendEntry(_("Weekly"), Common::UpdateManager::kUpdateIntervalOneWeek);
-	_updatesPopUp->appendEntry(_("Monthly"), Common::UpdateManager::kUpdateIntervalOneMonth);
+	const int *vals = Common::UpdateManager::getUpdateIntervals();
+
+	while (*vals != -1) {
+		_updatesPopUp->appendEntry(Common::UpdateManager::updateIntervalToString(*vals), *vals);
+		vals++;
+	}
 
 	_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalOneWeek);
 


Commit: 004f8b3183fbee46273e2d807030d2d704e75205
    https://github.com/scummvm/scummvm/commit/004f8b3183fbee46273e2d807030d2d704e75205
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:06+02:00

Commit Message:
UPDATES: Read values from config file in MacOS X update manager

Changed paths:
    backends/updates/macosx/macosx-updates.mm



diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index c13f05f..6f99e71 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -27,6 +27,7 @@
 
 #ifdef USE_SPARKLE
 #include "common/translation.h"
+#include "common/config-manager.h"
 
 #include <Cocoa/Cocoa.h>
 #include <Sparkle/Sparkle.h>
@@ -74,11 +75,13 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
 	// Finally give up our references to the objects
 	[menuItem release];
 
-	// Enable automatic update checking once a day (alternatively use
-	// checkForUpdates() here to check for updates on every startup)
-	// TODO: Should be removed when an update settings gui is implemented
-	setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
-	setUpdateCheckInterval(kUpdateIntervalOneDay);
+	if (!ConfMan.hasKey("updates_check")
+			|| ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) {
+		setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
+	} else {
+		setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
+		setUpdateCheckInterval(ConfMan.getInt("updates_check"));
+	}
 }
 
 MacOSXUpdateManager::~MacOSXUpdateManager() {


Commit: f5853fe6bd248ba144502b43c0c6cefb281a9e7c
    https://github.com/scummvm/scummvm/commit/f5853fe6bd248ba144502b43c0c6cefb281a9e7c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:59+02:00

Commit Message:
UPDATES: Implement Check now button in Options

Changed paths:
    gui/options.cpp
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/scummmodern_layout.stx
    gui/themes/scummmodern/scummmodern_layout_lowres.stx



diff --git a/gui/options.cpp b/gui/options.cpp
index 06f79e9..c4a8298 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
@@ -1519,6 +1522,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		_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 028e5f2..43fcea1 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 b8b0d9a..65724d9 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -514,6 +514,9 @@
 				<widget name = 'UpdatesPopup'
 						type = 'PopUp'
 				/>
+                <widget name = 'UpdatesCheckManuallyButton'
+						type = 'Button'
+				/>
 			</layout>
 			<widget name='KeysButton'
  				     type='Button'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 7481f9e..f73f6e8 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -519,6 +519,9 @@
 				<widget name = 'UpdatesPopup'
 						type = 'PopUp'
 				/>
+                <widget name = 'UpdatesCheckManuallyButton'
+						type = 'Button'
+				/>
 			</layout>
 			<widget name='KeysButton'
  				     type='Button'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 52655a5..70f7672 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 8ce9a00..c73ffa1 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -528,6 +528,9 @@
 				<widget name = 'UpdatesPopup'
 						type = 'PopUp'
 				/>
+				<widget name = 'UpdatesCheckManuallyButton'
+						type = 'Button'
+				/>
 			</layout>
 			<widget name='KeysButton'
  				     type='Button'
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 7de2c48..43ec0cd 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -517,6 +517,9 @@
 				<widget name = 'UpdatesPopup'
 						type = 'PopUp'
 				/>
+                <widget name = 'UpdatesCheckManuallyButton'
+						type = 'Button'
+				/>
 			</layout>
 			<widget name='KeysButton'
  				     type='Button'


Commit: 330de5ce71d95423b4ef246f79815c15a9fbecad
    https://github.com/scummvm/scummvm/commit/330de5ce71d95423b4ef246f79815c15a9fbecad
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:59+02:00

Commit Message:
UPDATES: Normalize update intervals at setting

Changed paths:
    backends/updates/macosx/macosx-updates.mm



diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index 6f99e71..6c7ed03 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -110,6 +110,17 @@ void MacOSXUpdateManager::setUpdateCheckInterval(int interval) {
 	if (interval == kUpdateIntervalNotSupported)
 		return;
 
+	const int *vals = getUpdateIntervals();
+
+	while (*vals != -1) {
+		if (interval == *vals)
+			break;
+		vals++;
+	}
+
+	if (*vals == -1)
+		interval = kUpdateIntervalOneDay;
+
 	[sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval];
 }
 


Commit: 801a97c178dbf60cb9a77fb0fed3a93460e0307b
    https://github.com/scummvm/scummvm/commit/801a97c178dbf60cb9a77fb0fed3a93460e0307b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:59+02:00

Commit Message:
UPDATES: Normalize updates_check value

Changed paths:
    gui/options.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index c4a8298..9e8036b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1397,6 +1397,8 @@ void GlobalOptionsDialog::close() {
 			} else {
 				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
 				g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
+
+				ConfMan.setInt("updates_check", g_system->getUpdateManager()->getUpdateCheckInterval());
 			}
 		}
 #endif


Commit: 4fd039b7428bf8db2ddfe0bc7e3da51f3460b5da
    https://github.com/scummvm/scummvm/commit/4fd039b7428bf8db2ddfe0bc7e3da51f3460b5da
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:59+02:00

Commit Message:
I18N: Add update files to POTFILES

Changed paths:
    po/POTFILES



diff --git a/po/POTFILES b/po/POTFILES
index 49f3b6c..dc4a19d 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -19,12 +19,14 @@ gui/recorderdialog.cpp
 gui/saveload-dialog.cpp
 gui/themebrowser.cpp
 gui/ThemeEngine.cpp
+gui/updates-dialog.cpp
 gui/widget.cpp
 
 base/main.cpp
 
 common/error.cpp
 common/rendermode.cpp
+common/updates.cpp
 
 engines/advancedDetector.cpp
 engines/dialogs.cpp


Commit: 30f665e8544a950c11f4efc1e7d8122d5fc37cd2
    https://github.com/scummvm/scummvm/commit/30f665e8544a950c11f4efc1e7d8122d5fc37cd2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:57:59+02:00

Commit Message:
UPDATES: Added documentation to new methods

Changed paths:
    common/updates.h



diff --git a/common/updates.h b/common/updates.h
index 986d56c..fa6f79f 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -94,7 +94,19 @@ public:
 	 */
 	virtual int getUpdateCheckInterval() { return kUpdateIntervalNotSupported; }
 
+	/**
+	 * Returns list of supported uptate intervals.
+	 * Ending with '-1' which is not acceptable value.
+	 *
+	 * @return  list of integer values representing update intervals in seconds.
+	 */
 	static const int *getUpdateIntervals();
+
+	/**
+	 * Returns string representation of a given interval.
+	 *
+	 * @return  pointer to localized string of given interval.
+	 */
 	static const char *updateIntervalToString(int interval);
 };
 


Commit: 4bc5484e06d6bd5cbc39d1549c8391eb9c5aa55e
    https://github.com/scummvm/scummvm/commit/4bc5484e06d6bd5cbc39d1549c8391eb9c5aa55e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:58:00+02:00

Commit Message:
UPDATES: Implement and use method for normalizing interval value to accepted values

Changed paths:
    backends/updates/macosx/macosx-updates.mm
    common/updates.cpp
    common/updates.h
    gui/options.cpp



diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index 6c7ed03..fc967f8 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -80,7 +80,7 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
 		setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
 	} else {
 		setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
-		setUpdateCheckInterval(ConfMan.getInt("updates_check"));
+		setUpdateCheckInterval(normalizeInterval(ConfMan.getInt("updates_check")));
 	}
 }
 
@@ -110,16 +110,7 @@ void MacOSXUpdateManager::setUpdateCheckInterval(int interval) {
 	if (interval == kUpdateIntervalNotSupported)
 		return;
 
-	const int *vals = getUpdateIntervals();
-
-	while (*vals != -1) {
-		if (interval == *vals)
-			break;
-		vals++;
-	}
-
-	if (*vals == -1)
-		interval = kUpdateIntervalOneDay;
+	interval = normalizeInterval(interval);
 
 	[sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval];
 }
diff --git a/common/updates.cpp b/common/updates.cpp
index 0318864..552324e 100644
--- a/common/updates.cpp
+++ b/common/updates.cpp
@@ -38,6 +38,16 @@ const int *UpdateManager::getUpdateIntervals() {
 	return updateIntervals;
 }
 
+int UpdateManager::normalizeInterval(int interval) {
+	const int *val = updateIntervals;
+
+	while (*val != -1)
+		if (*val > interval)
+			return *val;
+
+	return val[-1];	// Return maximal acceptable value
+}
+
 const char *UpdateManager::updateIntervalToString(int interval) {
 	switch (interval) {
 	case kUpdateIntervalNotSupported:
diff --git a/common/updates.h b/common/updates.h
index fa6f79f..65eb5ac 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -105,9 +105,18 @@ public:
 	/**
 	 * Returns string representation of a given interval.
 	 *
+	 * @param  interval    The interval.
 	 * @return  pointer to localized string of given interval.
 	 */
 	static const char *updateIntervalToString(int interval);
+
+	/**
+	 * Rounds up the given interval to acceptable value.
+	 *
+	 * @param  interval    The interval.
+	 * @return  rounded up interval
+	 */
+	static int normalizeInterval(int interval);
 };
 
 } // End of namespace Common
diff --git a/gui/options.cpp b/gui/options.cpp
index 9e8036b..c6bbde7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1243,7 +1243,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
 	}
 
 	if (ConfMan.hasKey("updates_check"))
-		_updatesPopUp->setSelectedTag(ConfMan.getInt("updates_check"));
+		_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
 	else
 		_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalNotSupported);
 
@@ -1397,8 +1397,6 @@ void GlobalOptionsDialog::close() {
 			} else {
 				g_system->getUpdateManager()->setAutomaticallyChecksForUpdates(Common::UpdateManager::kUpdateStateEnabled);
 				g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
-
-				ConfMan.setInt("updates_check", g_system->getUpdateManager()->getUpdateCheckInterval());
 			}
 		}
 #endif


Commit: 9681452bd8ddfb7cfbb0cb8accea63c4e2869039
    https://github.com/scummvm/scummvm/commit/9681452bd8ddfb7cfbb0cb8accea63c4e2869039
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:58:00+02:00

Commit Message:
UPDATES: Remove an unneeded check

Changed paths:
    gui/options.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index c6bbde7..ecd1607 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1242,10 +1242,7 @@ GlobalOptionsDialog::GlobalOptionsDialog()
 		vals++;
 	}
 
-	if (ConfMan.hasKey("updates_check"))
-		_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
-	else
-		_updatesPopUp->setSelectedTag(Common::UpdateManager::kUpdateIntervalNotSupported);
+	_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
 
 	new ButtonWidget(tab, "GlobalOptions_Misc.UpdatesCheckManuallyButton", _("Check now"), 0, kUpdatesCheckCmd);
 #endif


Commit: 84268387d3ad39a47f205ae7901a816bd96ed7fb
    https://github.com/scummvm/scummvm/commit/84268387d3ad39a47f205ae7901a816bd96ed7fb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-03T12:58:18+02:00

Commit Message:
GUI: Sync built-in theme

Changed paths:
    gui/themes/default.inc



diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index e367bcb..a23e2f4 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1076,6 +1076,17 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "type='PopUp' "
 "/>"
 "</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>"
+"<widget name='UpdatesPopupDesc' "
+"type='OptionsLabel' "
+"/>"
+"<widget name='UpdatesPopup' "
+"type='PopUp' "
+"/>"
+"<widget name='UpdatesCheckManuallyButton' "
+"type='Button' "
+"/>"
+"</layout>"
 "<widget name='KeysButton' "
 "type='Button' "
 "/>"
@@ -2365,6 +2376,19 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "type='PopUp' "
 "/>"
 "</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
+"<widget name='UpdatesPopupDesc' "
+"width='80' "
+"height='Globals.Line.Height' "
+"textalign='right' "
+"/>"
+"<widget name='UpdatesPopup' "
+"type='PopUp' "
+"/>"
+"<widget name='UpdatesCheckManuallyButton' "
+"type='Button' "
+"/>"
+"</layout>"
 "<widget name='KeysButton' "
 "type='Button' "
 "/>"






More information about the Scummvm-git-logs mailing list