summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-02 16:25:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-02 16:25:11 +0300
commitbbd407248cc32744fcbbaec5c0700d9309fa5567 (patch)
treee5cadcc414808138178cd60217704e1039c62157 /plugins/PluginUpdater/src/Options.cpp
parente8ab6cc70a81644e01527753c81790de2b609841 (diff)
fixes #3085 (Миранда отказывается обновиться с ночника на стабильную версию)
Diffstat (limited to 'plugins/PluginUpdater/src/Options.cpp')
-rw-r--r--plugins/PluginUpdater/src/Options.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 77ba888162..5ca1a139bb 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -21,14 +21,14 @@ Boston, MA 02111-1307, USA.
static int GetUpdateMode()
{
- int UpdateMode = g_plugin.getByte(DB_SETTING_UPDATE_MODE, -1);
+ int UpdateMode = g_plugin.iUpdateMode;
// Check if there is url for custom mode
if (UpdateMode == UPDATE_MODE_CUSTOM) {
ptrW url(g_plugin.getWStringA(DB_SETTING_UPDATE_URL));
if (url == NULL || !wcslen(url)) {
// No url for custom mode, reset that setting so it will be determined automatically
- g_plugin.delSetting(DB_SETTING_UPDATE_MODE);
+ g_plugin.iUpdateMode.Delete();
UpdateMode = -1;
}
}
@@ -162,9 +162,8 @@ public:
chkStable.Disable();
// Reset setting if needed
- int UpdateMode = g_plugin.getByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
- if (UpdateMode == UPDATE_MODE_STABLE)
- g_plugin.setByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
+ if (g_plugin.iUpdateMode == UPDATE_MODE_STABLE)
+ g_plugin.iUpdateMode = UPDATE_MODE_TRUNK;
chkStable.SetText(LPGENW("Stable version (incompatible with current development version)"));
}
@@ -245,8 +244,8 @@ public:
bool bStartUpdate = false;
// Repository was changed, force recheck
- if (g_plugin.getByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE) != iNewMode) {
- g_plugin.setByte(DB_SETTING_UPDATE_MODE, iNewMode);
+ if (g_plugin.iUpdateMode != iNewMode) {
+ g_plugin.iUpdateMode = iNewMode;
if (!bNoSymbols)
g_plugin.bForceRedownload = true;
bStartUpdate = true;