diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2016-06-06 17:23:07 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2016-06-06 17:23:07 +0000 |
commit | df1536b00473e18e2911911c5ec323a01c7f070b (patch) | |
tree | 57a3c602d7f8ec4d69fc04cb7fe3ce310d5c84f6 /plugins/PluginUpdater/src/DlgUpdate.cpp | |
parent | 279001d256a5bc6075284c76d65bf64c420acc7c (diff) |
2 radiobuttons changed to 1 checkbutton for platform change
git-svn-id: http://svn.miranda-ng.org/main/trunk@16929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index f81db0c705..98256b7e56 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -128,12 +128,6 @@ static void ApplyUpdates(void *param) db_set_ts(NULL, "CList", "TitleText", _T("Miranda NG"));
#endif
- opts.bForceRedownload = false;
- db_unset(NULL, MODNAME, DB_SETTING_REDOWNLOAD);
-
- opts.bChangePlatform = false;
- db_unset(NULL, MODNAME, DB_SETTING_CHANGEPLATFORM);
-
db_set_b(NULL, MODNAME, DB_SETTING_RESTART_COUNT, 5);
if (opts.bBackup)
@@ -144,10 +138,31 @@ static void ApplyUpdates(void *param) PostMessage(hDlg, WM_CLOSE, 0, 0);
if (rc == IDYES)
#if MIRANDA_VER >= 0x0A00
- CallServiceSync(MS_SYSTEM_RESTART, db_get_b(NULL, MODNAME, "RestartCurrentProfile", 1) ? 1 : 0, 0);
+ if (opts.bChangePlatform) {
+ TCHAR mirstartpath[MAX_PATH];
+#ifdef _WIN64
+ mir_sntprintf(mirstartpath, _T("%s\\miranda32.exe"), tszMirandaPath);
+#else
+ mir_sntprintf(mirstartpath, _T("%s\\miranda64.exe"), tszMirandaPath);
+#endif
+ CallServiceSync(MS_SYSTEM_RESTART, db_get_b(NULL, MODNAME, "RestartCurrentProfile", 1) ? 1 : 0, (LPARAM)mirstartpath);
+ }
+ else
+ CallServiceSync(MS_SYSTEM_RESTART, db_get_b(NULL, MODNAME, "RestartCurrentProfile", 1) ? 1 : 0, 0);
#else
CallFunctionAsync(RestartMe, 0);
#endif
+
+ opts.bForceRedownload = false;
+ db_unset(NULL, MODNAME, DB_SETTING_REDOWNLOAD);
+
+ opts.bChangePlatform = false;
+ db_unset(NULL, MODNAME, DB_SETTING_CHANGEPLATFORM);
+
+ TCHAR mirandaPath[MAX_PATH];
+ GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
+ db_set_ts(NULL, MODNAME, "OldBin", mirandaPath);
+
}
static void ResizeVert(HWND hDlg, int yy)
|