diff options
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgother.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index bd25248102..f1ad440e6d 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1287,6 +1287,34 @@ int CMsgDialog::MsgWindowMenuHandler(int selection, int menuId) ///////////////////////////////////////////////////////////////////////////////////////// +void CMsgDialog::NotifyDeliveryFailure() const +{ + if (M.GetByte("adv_noErrorPopups", 0)) + return; + + if (!Popup_Enabled()) + return; + + POPUPDATAW ppd; + ppd.lchContact = m_hContact; + wcsncpy_s(ppd.lpwzContactName, m_cache->getNick(), _TRUNCATE); + wcsncpy_s(ppd.lpwzText, TranslateT("A message delivery has failed.\nClick to open the message window."), _TRUNCATE); + + if (!(BOOL)db_get_b(0, MODULE, OPT_COLDEFAULT_ERR, TRUE)) { + ppd.colorText = (COLORREF)db_get_dw(0, MODULE, OPT_COLTEXT_ERR, DEFAULT_COLTEXT); + ppd.colorBack = (COLORREF)db_get_dw(0, MODULE, OPT_COLBACK_ERR, DEFAULT_COLBACK); + } + else ppd.colorText = ppd.colorBack = 0; + + ppd.PluginWindowProc = Utils::PopupDlgProcError; + ppd.lchIcon = PluginConfig.g_iconErr; + ppd.PluginData = nullptr; + ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)DEFAULT_DELAY); + PUAddPopupW(&ppd); +} + +///////////////////////////////////////////////////////////////////////////////////////// + void CMsgDialog::PlayIncomingSound() const { int iPlay = MustPlaySound(); @@ -1594,6 +1622,25 @@ void CMsgDialog::SetMessageLog() } ///////////////////////////////////////////////////////////////////////////////////////// +// Sets a status bar text for a contact + +void CMsgDialog::SetStatusText(const wchar_t *wszText, HICON hIcon) +{ + if (wszText != nullptr) { + m_bStatusSet = true; + m_szStatusText = wszText; + m_szStatusIcon = hIcon; + } + else { + m_bStatusSet = false; + m_szStatusText.Empty(); + m_szStatusIcon = nullptr; + } + + tabUpdateStatusBar(); +} + +///////////////////////////////////////////////////////////////////////////////////////// void CMsgDialog::ShowPicture(bool showNewPic) { |