From 7d578de07fdd3ea97e94268836035af5cbbbf094 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 15 Apr 2016 16:41:50 +0000 Subject: PluginUpdater: platform change fix git-svn-id: http://svn.miranda-ng.org/main/trunk@16663 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/Options.cpp | 46 ++++++----------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) (limited to 'plugins/PluginUpdater/src/Options.cpp') diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index ac21c2e356..c5e85faee7 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -118,21 +118,21 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 1, TranslateT("days")); ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), opts.bPeriodMeasure); - TCHAR url[MAX_PATH]; + TCHAR defurl[MAX_PATH]; switch (GetUpdateMode()) { case UPDATE_MODE_STABLE: - mir_sntprintf(url, _T(DEFAULT_UPDATE_URL), DEFAULT_BITS); - SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url); + mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL), DEFAULT_BITS); + SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl); CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED); break; case UPDATE_MODE_TRUNK: - mir_sntprintf(url, _T(DEFAULT_UPDATE_URL_TRUNK), DEFAULT_BITS); - SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url); + mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK), DEFAULT_BITS); + SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl); CheckDlgButton(hwndDlg, IDC_TRUNK, BST_CHECKED); break; case UPDATE_MODE_TRUNK_SYMBOLS: - mir_sntprintf(url, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), DEFAULT_BITS); - SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url); + mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS), DEFAULT_BITS); + SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl); CheckDlgButton(hwndDlg, IDC_TRUNK_SYMBOLS, BST_CHECKED); break; default: @@ -161,7 +161,6 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar case WM_COMMAND: switch (LOWORD(wParam)) { - TCHAR defurl[MAX_PATH]; case IDC_UPDATEONSTARTUP: EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP)); // fall through @@ -250,37 +249,6 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar break; case IDC_X86: - EnableWindow(GetDlgItem(hwndDlg, IDC_TRUNK_SYMBOLS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_TRUNK), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_STABLE), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOM), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), FALSE); - db_set_b(NULL, MODNAME, DB_SETTING_REDOWNLOAD, opts.bForceRedownload = 1); - db_set_b(NULL, MODNAME, DB_SETTING_CHANGEPLATFORM, opts.bChangePlatform = 1); - switch (GetUpdateMode()) { - case UPDATE_MODE_STABLE: - CheckDlgButton(hwndDlg, IDC_STABLE, BST_CHECKED); - break; - case UPDATE_MODE_TRUNK: - CheckDlgButton(hwndDlg, IDC_TRUNK, BST_CHECKED); - break; - case UPDATE_MODE_TRUNK_SYMBOLS: - CheckDlgButton(hwndDlg, IDC_TRUNK_SYMBOLS, BST_CHECKED); - break; - default: - CheckDlgButton(hwndDlg, IDC_CUSTOM, BST_CHECKED); - EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMURL), TRUE); - - ptrT url(db_get_tsa(NULL, MODNAME, DB_SETTING_UPDATE_URL)); - if (url == NULL) - url = GetDefaultUrl(); - SetDlgItemText(hwndDlg, IDC_CUSTOMURL, url); - } - mir_sntprintf(defurl, _T(DEFAULT_UPDATE_URL_TRUNK), DEFAULT_OPP_BITS); - SetDlgItemText(hwndDlg, IDC_CUSTOMURL, defurl); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_X64: EnableWindow(GetDlgItem(hwndDlg, IDC_TRUNK_SYMBOLS), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_TRUNK), FALSE); -- cgit v1.2.3