From 0711f84ea0277dd503abe49cf0b58ddeb2d030f2 Mon Sep 17 00:00:00 2001
From: Vojtech Kral <vojtech@kral.hk>
Date: Wed, 18 Apr 2018 12:33:07 +0200
Subject: [PATCH] Add version check & preset update options to Preferences

---
 xs/src/slic3r/GUI/Preferences.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/xs/src/slic3r/GUI/Preferences.cpp b/xs/src/slic3r/GUI/Preferences.cpp
index 6731cd394..4c60577d5 100644
--- a/xs/src/slic3r/GUI/Preferences.cpp
+++ b/xs/src/slic3r/GUI/Preferences.cpp
@@ -9,7 +9,7 @@ void PreferencesDialog::build()
 {
 	auto app_config = get_app_config();
 	m_optgroup = std::make_shared<ConfigOptionsGroup>(this, _(L("General")));
-	m_optgroup->label_width = 200;
+	m_optgroup->label_width = 400;
 	m_optgroup->m_on_change = [this](t_config_option_key opt_key, boost::any value){
 		m_values[opt_key] = boost::any_cast<bool>(value) ? "1" : "0";
 	};
@@ -49,6 +49,22 @@ void PreferencesDialog::build()
 	option = Option (def,"background_processing");
 	m_optgroup->append_single_option_line(option);
 
+	// Please keep in sync with ConfigWizard
+	def.label = L("Check for application updates");
+	def.type = coBool;
+	def.tooltip = L("If enabled, Slic3r checks for new versions of Slic3r PE online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done.");
+	def.default_value = new ConfigOptionBool(app_config->get("version_check") == "1");
+	option = Option (def, "version_check");
+	m_optgroup->append_single_option_line(option);
+
+	// Please keep in sync with ConfigWizard
+	def.label = L("Update built-in Presets automatically");
+	def.type = coBool;
+	def.tooltip = L("If enabled, Slic3r downloads updates of built-in system presets in the background. These updates are downloaded into a separate temporary location. When a new preset version becomes available it is offered at application startup.");
+	def.default_value = new ConfigOptionBool(app_config->get("preset_update") == "1");
+	option = Option (def, "preset_update");
+	m_optgroup->append_single_option_line(option);
+
 	def.label = L("Disable USB/serial connection");
 	def.type = coBool;
 	def.tooltip = L("Disable communication with the printer over a serial / USB cable. "