diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /plugins/Clist_modern | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff) |
database:
- senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead;
- if you want db_get to return a string, you need to use db_get_s.
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/cluiframes.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_cachefuncs.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistopts.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 26988949a7..e447ba23f8 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -608,7 +608,7 @@ static int LocateStorePosition(int Frameid, int maxstored) if (db_get_ws(0, CLUIFrameModule, settingname, &dbv))
continue;
- if (mir_wstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) {
+ if (mir_wstrcmpi(dbv.pwszVal, g_pfwFrames[Frameid].name) == 0) {
db_free(&dbv);
return i;
}
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 7c8901bf67..c25717b344 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -284,7 +284,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat DBVARIANT dbv = { 0 }; if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) { //mir_wstrncpy(text, dbv.pszVal, text_size); - CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); + CopySkipUnprintableChars(text, dbv.pwszVal, text_size - 1); db_free(&dbv); if (text[0] != '\0') @@ -303,7 +303,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->szProto) { DBVARIANT dbv = { 0 }; if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) { - CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); + CopySkipUnprintableChars(text, dbv.pwszVal, text_size - 1); db_free(&dbv); if (text[0] != '\0') @@ -479,7 +479,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) DBVARIANT dbv = { 0 }; if (!db_get_ws(pdnce->hContact, pdnce->szProto, "Nick", &dbv)) { wchar_t nick[_countof(contact->szText)]; - mir_wstrncpy(nick, dbv.ptszVal, _countof(contact->szText)); + mir_wstrncpy(nick, dbv.pwszVal, _countof(contact->szText)); db_free(&dbv); // They are the same -> use the name to keep the case diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 3941e09a8f..e7c74bedeb 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -999,7 +999,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP DBVARIANT dbv = { 0 };
wchar_t *s;
if (!db_get_ws(0, "CList", "TitleText", &dbv))
- s = dbv.ptszVal;
+ s = dbv.pwszVal;
else
s = _A2W(MIRANDANAME);
SetDlgItemText(hwndDlg, IDC_TITLETEXT, s);
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index da055263f7..7a17f78610 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -751,7 +751,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM {
DBVARIANT dbv;
if (!db_get_ws(0, "CList", "ThirdLineText", &dbv)) {
- SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, dbv.pwszVal);
db_free(&dbv);
}
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index fea55d6b6d..e820f45321 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -643,7 +643,7 @@ void CLUI_ChangeWindowMode() if (db_get_ws(0, "CList", "TitleText", &dbv))
mir_wstrncpy(titleText, _A2W(MIRANDANAME), _countof(titleText));
else {
- mir_wstrncpy(titleText, dbv.ptszVal, _countof(titleText));
+ mir_wstrncpy(titleText, dbv.pwszVal, _countof(titleText));
db_free(&dbv);
}
SetWindowText(g_clistApi.hwndContactList, titleText);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index b6e39aec18..a654d615c1 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1262,12 +1262,12 @@ void ApplyViewMode(const char *Name, bool onlySelector) }
mir_snprintf(szSetting, "%c%s_GF", 246, Name);
if (!db_get_ws(0, CLVM_MODULE, szSetting, &dbv)) {
- if (mir_wstrlen(dbv.ptszVal) >= 2) {
- mir_wstrncpy(g_CluiData.groupFilter, dbv.ptszVal, _countof(g_CluiData.groupFilter));
+ if (mir_wstrlen(dbv.pwszVal) >= 2) {
+ mir_wstrncpy(g_CluiData.groupFilter, dbv.pwszVal, _countof(g_CluiData.groupFilter));
g_CluiData.groupFilter[_countof(g_CluiData.groupFilter) - 1] = 0;
g_CluiData.bFilterEffective |= CLVM_FILTER_GROUPS;
}
- mir_free(dbv.ptszVal);
+ mir_free(dbv.pwszVal);
}
mir_snprintf(szSetting, "%c%s_SM", 246, Name);
g_CluiData.statusMaskFilter = db_get_dw(0, CLVM_MODULE, szSetting, -1);
|