← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3396: stuff for XP

 

------------------------------------------------------------
revno: 3396
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2014-02-02 23:40:28 +0100
message:
  stuff for XP
modified:
  changelog.txt
  win32/MainWindow.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt	2014-02-02 21:56:38 +0000
+++ changelog.txt	2014-02-02 22:40:28 +0000
@@ -12,6 +12,8 @@
 * HTTP fixes (crise)
 * Safer hub state tracking (poy)
 * Add "/d <search>" for DuckDuckGo searches (poy)
+* Add a dialog box to nag XP suckers into upgrading (poy)
+* Support for a new XP-only branch in version checking (poy)
 
 -- 0.831 2013-11-11 --
 * [L#1249810] Fix NMDC TTH search responses (emtee)

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2013-09-16 18:41:22 +0000
+++ win32/MainWindow.cpp	2014-02-02 22:40:28 +0000
@@ -46,6 +46,7 @@
 
 #include <dwt/Application.h>
 #include <dwt/DWTException.h>
+#include <dwt/util/win32/Version.h>
 #include <dwt/widgets/Grid.h>
 #include <dwt/widgets/MessageBox.h>
 #include <dwt/widgets/Notification.h>
@@ -263,6 +264,20 @@
 
 	if(SETTING(SETTINGS_SAVE_INTERVAL) > 0)
 		setSaveTimer();
+
+	if(!dwt::util::win32::ensureVersion(dwt::util::win32::VISTA)) {
+		callAsync([this] {
+			dwt::MessageBox(this).show(
+				T_(
+					"Both Microsoft and DC++ are dropping support for your operating system "
+					"(Windows XP). Please upgrade it as soon as possible."
+				),
+				T_("Windows XP is too old"),
+				dwt::MessageBox::BOX_OK,
+				dwt::MessageBox::BOX_ICONEXCLAMATION
+			);
+		});
+	}
 }
 
 void MainWindow::initWindow() {
@@ -1460,7 +1475,7 @@
 
 #ifndef _DEBUG
 		xml.resetCurrentChild();
-		if(xml.findChild("Version")) {
+		if(xml.findChild(dwt::util::win32::ensureVersion(dwt::util::win32::VISTA) ? "Version" : "XPVersion")) {
 			if(Util::toDouble(xml.getChildData()) > VERSIONFLOAT) {
 				xml.resetCurrentChild();
 				if(xml.findChild("Title")) {