summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_opts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-03 20:11:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-03 20:11:26 +0000
commite84b97a0622a26fe474ccd840dcadb320520601c (patch)
tree7c1725e6eddbb47d618c8574147dd998feb8ea52 /protocols/MSN/src/msn_opts.cpp
parente82c4d5d574191f432716049218b4b7b5162ec38 (diff)
- new helpers for reading db strings into static buffers;
- MS_DB_CONTACT_GETSETTINGSTATIC died; - DBCONTACTGETSETTING is detouched from all services; - these service calls are rewritten using parameters git-svn-id: http://svn.miranda-ng.org/main/trunk@8035 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_opts.cpp')
-rw-r--r--protocols/MSN/src/msn_opts.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 79139c3b23..26aa551c2d 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -90,7 +90,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemTextA(hwndDlg, IDC_HANDLE, proto->MyOptions.szEmail);
char tBuffer[MAX_PATH];
- if (!proto->getStaticString(NULL, "Password", tBuffer, sizeof(tBuffer))) {
+ if (!db_get_static(NULL, proto->m_szModuleName, "Password", tBuffer, sizeof(tBuffer))) {
tBuffer[16] = 0;
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
}
@@ -115,7 +115,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
EnableWindow(GetDlgItem(hwndDlg, IDC_MAILER_APP), tValue);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENTER_MAILER_APP), tValue);
- if (!proto->getStaticString(NULL, "MailerPath", tBuffer, sizeof(tBuffer)))
+ if (!db_get_static(NULL, proto->m_szModuleName, "MailerPath", tBuffer, sizeof(tBuffer)))
SetDlgItemTextA(hwndDlg, IDC_MAILER_APP, tBuffer);
if (!proto->msnLoggedIn) {
@@ -328,7 +328,7 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam
char ipaddr[256] = "";
if (gethst == 1)
- if (proto->getStaticString(NULL, "YourHost", ipaddr, sizeof(ipaddr)))
+ if (db_get_static(NULL, proto->m_szModuleName, "YourHost", ipaddr, sizeof(ipaddr)))
gethst = 0;
if (gethst == 0)
@@ -516,7 +516,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L
SetDlgItemTextA(hwndDlg, IDC_HANDLE, proto->MyOptions.szEmail);
char tBuffer[MAX_PATH];
- if (!proto->getStaticString(NULL, "Password", tBuffer, sizeof(tBuffer))) {
+ if (!db_get_static(NULL, proto->m_szModuleName, "Password", tBuffer, sizeof(tBuffer))) {
tBuffer[16] = 0;
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
}
@@ -601,7 +601,7 @@ INT_PTR CALLBACK DlgDeleteContactUI(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
DeleteParam *param = (DeleteParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
char szEmail[MSN_MAX_EMAIL_LEN];
- if (!param->proto->getStaticString(param->hContact, "e-mail", szEmail, sizeof(szEmail))) {
+ if (!db_get_static(param->hContact, param->proto->m_szModuleName, "e-mail", szEmail, sizeof(szEmail))) {
param->proto->MSN_AddUser(param->hContact, szEmail, 0, LIST_FL | (isHot ? LIST_REMOVE : LIST_REMOVENH));
if (isBlock) {
param->proto->MSN_AddUser(param->hContact, szEmail, 0, LIST_AL | LIST_REMOVE);
@@ -669,11 +669,11 @@ void CMsnProto::LoadOptions(void)
MyOptions.ManageServer = getByte("ManageServer", TRUE) != 0;
MyOptions.ShowErrorsAsPopups = getByte("ShowErrorsAsPopups", TRUE) != 0;
MyOptions.SlowSend = getByte("SlowSend", FALSE) != 0;
- if (getStaticString(NULL, "e-mail", MyOptions.szEmail, sizeof(MyOptions.szEmail)))
+ if (db_get_static(NULL, m_szModuleName, "e-mail", MyOptions.szEmail, sizeof(MyOptions.szEmail)))
MyOptions.szEmail[0] = 0;
_strlwr(MyOptions.szEmail);
- if (getStaticString(NULL, "MachineGuid", MyOptions.szMachineGuid, sizeof(MyOptions.szMachineGuid))) {
+ if (db_get_static(NULL, m_szModuleName, "MachineGuid", MyOptions.szMachineGuid, sizeof(MyOptions.szMachineGuid))) {
char* uuid = getNewUuid();
strcpy(MyOptions.szMachineGuid, uuid);
setString("MachineGuid", MyOptions.szMachineGuid);