summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
commitd296f9f99daf102b9af5d56690e2bd00d61c1267 (patch)
tree39311caaf80abf0b47ecb78cf94dc8157b193575 /plugins/TabSRMM
parentffc521e5d5e9bd66feb65afe0046b3fc7e073356 (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/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/container.cpp4
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp8
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp2
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp4
-rw-r--r--plugins/TabSRMM/src/templates.cpp2
-rw-r--r--plugins/TabSRMM/src/themes.cpp2
6 files changed, 11 insertions, 11 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index e9e27412fa..733f760aa3 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -1450,14 +1450,14 @@ panel_found:
pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
mir_snprintf(szCname, "%s_theme", CONTAINER_PREFIX);
if (!db_get_ws(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
- szThemeName = dbv.ptszVal;
+ szThemeName = dbv.pwszVal;
}
else {
Utils::ReadPrivateContainerSettings(pContainer);
if (szThemeName == nullptr) {
mir_snprintf(szCname, "%s%d_theme", CONTAINER_PREFIX, pContainer->iContainerIndex);
if (!db_get_ws(0, SRMSGMOD_T, szCname, &dbv))
- szThemeName = dbv.ptszVal;
+ szThemeName = dbv.pwszVal;
}
}
Utils::SettingsToContainer(pContainer);
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index ffd67d6fda..e5e37e1bd3 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -887,7 +887,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (BYTE xStatus = m_dat->m_cache->getXStatusId()) {
wchar_t *tszXStatusName = nullptr;
if (0 == db_get_ws(m_dat->m_cache->getContact(), m_dat->m_cache->getProto(), "XStatusName", &dbv))
- tszXStatusName = dbv.ptszVal;
+ tszXStatusName = dbv.pwszVal;
else if (xStatus > 0 && xStatus <= 31)
tszXStatusName = xStatusDescr[xStatus - 1];
@@ -896,8 +896,8 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->m_cache->getXStatusMsg() ? L" / " : L"",
m_dat->m_cache->getXStatusMsg() ? m_dat->m_cache->getXStatusMsg() : L"");
- if (dbv.ptszVal)
- mir_free(dbv.ptszVal);
+ if (dbv.pwszVal)
+ mir_free(dbv.pwszVal);
}
}
@@ -905,7 +905,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->m_cache->getListeningInfo());
if (0 == db_get_ws(m_dat->m_cache->getActiveContact(), m_dat->m_cache->getActiveProto(), "MirVer", &dbv)) {
- str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.ptszVal);
+ str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.pwszVal);
::db_free(&dbv);
}
str.AppendChar('}');
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index e8cb510573..4b0e6d8db3 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -174,7 +174,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox)
for (int i = 1; i < lr; i++) {
wchar_t *idata = (wchar_t*)SendMessage(hwndCombobox, CB_GETITEMDATA, i, 0);
if (idata && idata != (wchar_t*)CB_ERR) {
- if (!mir_wstrcmpi(dbv.ptszVal, idata)) {
+ if (!mir_wstrcmpi(dbv.pwszVal, idata)) {
SendMessage(hwndCombobox, CB_SETCURSEL, i, 0);
break;
}
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index dd8172921b..e32c086051 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -50,13 +50,13 @@ void CMUCHighlight::init()
m_fInitialized = true;
if (0 == db_get_ws(0, CHAT_MODULE, "HighlightWords", &dbv)) {
- m_TextPatternString = dbv.ptszVal;
+ m_TextPatternString = dbv.pwszVal;
_wsetlocale(LC_ALL, L"");
wcslwr(m_TextPatternString);
}
if (0 == db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv))
- m_NickPatternString = dbv.ptszVal;
+ m_NickPatternString = dbv.pwszVal;
m_dwFlags = M.GetByte(CHAT_MODULE, "HighlightEnabled", MATCH_TEXT);
m_fHighlightMe = (M.GetByte(CHAT_MODULE, "HighlightMe", 1) ? true : false);
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index fefd3f78df..b82440d908 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -89,7 +89,7 @@ static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl)
if (db_get_ws(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
continue;
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR)
- wcsncpy_s(tSet->szTemplates[i], dbv.ptszVal, _TRUNCATE);
+ wcsncpy_s(tSet->szTemplates[i], dbv.pwszVal, _TRUNCATE);
db_free(&dbv);
}
}
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 0c52cd7f03..cb9db3de87 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1006,7 +1006,7 @@ void CSkin::setFileName()
{
DBVARIANT dbv;
if (0 == db_get_ws(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
- PathToAbsoluteW(dbv.ptszVal, m_tszFileName, M.getSkinPath());
+ PathToAbsoluteW(dbv.pwszVal, m_tszFileName, M.getSkinPath());
db_free(&dbv);
}
else