summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/PluginUpdater.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/PluginUpdater/src/PluginUpdater.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/PluginUpdater/src/PluginUpdater.cpp')
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 21f680eec1..5a4f6c3d8f 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -48,7 +48,7 @@ int CMPlugin::Load()
{
InitServices();
- db_set_b(NULL, MODULENAME, DB_SETTING_NEED_RESTART, 0);
+ g_plugin.setByte(DB_SETTING_NEED_RESTART, 0);
DWORD dwLen = GetTempPath(_countof(g_tszTempPath), g_tszTempPath);
if (g_tszTempPath[dwLen-1] == '\\')
@@ -100,22 +100,22 @@ int CMPlugin::Load()
g_plugin.addSound("updatefailed", LPGENW("Plugin Updater"), LPGENW("Update failed"));
// Upgrade old settings
- if (-1 == db_get_b(0, MODULENAME, DB_SETTING_UPDATE_MODE, -1)) {
- ptrW dbvUpdateURL(db_get_wsa(0, MODULENAME, DB_SETTING_UPDATE_URL));
+ if (-1 == g_plugin.getByte(DB_SETTING_UPDATE_MODE, -1)) {
+ ptrW dbvUpdateURL(g_plugin.getWStringA(DB_SETTING_UPDATE_URL));
if (dbvUpdateURL) {
if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_OLD))) {
- db_set_b(0, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
- db_unset(0, MODULENAME, DB_SETTING_UPDATE_URL);
+ g_plugin.setByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_STABLE);
+ g_plugin.delSetting(DB_SETTING_UPDATE_URL);
}
else if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_TRUNK_OLD))) {
- db_set_b(0, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
- db_unset(0, MODULENAME, DB_SETTING_UPDATE_URL);
+ g_plugin.setByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
+ g_plugin.delSetting(DB_SETTING_UPDATE_URL);
}
else if (!wcscmp(dbvUpdateURL, _A2W(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD) L"/")) {
- db_set_b(0, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK_SYMBOLS);
- db_unset(0, MODULENAME, DB_SETTING_UPDATE_URL);
+ g_plugin.setByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK_SYMBOLS);
+ g_plugin.delSetting(DB_SETTING_UPDATE_URL);
}
- else db_set_b(0, MODULENAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_CUSTOM);
+ else g_plugin.setByte(DB_SETTING_UPDATE_MODE, UPDATE_MODE_CUSTOM);
}
}