diff options
Diffstat (limited to 'plugins/Scriver/src/msgutils.cpp')
| -rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 39 | 
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index bb9da0e619..4f4fb2349b 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -294,6 +294,45 @@ void CMsgDialog::NotifyTyping(int mode)  		CallService(MS_PROTO_SELFISTYPING, m_hContact, m_nTypeMode);  } +void CMsgDialog::OnOptionsApplied() +{ +	if (isChat()) +		return; + +	GetAvatar(); +	SetDialogToType(); + +	m_pLog->UpdateOptions(); + +	COLORREF colour = g_plugin.getDword(SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); +	m_message.SendMsg(EM_SETBKGNDCOLOR, 0, colour); +	InvalidateRect(m_message.GetHwnd(), nullptr, FALSE); + +	LOGFONT lf; +	LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, &colour); + +	CHARFORMAT2 cf2; +	memset(&cf2, 0, sizeof(cf2)); +	cf2.cbSize = sizeof(cf2); +	cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_BOLD | CFM_ITALIC; +	cf2.crTextColor = colour; +	cf2.bCharSet = lf.lfCharSet; +	wcsncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE); +	cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0); +	cf2.wWeight = (uint16_t)lf.lfWeight; +	cf2.bPitchAndFamily = lf.lfPitchAndFamily; +	cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY; +	m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); +	m_message.SendMsg(EM_SETLANGOPTIONS, 0, (LPARAM)m_message.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD); + +	SendMessage(m_hwnd, DM_REMAKELOG, 0, 0); +	UpdateTitle(); +	UpdateTabControl(); +	UpdateStatusBar(); +	m_message.SendMsg(EM_REQUESTRESIZE, 0, 0); +	SetupInfobar(); +} +  void CMsgDialog::Reattach(HWND hwndContainer)  {  	MCONTACT hContact = m_hContact;  | 
