diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/RecentContacts | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/RecentContacts')
-rw-r--r-- | plugins/RecentContacts/src/RecentContacts.cpp | 12 | ||||
-rw-r--r-- | plugins/RecentContacts/src/options.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 7ebf619817..5aafc73a81 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -47,11 +47,11 @@ CMPlugin::CMPlugin() : void LoadDBSettings()
{
memset(&LastUCOpt, 0, sizeof(LastUCOpt));
- LastUCOpt.MaxShownContacts = (INT)db_get_b(NULL, MODULENAME, dbLastUC_MaxShownContacts, 0);
- LastUCOpt.HideOffline = db_get_b(NULL, MODULENAME, dbLastUC_HideOfflineContacts, 0);
- LastUCOpt.WindowAutoSize = db_get_b(NULL, MODULENAME, dbLastUC_WindowAutosize, 0);
+ LastUCOpt.MaxShownContacts = (INT)g_plugin.getByte(dbLastUC_MaxShownContacts, 0);
+ LastUCOpt.HideOffline = g_plugin.getByte(dbLastUC_HideOfflineContacts, 0);
+ LastUCOpt.WindowAutoSize = g_plugin.getByte(dbLastUC_WindowAutosize, 0);
- ptrA szFormat(db_get_sa(NULL, MODULENAME, dbLastUC_DateTimeFormat));
+ ptrA szFormat(g_plugin.getStringA(dbLastUC_DateTimeFormat));
if (szFormat)
LastUCOpt.DateTimeFormat = szFormat;
else
@@ -205,7 +205,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM std::wstring str;
char strtim[256 + 16];
- ptrA szFormat(db_get_sa(NULL, MODULENAME, dbLastUC_DateTimeFormat));
+ ptrA szFormat(g_plugin.getStringA(dbLastUC_DateTimeFormat));
if (!szFormat)
szFormat = mir_strdup(dbLastUC_DateTimeFormatDefault);
@@ -252,7 +252,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM char szSettingName[64];
mir_snprintf(szSettingName, "%swidth", dbLastUC_WindowPosPrefix);
- int width = db_get_dw(NULL, MODULENAME, szSettingName, -1);
+ int width = g_plugin.getDword(szSettingName, -1);
int right = rect.left - 6;
if (!IsWindowVisible(g_clistApi.hwndContactList)) right = rect.right;
diff --git a/plugins/RecentContacts/src/options.cpp b/plugins/RecentContacts/src/options.cpp index 57795570bb..f6f5591ff3 100644 --- a/plugins/RecentContacts/src/options.cpp +++ b/plugins/RecentContacts/src/options.cpp @@ -35,10 +35,10 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP LPNMHDR phdr = (LPNMHDR)(lParam);
if (phdr->idFrom == 0 && phdr->code == PSN_APPLY) {
LastUCOpt.HideOffline = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE);
- db_set_b(NULL, MODULENAME, dbLastUC_HideOfflineContacts, (BYTE)LastUCOpt.HideOffline);
+ g_plugin.setByte(dbLastUC_HideOfflineContacts, (BYTE)LastUCOpt.HideOffline);
LastUCOpt.WindowAutoSize = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_WINDOWAUTOSIZE);
- db_set_b(NULL, MODULENAME, dbLastUC_WindowAutosize, (BYTE)LastUCOpt.WindowAutoSize);
+ g_plugin.setByte(dbLastUC_WindowAutosize, (BYTE)LastUCOpt.WindowAutoSize);
GetDlgItemTextA(hwndDlg, IDC_SHOWNCONTACTS, str, _countof(str));
LastUCOpt.MaxShownContacts= atoi(str);
|