summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/options.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/FTPFileYM/src/options.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/FTPFileYM/src/options.cpp')
-rw-r--r--plugins/FTPFileYM/src/options.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/plugins/FTPFileYM/src/options.cpp b/plugins/FTPFileYM/src/options.cpp
index cb32cc66c4..b71aaaa0a1 100644
--- a/plugins/FTPFileYM/src/options.cpp
+++ b/plugins/FTPFileYM/src/options.cpp
@@ -33,32 +33,32 @@ void Options::deinit()
void Options::loadOptions()
{
- selected = db_get_b(0, MODULENAME, "Selected", 0);
- defaultFTP = db_get_b(0, MODULENAME, "Default", 0);
- bAutosend = db_get_b(0, MODULENAME, "Autosend", 0) ? true : false;
- bCloseDlg = db_get_b(0, MODULENAME, "CloseDlg", 0) ? true : false;
- bCopyLink = db_get_b(0, MODULENAME, "CopyLink", 1) ? true : false;
- bUseSubmenu = db_get_b(0, MODULENAME, "UseSubmenu", 1) ? true : false;
- bHideInactive = db_get_b(0, MODULENAME, "HideInactive", 1) ? true : false;
- bAutoDelete = db_get_b(0, MODULENAME, "DeleteTimer", 0) ? true : false;
- iDeleteTime = db_get_dw(0, MODULENAME, "AutoDeleteTime", 60);
- timeRange = (ETimeRange)db_get_b(0, MODULENAME, "TimeRange", TR_MINUTES);
- iCompressionLevel = db_get_b(0, MODULENAME, "CompressionLevel", 6);
- bSetZipName = db_get_b(0, MODULENAME, "SetZipName", 0) ? true : false;
+ selected = g_plugin.getByte("Selected", 0);
+ defaultFTP = g_plugin.getByte("Default", 0);
+ bAutosend = g_plugin.getByte("Autosend", 0) ? true : false;
+ bCloseDlg = g_plugin.getByte("CloseDlg", 0) ? true : false;
+ bCopyLink = g_plugin.getByte("CopyLink", 1) ? true : false;
+ bUseSubmenu = g_plugin.getByte("UseSubmenu", 1) ? true : false;
+ bHideInactive = g_plugin.getByte("HideInactive", 1) ? true : false;
+ bAutoDelete = g_plugin.getByte("DeleteTimer", 0) ? true : false;
+ iDeleteTime = g_plugin.getDword("AutoDeleteTime", 60);
+ timeRange = (ETimeRange)g_plugin.getByte("TimeRange", TR_MINUTES);
+ iCompressionLevel = g_plugin.getByte("CompressionLevel", 6);
+ bSetZipName = g_plugin.getByte("SetZipName", 0) ? true : false;
}
void Options::saveOptions() const
{
- db_set_b(0, MODULENAME, "Autosend", bAutosend ? 1 : 0);
- db_set_b(0, MODULENAME, "CopyLink", bCopyLink ? 1 : 0);
- db_set_b(0, MODULENAME, "UseSubmenu", bUseSubmenu ? 1 : 0);
- db_set_b(0, MODULENAME, "HideInactive", bHideInactive ? 1 : 0);
- db_set_b(0, MODULENAME, "CloseDlg", bCloseDlg ? 1 : 0);
- db_set_b(0, MODULENAME, "DeleteTimer", bAutoDelete ? 1 : 0);
- db_set_dw(0, MODULENAME, "AutoDeleteTime", iDeleteTime);
- db_set_b(0, MODULENAME, "TimeRange", (int)timeRange);
- db_set_b(0, MODULENAME, "CompressionLevel", iCompressionLevel);
- db_set_b(0, MODULENAME, "SetZipName", bSetZipName ? 1 : 0);
+ g_plugin.setByte("Autosend", bAutosend ? 1 : 0);
+ g_plugin.setByte("CopyLink", bCopyLink ? 1 : 0);
+ g_plugin.setByte("UseSubmenu", bUseSubmenu ? 1 : 0);
+ g_plugin.setByte("HideInactive", bHideInactive ? 1 : 0);
+ g_plugin.setByte("CloseDlg", bCloseDlg ? 1 : 0);
+ g_plugin.setByte("DeleteTimer", bAutoDelete ? 1 : 0);
+ g_plugin.setDword("AutoDeleteTime", iDeleteTime);
+ g_plugin.setByte("TimeRange", (int)timeRange);
+ g_plugin.setByte("CompressionLevel", iCompressionLevel);
+ g_plugin.setByte("SetZipName", bSetZipName ? 1 : 0);
}
void Options::enableItems(HWND hwndDlg, bool state)