From 5f68b45a7c77b3c5751757a601b62e0356586add Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20P=C3=B6sel?= <robyer@seznam.cz>
Date: Fri, 19 Oct 2012 08:28:24 +0000
Subject: Show "switch to classic options" on every page of modern options

git-svn-id: http://svn.miranda-ng.org/main/trunk@1981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/ModernOpt/src/modernopt.cpp | 12 +++++++++++-
 plugins/ModernOpt/src/mopt_home.cpp |  9 ---------
 2 files changed, 11 insertions(+), 10 deletions(-)

(limited to 'plugins/ModernOpt/src')

diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 3c616bbcc2..670324c6a0 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -245,6 +245,16 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT  msg, WPARAM wParam,
 			}
 			break;
 
+		case IDC_BTN_CLASSICOPT:
+			PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+			// TODO: Set advanced options as default (add db key + check that for opening new options)
+			{
+				OPENOPTIONSDIALOG ood = {0};
+				ood.cbSize = sizeof(ood);
+				Options_Open(&ood);
+			}
+			break;
+
 		case IDC_BTN_HELP:
 			{
 				struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
@@ -610,7 +620,7 @@ static int hookModernOpt_Initialize(WPARAM wParam, LPARAM lParam)
 	obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
 	obj.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_HOME);
 	obj.pfnDlgProc = ModernOptHome_DlgProc;
-	obj.lpzHelpUrl = "http://wiki.miranda-im.org/";
+	obj.lpzHelpUrl = "http://wiki.miranda-ng.org/";
 	CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
 
 	#if defined(_DEBUG) && defined(MOPT_SAMPLE_PAGES)
diff --git a/plugins/ModernOpt/src/mopt_home.cpp b/plugins/ModernOpt/src/mopt_home.cpp
index 214a0d664b..d76d03e7ca 100644
--- a/plugins/ModernOpt/src/mopt_home.cpp
+++ b/plugins/ModernOpt/src/mopt_home.cpp
@@ -52,15 +52,6 @@ INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT  msg, WPARAM wParam, L
 
 	case WM_COMMAND:
 		switch ( LOWORD(wParam)) {
-		case IDC_BTN_CLASSICOPT:
-			PostMessage(GetParent(hwndDlg), WM_CLOSE, 0, 0);
-			{
-				OPENOPTIONSDIALOG ood = {0};
-				ood.cbSize = sizeof(ood);
-				Options_Open(&ood);
-			}
-			break;
-
 		case IDC_BTN_HELP:
 			ShellExecuteA(hwndDlg, "open", "http://miranda-ng.org/", "", "", SW_SHOW);
 			break;
-- 
cgit v1.2.3