From c28759e7c9e63b1d092904b4299afdffec91bcdf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Jun 2018 17:55:24 +0300 Subject: new functions to access mirandaboot.ini from all plugins: Profile_GetSetting() - reads a string from mirandaboot.ini Profile_GetSettingInt() - reads an integer from mirandaboot.ini --- plugins/Db3x_mmap/src/ui.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 49601ba2c7..e0929408a7 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -102,9 +102,7 @@ static INT_PTR CALLBACK sttEnterPassword(HWND hwndDlg, UINT uMsg, WPARAM wParam, case IDOK: GetDlgItemText(hwndDlg, IDC_USERPASS, param->newPass, _countof(param->newPass)); - wchar_t tszPath[MAX_PATH]; - PathToAbsoluteW(L"\\mirandaboot.ini", tszPath); - if (GetPrivateProfileInt(L"Database", L"RememberPassword", 0, tszPath)) { + if (Profile_GetSettingInt(L"Database/RememberPassword")) { CREDENTIAL cred = { 0 }; cred.Type = CRED_TYPE_GENERIC; cred.TargetName = L"Miranda NG/Database"; -- cgit v1.2.3