diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-28 13:29:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-28 13:29:27 +0300 |
commit | a63e68f4047e60f85597ce052c23563228c1af78 (patch) | |
tree | 368a8406d9f552d7156f08cc46a70a7c1899e06b | |
parent | a6fee0d53fb640868e010e0dc54b116d9d143ddf (diff) |
related to #1679 - fix for protocol names
-rw-r--r-- | plugins/IEView/src/Options.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index eb62d1db80..874438be12 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -312,18 +312,18 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates) TreeView_SetImageList(hProtoList, hProtocolImageList, TVSIL_NORMAL);
for (auto &it : arTemp) {
- char protoName[128];
TVINSERTSTRUCT tvi = {};
tvi.hParent = TVI_ROOT;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE;
tvi.item.stateMask = TVIS_SELECTED | TVIS_STATEIMAGEMASK;
if (it->getProtocolName() == nullptr)
- strncpy_s(protoName, Translate("Default"), _TRUNCATE);
- else
- CallProtoService(it->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
+ tvi.item.pszText = TranslateT("Default");
+ else {
+ PROTOACCOUNT *pa = Proto_GetAccount(it->getProtocolName());
+ tvi.item.pszText = (pa == nullptr) ? L"" : pa->tszAccountName;
+ }
- tvi.item.pszText = mir_a2u(protoName);
tvi.item.lParam = (LPARAM)it;
tvi.item.iImage = tvi.item.iSelectedImage = arTemp.indexOf(&it);
switch (mode) {
|