summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags
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/CountryFlags
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/CountryFlags')
-rw-r--r--plugins/CountryFlags/src/main.cpp8
-rw-r--r--plugins/CountryFlags/src/options.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp
index 3af8d023be..1585cd251b 100644
--- a/plugins/CountryFlags/src/main.cpp
+++ b/plugins/CountryFlags/src/main.cpp
@@ -51,10 +51,10 @@ int CMPlugin::Load()
if (CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&nCountriesCount, (LPARAM)&countries))
nCountriesCount = 0;
- bShowStatusIcon = db_get_b(NULL, MODULENAME, "ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT) != 0;
- bShowExtraIcon = db_get_b(NULL, MODULENAME, "ShowExtraImgFlag", SETTING_SHOWEXTRAIMGFLAG_DEFAULT) != 0;
- bUseUnknown = db_get_b(NULL, MODULENAME, "UseUnknownFlag", SETTING_USEUNKNOWNFLAG_DEFAULT) != 0;
- bUseIpToCountry = db_get_b(NULL, MODULENAME, "UseIpToCountry", SETTING_USEIPTOCOUNTRY_DEFAULT) != 0;
+ bShowStatusIcon = g_plugin.getByte("ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT) != 0;
+ bShowExtraIcon = g_plugin.getByte("ShowExtraImgFlag", SETTING_SHOWEXTRAIMGFLAG_DEFAULT) != 0;
+ bUseUnknown = g_plugin.getByte("UseUnknownFlag", SETTING_USEUNKNOWNFLAG_DEFAULT) != 0;
+ bUseIpToCountry = g_plugin.getByte("UseIpToCountry", SETTING_USEIPTOCOUNTRY_DEFAULT) != 0;
InitIcons();
InitIpToCountry();
diff --git a/plugins/CountryFlags/src/options.cpp b/plugins/CountryFlags/src/options.cpp
index cde19a8664..29a2f9c4de 100644
--- a/plugins/CountryFlags/src/options.cpp
+++ b/plugins/CountryFlags/src/options.cpp
@@ -59,15 +59,15 @@ static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARA
bool bChanged = false, bTemp;
if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_USEUNKNOWNFLAG) != 0) != bUseUnknown)
- db_set_b(NULL, MODULENAME, "UseUnknownFlag", bUseUnknown = bTemp), bChanged = true;
+ g_plugin.setByte("UseUnknownFlag", bUseUnknown = bTemp), bChanged = true;
if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_USEIPTOCOUNTRY) != 0) != bUseIpToCountry)
- db_set_b(NULL, MODULENAME, "UseIpToCountry", bUseIpToCountry = bTemp), bChanged = true;
+ g_plugin.setByte("UseIpToCountry", bUseIpToCountry = bTemp), bChanged = true;
/* Status Icon */
if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWSTATUSICONFLAG) != 0) != bShowStatusIcon)
- db_set_b(NULL, MODULENAME, "ShowStatusIconFlag", bShowStatusIcon = bTemp), bChanged = true;
+ g_plugin.setByte("ShowStatusIconFlag", bShowStatusIcon = bTemp), bChanged = true;
/* Extra Image */
if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWEXTRAIMGFLAG) != 0) != bShowExtraIcon)
- db_set_b(NULL, MODULENAME, "ShowExtraImgFlag", bShowExtraIcon = bTemp), bChanged = true;
+ g_plugin.setByte("ShowExtraImgFlag", bShowExtraIcon = bTemp), bChanged = true;
if (bChanged) {
UpdateExtraImages();