From 77d5da22c96501bb51a348afee5aed48a02d1956 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Apr 2018 23:24:15 +0200 Subject: compilation fix --- plugins/ClientChangeNotify/src/Misc.h | 2 +- plugins/ClientChangeNotify/src/Options.cpp | 6 +++--- plugins/NewAwaySysMod/src/Notification.cpp | 2 +- plugins/NewAwaySysMod/src/Options.cpp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h index 2de5d756d2..9ea8beba5d 100644 --- a/plugins/ClientChangeNotify/src/Misc.h +++ b/plugins/ClientChangeNotify/src/Misc.h @@ -47,7 +47,7 @@ __inline void ShowLog(TCString &LogFilePath) { wchar_t szError[64]; mir_snwprintf(szError, TranslateT("Error #%d"), Result); - ShowMsg(szError, TranslateT("Can't open log file ") + LogFilePath, true); + ShowMsg(szError, TCString(TranslateT("Can't open log file ")) + LogFilePath, true); } } diff --git a/plugins/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp index e9674592a7..fbca20ce87 100644 --- a/plugins/ClientChangeNotify/src/Options.cpp +++ b/plugins/ClientChangeNotify/src/Options.cpp @@ -278,15 +278,15 @@ int TreeReadEnum(const char *szSetting, void *lParam) char Flags = (pData->TreeCtrl->TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL && !(pData->TreeCtrl->TreeFlags & TREECTRL_FLAG_HAS_CHECKBOXES)) ? 0 : db_get_b(NULL, pData->sModule, pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + TREEITEM_DBSTR_FLAGS + (szSetting + Len), 0); if (ParentID >= 0 && Order >= 0) { + CString tmp(pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + CString(szSetting + Len)); + CTreeItem &pItem = pData->TreeCtrl->m_value.SetAtGrow(Order); pItem.ID = ID; pItem.ParentID = ParentID; pItem.Flags = Flags; pItem.hItem = nullptr; pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L""); - pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == nullptr) ? nullptr : - db_get_s(NULL, pData->sModule, - *pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (wchar_t*)nullptr); + pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == nullptr) ? nullptr : db_get_s(NULL, pData->sModule, tmp, (wchar_t*)nullptr); } } return 0; diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index a451c2d392..58b4eaf8dd 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -42,6 +42,6 @@ void ShowLog(TCString &LogFilePath) if (Result <= 32) { wchar_t szError[64]; mir_snwprintf(szError, TranslateT("Error #%d"), Result); - ShowMsg(szError, TranslateT("Can't open log file ") + LogFilePath, true); + ShowMsg(szError, TCString(TranslateT("Can't open log file ")) + LogFilePath, true); } } diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index 37481c2e51..93bd19c804 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -278,15 +278,15 @@ int TreeReadEnum(const char *szSetting, void *lParam) char Flags = (pData->TreeCtrl->TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL && !(pData->TreeCtrl->TreeFlags & TREECTRL_FLAG_HAS_CHECKBOXES)) ? 0 : db_get_b(NULL, pData->sModule, pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + TREEITEM_DBSTR_FLAGS + (szSetting + Len), 0); if (ParentID >= 0 && Order >= 0) { + CString tmp(pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + CString(szSetting + Len)); + CTreeItem &pItem = pData->TreeCtrl->m_value.SetAtGrow(Order); pItem.ID = ID; pItem.ParentID = ParentID; pItem.Flags = Flags; pItem.hItem = nullptr; pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L""); - pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == nullptr) ? nullptr : - db_get_s(NULL, pData->sModule, - *pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (wchar_t*)nullptr); + pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == nullptr) ? nullptr : db_get_s(NULL, pData->sModule, tmp, (wchar_t*)nullptr); } } return 0; -- cgit v1.2.3