summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/help.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables/src/help.cpp')
-rw-r--r--plugins/Variables/src/help.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 3e1d5678bd..4b05a3476a 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -267,7 +267,7 @@ static wchar_t *getTokenDescription(TOKENREGISTEREX *tr)
return nullptr;
if (tr->szHelpText == nullptr)
- return mir_wstrdup(tr->tszTokenString);
+ return mir_wstrdup(tr->szTokenString.w);
char *helpText = mir_strdup(tr->szHelpText);
if (helpText == nullptr)
@@ -292,7 +292,7 @@ static wchar_t *getTokenDescription(TOKENREGISTEREX *tr)
}
else args = nullptr;
- size_t len = mir_wstrlen(tr->tszTokenString) + (args!=nullptr?mir_strlen(args):0) + 3;
+ size_t len = mir_wstrlen(tr->szTokenString.w) + (args!=nullptr?mir_strlen(args):0) + 3;
wchar_t *desc = (wchar_t*)mir_calloc(len * sizeof(wchar_t));
if (desc == nullptr) {
mir_free(helpText);
@@ -305,7 +305,7 @@ static wchar_t *getTokenDescription(TOKENREGISTEREX *tr)
if (args != nullptr)
tArgs = mir_a2u(args);
- mir_snwprintf(desc, len, L"%c%s%s", FUNC_CHAR, tr->tszTokenString, (tArgs!=nullptr?tArgs:L""));
+ mir_snwprintf(desc, len, L"%c%s%s", FUNC_CHAR, tr->szTokenString.w, (tArgs!=nullptr?tArgs:L""));
}
mir_free(tArgs);
@@ -329,10 +329,10 @@ static int CALLBACK compareTokenHelp(LPARAM lParam1, LPARAM lParam2, LPARAM)
if (res != 0)
return res;
- if (tr1->tszTokenString == nullptr || tr2->tszTokenString == nullptr)
+ if (tr1->szTokenString.w == nullptr || tr2->szTokenString.w == nullptr)
return 0;
- return mir_wstrcmp(tr1->tszTokenString, tr2->tszTokenString);
+ return mir_wstrcmp(tr1->szTokenString.w, tr2->szTokenString.w);
}
static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
@@ -361,18 +361,18 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
i++;
tszHelpDesc = tszTokenDesc = nullptr;
tr = getTokenRegister(i);
- if ((tr == nullptr) || (tr->tszTokenString == nullptr))
+ if ((tr == nullptr) || (tr->szTokenString.w == nullptr))
continue;
else if (hdd != nullptr) {
- if (!mir_wstrcmp(tr->tszTokenString, SUBJECT)) {
+ if (!mir_wstrcmp(tr->szTokenString.w, SUBJECT)) {
if (hdd->vhs->flags&VHF_HIDESUBJECTTOKEN)
continue;
if (hdd->vhs->szSubjectDesc != nullptr)
tszHelpDesc = mir_a2u(hdd->vhs->szSubjectDesc);
}
- if (!mir_wstrcmp(tr->tszTokenString, MIR_EXTRATEXT)) {
+ if (!mir_wstrcmp(tr->szTokenString.w, MIR_EXTRATEXT)) {
if (hdd->vhs->flags & VHF_HIDEEXTRATEXTTOKEN)
continue;
@@ -462,13 +462,13 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA
if (tr == nullptr)
break;
- size_t len = mir_wstrlen(tr->tszTokenString) + 2;
+ size_t len = mir_wstrlen(tr->szTokenString.w) + 2;
wchar_t *tokenString = (wchar_t*)mir_alloc((len+1)*sizeof(wchar_t));
if (tokenString == nullptr)
break;
memset(tokenString, 0, ((len + 1) * sizeof(wchar_t)));
- mir_snwprintf(tokenString, len + 1, L"%c%s%c", (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '(');
+ mir_snwprintf(tokenString, len + 1, L"%c%s%c", (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->szTokenString.w, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '(');
SendDlgItemMessage(hwndInputDlg, IDC_TESTSTRING, EM_REPLACESEL, TRUE, (LPARAM)tokenString);
mir_free(tokenString);
SetFocus(GetDlgItem(hwndInputDlg, IDC_TESTSTRING));
@@ -805,12 +805,12 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
hShow = hShow == nullptr ? hPage : hShow;
- if ((dat->vhs->fi != nullptr) && (dat->vhs->fi->szFormat != nullptr)) {
+ if ((dat->vhs->fi != nullptr) && (dat->vhs->fi->szFormat.w != nullptr)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
- SendMessage(hwndDlg, VARM_SETINPUTTEXT, 0, (LPARAM)dat->vhs->fi->tszFormat);
+ SendMessage(hwndDlg, VARM_SETINPUTTEXT, 0, (LPARAM)dat->vhs->fi->szFormat.w);
else {
- WCHAR *wszFormatString = mir_a2u(dat->vhs->fi->szFormat);
+ wchar_t *wszFormatString = mir_a2u(dat->vhs->fi->szFormat.a);
SendMessage(hwndDlg, VARM_SETINPUTTEXT, 0, (LPARAM)wszFormatString);
mir_free(wszFormatString);
@@ -852,19 +852,19 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
}
if ((dat->vhs->flags&VHF_EXTRATEXT) ||
- ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != nullptr) && (dat->vhs->fi->tszExtraText != nullptr))) {
+ ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != nullptr) && (dat->vhs->fi->szExtraText.w != nullptr))) {
// extratext window is created, but not necessarily shown
dat->hwndExtraTextDlg = hPage = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXTRATEXT_DIALOG), hwndDlg, extratextDlgProc, (LPARAM)GetParent(hwndDlg));
EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2 * iFrameX, (rcTabs.bottom - rcTabs.top) - 2 * iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
- if ((dat->vhs->fi != nullptr) && (dat->vhs->fi->tszExtraText != nullptr)) {
+ if ((dat->vhs->fi != nullptr) && (dat->vhs->fi->szExtraText.w != nullptr)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
- SendMessage(hwndDlg, VARM_SETEXTRATEXT, 0, (LPARAM)dat->vhs->fi->tszExtraText);
+ SendMessage(hwndDlg, VARM_SETEXTRATEXT, 0, (LPARAM)dat->vhs->fi->szExtraText.w);
else {
- WCHAR *wszSource = mir_a2u(dat->vhs->fi->szExtraText);
+ wchar_t *wszSource = mir_a2u(dat->vhs->fi->szExtraText.a);
SendMessage(hwndDlg, VARM_SETEXTRATEXT, 0, (LPARAM)wszSource);
mir_free(wszSource);
@@ -906,12 +906,12 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
if (len > 0) {
if ((dat->vhs->fi != nullptr) && (!(dat->vhs->flags&VHF_DONTFILLSTRUCT))) {
if (dat->vhs->fi->flags&FIF_UNICODE) {
- dat->vhs->fi->tszFormat = (wchar_t*)mir_calloc((len + 1)*sizeof(WCHAR));
- SendMessage(hwndDlg, VARM_GETINPUTTEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->tszFormat);
+ dat->vhs->fi->szFormat.w = (wchar_t*)mir_calloc((len + 1)*sizeof(wchar_t));
+ SendMessage(hwndDlg, VARM_GETINPUTTEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szFormat.w);
}
else {
- dat->vhs->fi->szFormat = (char*)mir_calloc(len + 1);
- SendMessageA(hwndDlg, VARM_GETINPUTTEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szFormat);
+ dat->vhs->fi->szFormat.a = (char*)mir_calloc(len + 1);
+ SendMessageA(hwndDlg, VARM_GETINPUTTEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szFormat.a);
}
}
}
@@ -940,12 +940,12 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
int len = SendMessage(hwndDlg, VARM_GETEXTRATEXTLENGTH, 0, 0);
if (len > 0) {
if (dat->vhs->fi->flags&FIF_UNICODE) {
- dat->vhs->fi->tszExtraText = (wchar_t*)mir_calloc((len + 1)*sizeof(WCHAR));
- SendMessage(hwndDlg, VARM_GETEXTRATEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->tszExtraText);
+ dat->vhs->fi->szExtraText.w = (wchar_t*)mir_calloc((len + 1)*sizeof(wchar_t));
+ SendMessage(hwndDlg, VARM_GETEXTRATEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szExtraText.w);
}
else {
- dat->vhs->fi->szExtraText = (char*)mir_calloc(len + 1);
- SendMessageA(hwndDlg, VARM_GETEXTRATEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szExtraText);
+ dat->vhs->fi->szExtraText.a = (char*)mir_calloc(len + 1);
+ SendMessageA(hwndDlg, VARM_GETEXTRATEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szExtraText.a);
}
}
dat->vhs->fi->hContact = (MCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
@@ -1141,7 +1141,7 @@ INT_PTR showHelpService(WPARAM wParam, LPARAM lParam)
memset(fi, 0, sizeof(FORMATINFO));
fi->cbSize = sizeof(FORMATINFO);
- fi->szFormat = (char *)lParam;
+ fi->szFormat.a = (char *)lParam;
if (vhs == nullptr)
vhs = (VARHELPINFO*)mir_alloc(sizeof(VARHELPINFO));