diff options
| author | George Hazan <ghazan@miranda.im> | 2018-11-13 22:39:10 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2018-11-13 22:39:10 +0300 |
| commit | 84820a7338aa363c94db86833c146e1bea872815 (patch) | |
| tree | f4356b8b652c116a7e7b4fe33675c0e4e3da08b5 /src/core/stduserinfo | |
| parent | 37f66793bed39f26031e0e7dd4c1b2bf22d52ab2 (diff) | |
Std* modules -> g_plugin
Diffstat (limited to 'src/core/stduserinfo')
| -rw-r--r-- | src/core/stduserinfo/src/contactinfo.cpp | 18 | ||||
| -rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index d6373e2fba..779f362b1f 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -301,7 +301,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP for (i = 0;; i++) {
lvi.lParam = i;
mir_snprintf(idstr, "Mye-mail%d", i);
- if (db_get_ws(hContact, MODULENAME, idstr, &dbv))
+ if (g_plugin.getWString(hContact, idstr, &dbv))
break;
lvi.pszText = idstr2;
mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1);
@@ -362,7 +362,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP for (i = 0;; i++) {
lvi.lParam = i;
mir_snprintf(idstr, "MyPhone%d", i);
- if (db_get_ws(hContact, MODULENAME, idstr, &dbv))
+ if (g_plugin.getWString(hContact, idstr, &dbv))
break;
lvi.pszText = idstr2;
mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1);
@@ -476,10 +476,10 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
for (i = 0;; i++) {
mir_snprintf(idstr, szIdTemplate, i);
- if (db_get_s(hContact, MODULENAME, idstr, &dbv)) break;
+ if (g_plugin.getString(hContact, idstr, &dbv)) break;
db_free(&dbv);
}
- db_set_s(hContact, MODULENAME, idstr, szNewData);
+ g_plugin.setString(hContact, idstr, szNewData);
SendMessage(hwndDlg, M_REMAKELISTS, 0, 0);
}
}
@@ -489,13 +489,13 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBVARIANT dbv;
for (i = lvi.lParam;; i++) {
mir_snprintf(idstr, szIdTemplate, i + 1);
- if (db_get_s(hContact, MODULENAME, idstr, &dbv)) break;
+ if (g_plugin.getString(hContact, idstr, &dbv)) break;
mir_snprintf(idstr, szIdTemplate, i);
- db_set_s(hContact, MODULENAME, idstr, dbv.pszVal);
+ g_plugin.setString(hContact, idstr, dbv.pszVal);
db_free(&dbv);
}
mir_snprintf(idstr, szIdTemplate, i);
- db_unset(hContact, MODULENAME, idstr);
+ g_plugin.delSetting(hContact, idstr);
SendMessage(hwndDlg, M_REMAKELISTS, 0, 0);
}
else if (hti.iSubItem - 2 == (nm->hdr.idFrom == IDC_PHONES)) {
@@ -503,12 +503,12 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP char szText[256], idstr[33];
DBVARIANT dbv;
mir_snprintf(idstr, szIdTemplate, lvi.lParam);
- if (db_get_s(hContact, MODULENAME, idstr, &dbv)) break;
+ if (g_plugin.getString(hContact, idstr, &dbv)) break;
mir_strncpy(szText, dbv.pszVal, _countof(szText));
db_free(&dbv);
if (IDOK != DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(nm->hdr.idFrom == IDC_PHONES ? IDD_ADDPHONE : IDD_ADDEMAIL), hwndDlg, nm->hdr.idFrom == IDC_PHONES ? EditUserPhoneDlgProc : EditUserEmailDlgProc, (LPARAM)szText))
break;
- db_set_s(hContact, MODULENAME, idstr, szText);
+ g_plugin.setString(hContact, idstr, szText);
SendMessage(hwndDlg, M_REMAKELISTS, 0, 0);
}
}
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 7983a0f6ff..2bea6486fe 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -551,7 +551,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HFONT hFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
- ptrW szNotes(db_get_wsa(lParam, MODULENAME, "MyNotes"));
+ ptrW szNotes(g_plugin.getWStringA(lParam, "MyNotes"));
if (szNotes != nullptr)
SetDlgItemText(hwndDlg, IDC_MYNOTES, szNotes);
}
@@ -574,11 +574,11 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case PSN_APPLY:
hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MYNOTES))) {
- char text[2048];
- GetDlgItemTextA(hwndDlg, IDC_MYNOTES, text, _countof(text));
- db_set_s(hContact, MODULENAME, "MyNotes", text);
+ wchar_t text[2048];
+ GetDlgItemText(hwndDlg, IDC_MYNOTES, text, _countof(text));
+ g_plugin.setWString(hContact, "MyNotes", text);
}
- else db_unset(hContact, MODULENAME, "MyNotes");
+ else g_plugin.delSetting(hContact, "MyNotes");
break;
}
break;
|
