summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-10-16 21:33:25 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-10-16 21:33:25 +0000
commit1f8cbf7f291ac140f8dfed775ecdb47c7437716e (patch)
tree76f32401c48e0d16ca8ab60e1589915b6f641fa9 /plugins
parent94011c69f7d5982a471f93cff6880506132525ab (diff)
Quick fix for reseting setting
git-svn-id: http://svn.miranda-ng.org/main/trunk@10806 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PluginUpdater/res/Resource.rc2
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp6
-rw-r--r--plugins/PluginUpdater/src/Options.cpp5
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp8
4 files changed, 11 insertions, 10 deletions
diff --git a/plugins/PluginUpdater/res/Resource.rc b/plugins/PluginUpdater/res/Resource.rc
index 11a90b4ab9..dd80f9c8cc 100644
--- a/plugins/PluginUpdater/res/Resource.rc
+++ b/plugins/PluginUpdater/res/Resource.rc
@@ -76,7 +76,7 @@ BEGIN
CONTROL "Custom version",IDC_CUSTOM,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,11,150,247,10
EDITTEXT IDC_CUSTOMURL,11,164,234,16,ES_AUTOHSCROLL | WS_DISABLED
CTEXT "Some component(s) was updated.\nYou need to restart your Miranda to apply installed updates.",IDC_NEEDRESTARTLABEL,11,193,247,15,NOT WS_VISIBLE
- LTEXT "!!! Switch to Stable version is now impossible due to incompatibility with currrent Dev version",IDC_DONTSWITCHTOSTABLE,11,214,247,19,NOT WS_VISIBLE
+ LTEXT "Switch to Stable version is now impossible due to incompatibility with currrent Dev version!",IDC_DONTSWITCHTOSTABLE,11,214,247,19,NOT WS_VISIBLE
END
IDD_POPUP DIALOGEX 0, 0, 316, 174
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 0528d1b34a..36df3735f1 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -57,14 +57,10 @@ static void ApplyUpdates(void *param)
AutoHandle pipe(hPipe);
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
- TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
-
+ TCHAR tszFileBack[MAX_PATH];
mir_sntprintf(tszFileBack, SIZEOF(tszFileBack), _T("%s\\Backups"), tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, SIZEOF(tszFileTemp), _T("%s\\Temp"), tszRoot);
- SafeCreateDirectory(tszFileTemp);
-
// 2) Download all plugins
HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); i++) {
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index b39b000bf8..9b1e58764c 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -47,7 +47,10 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
if (db_get_b(NULL, MODNAME, DB_SETTING_DONT_SWITCH_TO_STABLE, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STABLE), FALSE);
- db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
+ // Reset setting if needed
+ int UpdateMode = db_get_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
+ if (UpdateMode == UPDATE_MODE_STABLE)
+ db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
ShowWindow(GetDlgItem(hwndDlg, IDC_DONTSWITCHTOSTABLE), SW_SHOW);
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index fb24329b92..7d54a161ec 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -248,11 +248,13 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
rtrim(str);
if (str[0] == ';') {
db_unset(NULL, MODNAME, DB_SETTING_DONT_SWITCH_TO_STABLE);
- continue;
}
- if (!strcmp(str, "DoNotSwitchToStable")) {
+ else if (!strcmp(str, "DoNotSwitchToStable")) {
db_set_b(NULL, MODNAME, DB_SETTING_DONT_SWITCH_TO_STABLE, 1);
- db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
+ // Reset setting if needed
+ int UpdateMode = db_get_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
+ if (UpdateMode == UPDATE_MODE_STABLE)
+ db_set_b(NULL, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
}
else {
Netlib_Logf(hNetlibUser, "Update: %s", str);