From d2e79ad0a421f2cc20c35f848e823d707f1f53d3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 11 Dec 2017 13:44:36 +0300 Subject: fixes #1061 (Plugins description not translatable) this fix allows the plugin's description translation to be put into plugin's own section --- src/mir_app/src/pluginopts.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 3efc6b9b44..200ac98f51 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -29,7 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "chat.h" #include "plugins.h" -extern MUUID miid_clist, miid_database, miid_protocol, miid_srmm; HANDLE hevLoadModule, hevUnloadModule; static bool bOldMode = false; @@ -101,7 +100,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM it.mask = LVIF_PARAM | LVIF_IMAGE; it.iImage = (hInst != nullptr) ? 2 : 3; bool bNoCheckbox = (dat->flags & STATIC_PLUGIN) != 0; - if (bNoCheckbox || hasMuuid(pi, miid_clist) || hasMuuid(pi, miid_protocol)) + if (bNoCheckbox || hasMuuid(pi, MIID_CLIST) || hasMuuid(pi, MIID_PROTOCOL)) it.iImage += 2; it.lParam = (LPARAM)dat; int iRow = ListView_InsertItem(hwndList, &it); @@ -424,7 +423,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar ListView_GetItemText(hwndList, hdr->iItem, 2, buf, _countof(buf)); SetDlgItemText(hwndDlg, IDC_PLUGININFOFRAME, sel ? buf : L""); SetDlgItemText(hwndDlg, IDC_PLUGINAUTHOR, sel ? dat->author : L""); - SetDlgItemText(hwndDlg, IDC_PLUGINLONGINFO, sel ? dat->description : L""); + SetDlgItemText(hwndDlg, IDC_PLUGINLONGINFO, sel ? TranslateW_LP(dat->description, GetPluginLangByInstance(dat->hInst)) : L""); SetDlgItemText(hwndDlg, IDC_PLUGINCPYR, sel ? dat->copyright : L""); SetDlgItemText(hwndDlg, IDC_PLUGINURL, sel ? dat->homepage : L""); -- cgit v1.2.3