diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-09 20:37:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-09 20:37:14 +0300 |
commit | 10da0027082793a8c83c155cc96bf383ba78eb8e (patch) | |
tree | 1dbd7172c7233d0103507927db676e1f48974086 /plugins | |
parent | 400f3c5d7a2aef943aaf4ee69f47eadc87110727 (diff) |
Scriver: further code unification
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/chat_log.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 115 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 161 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 9 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/tabs.h | 1 |
7 files changed, 135 insertions, 155 deletions
diff --git a/plugins/Scriver/src/chat_log.cpp b/plugins/Scriver/src/chat_log.cpp index 5ad2e75b1a..acc786eb4b 100644 --- a/plugins/Scriver/src/chat_log.cpp +++ b/plugins/Scriver/src/chat_log.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define EM_GETSCROLLPOS (WM_USER+221)
#endif
-void CMsgDialog::StreamInEvents(LOGINFO* lin, bool bRedraw)
+void CMsgDialog::StreamInEvents(LOGINFO *lin, bool bRedraw)
{
if (m_hwnd == nullptr || lin == nullptr || m_si == nullptr)
return;
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index ea8deba198..5b3d886ccf 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -193,37 +193,81 @@ void CMsgDialog::UpdateNickList() void CMsgDialog::UpdateOptions()
{
- m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2));
- m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2));
+ m_bUseRtl = g_plugin.getByte(m_hContact, "UseRTL", 0) != 0;
+ m_bUseIEView = (g_dat.ieviewInstalled && g_dat.flags.bUseIeview && !isChat());
+
+ if (m_bUseIEView && m_hwndIeview == nullptr) {
+ IEVIEWWINDOW ieWindow = { sizeof(ieWindow) };
+ ieWindow.iType = IEW_CREATE;
+ ieWindow.dwMode = IEWM_SCRIVER;
+ ieWindow.parent = m_hwnd;
+ ieWindow.cx = 200;
+ ieWindow.cy = 300;
+ CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)& ieWindow);
+ m_hwndIeview = ieWindow.hwnd;
+ if (m_hwndIeview == nullptr)
+ m_bUseIEView = false;
+ }
+ else if (!m_bUseIEView && m_hwndIeview != nullptr) {
+ if (m_hwndIeview != nullptr) {
+ IEVIEWWINDOW ieWindow = { sizeof(ieWindow) };
+ ieWindow.iType = IEW_DESTROY;
+ ieWindow.hwnd = m_hwndIeview;
+ CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)& ieWindow);
+ }
+ m_hwndIeview = nullptr;
+ }
- m_btnBold.Enable(m_si->pMI->bBold);
- m_btnItalic.Enable(m_si->pMI->bItalics);
- m_btnUnderline.Enable(m_si->pMI->bUnderline);
- m_btnColor.Enable(m_si->pMI->bColor);
- m_btnBkColor.Enable(m_si->pMI->bBkgColor);
- if (m_si->iType == GCW_CHATROOM)
- m_btnChannelMgr.Enable(m_si->pMI->bChanMgr);
+ SendMessage(m_hwnd, DM_GETAVATAR, 0, 0);
+ SetDialogToType();
+
+ COLORREF colour = g_plugin.getDword(SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
+ m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour);
+ 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 = (WORD)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);
+
+ PARAFORMAT2 pf2;
+ memset(&pf2, 0, sizeof(pf2));
+ pf2.cbSize = sizeof(pf2);
+ pf2.dwMask = PFM_OFFSET;
+ pf2.dxOffset = (g_dat.flags.bIndentText) ? g_dat.indentSize * 1440 / g_dat.logPixelSX : 0;
+
+ ClearLog();
+ m_log.SendMsg(EM_SETPARAFORMAT, 0, (LPARAM)& pf2);
+ m_log.SendMsg(EM_SETLANGOPTIONS, 0, (LPARAM)m_log.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~(IMF_AUTOKEYBOARD | IMF_AUTOFONTSIZEADJUST));
+
+ if (isChat()) {
+ m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2));
+ m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2));
+
+ m_btnBold.Enable(m_si->pMI->bBold);
+ m_btnItalic.Enable(m_si->pMI->bItalics);
+ m_btnUnderline.Enable(m_si->pMI->bUnderline);
+ m_btnColor.Enable(m_si->pMI->bColor);
+ m_btnBkColor.Enable(m_si->pMI->bBkgColor);
+ if (m_si->iType == GCW_CHATROOM)
+ m_btnChannelMgr.Enable(m_si->pMI->bChanMgr);
+
+ FixTabIcons();
- UpdateStatusBar();
- UpdateTitle();
- FixTabIcons();
-
- m_log.SendMsg(EM_SETBKGNDCOLOR, 0, g_Settings.crLogBackground);
-
- // messagebox
- COLORREF crFore;
- LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &crFore);
-
- CHARFORMAT2 cf;
- cf.cbSize = sizeof(CHARFORMAT2);
- cf.dwMask = CFM_COLOR | CFM_BOLD | CFM_UNDERLINE | CFM_BACKCOLOR;
- cf.dwEffects = 0;
- cf.crTextColor = crFore;
- cf.crBackColor = g_plugin.getDword(SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
- m_message.SendMsg(EM_SETBKGNDCOLOR, 0, g_plugin.getDword(SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR));
- m_message.SendMsg(WM_SETFONT, (WPARAM)g_Settings.MessageBoxFont, MAKELPARAM(TRUE, 0));
- m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
- {
// nicklist
int ih = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListFont, false);
int ih2 = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListHeadingsFont, false);
@@ -235,10 +279,19 @@ void CMsgDialog::UpdateOptions() m_nickList.SendMsg(LB_SETITEMHEIGHT, 0, height > font ? height : font);
InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
+
+ RedrawLog2();
}
+ else {
+ UpdateTabControl();
+ SetupInfobar();
+ }
+
+ UpdateTitle();
+ UpdateStatusBar();
+
m_message.SendMsg(EM_REQUESTRESIZE, 0, 0);
Resize();
- RedrawLog2();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -330,7 +383,7 @@ void ShowRoom(SESSION_INFO *si) }
else pDlg = si->pDlg;
- SendMessage(pDlg->GetHwnd(), DM_UPDATETABCONTROL, -1, (LPARAM)si);
+ pDlg->UpdateTabControl();
pDlg->PopupWindow();
SendMessage(pDlg->GetHwnd(), WM_MOUSEACTIVATE, 0, 0);
SetFocus(GetDlgItem(pDlg->GetHwnd(), IDC_SRMM_MESSAGE));
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 01159450a0..547f745cfc 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
+LIST<CMsgDialog> g_arDialogs(10, PtrKeySortT);
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
static wchar_t* GetQuotedTextW(wchar_t *text)
{
size_t i, j, l = mir_wstrlen(text);
@@ -190,6 +194,8 @@ CMsgDialog::CMsgDialog(SESSION_INFO *si) : void CMsgDialog::Init()
{
+ g_arDialogs.insert(this);
+
m_autoClose = CLOSE_ON_CANCEL;
m_szProto = GetContactProto(m_hContact);
@@ -223,8 +229,8 @@ bool CMsgDialog::OnInitDialog() m_lastEventTime = time(0);
m_startTime = time(0);
- m_bUseRtl = g_plugin.getByte(m_hContact, "UseRTL", 0) != 0;
- m_bUseIEView = g_dat.ieviewInstalled ? g_dat.flags.bUseIeview : false;
+ m_pParent->AddChild(this);
+ UpdateOptions();
PARAFORMAT2 pf2;
memset(&pf2, 0, sizeof(pf2));
@@ -301,28 +307,7 @@ bool CMsgDialog::OnInitDialog() m_message.SendMsg(EM_EXLIMITTEXT, 0, nMax);
}
- // get around a lame bug in the Windows template resource code where richedits are limited to 0x7FFF
- m_log.SendMsg(EM_LIMITTEXT, sizeof(wchar_t) * 0x7FFFFFFF, 0);
- ::DragAcceptFiles(m_message.GetHwnd(), TRUE);
- CreateInfobar();
-
- if (m_bUseIEView) {
- IEVIEWWINDOW ieWindow = { sizeof(IEVIEWWINDOW) };
- ieWindow.iType = IEW_CREATE;
- ieWindow.dwMode = IEWM_SCRIVER;
- ieWindow.parent = m_hwnd;
- ieWindow.cx = 200;
- ieWindow.cy = 300;
- CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- m_hwndIeview = ieWindow.hwnd;
- if (m_hwndIeview == nullptr)
- m_bUseIEView = false;
- }
-
- m_pParent->AddChild(this);
-
if (isChat()) {
- UpdateOptions();
UpdateStatusBar();
UpdateTitle();
UpdateNickList();
@@ -331,6 +316,9 @@ bool CMsgDialog::OnInitDialog() m_nickList.Hide();
m_splitterX.Hide();
+ ::DragAcceptFiles(m_message.GetHwnd(), TRUE);
+ CreateInfobar();
+
bool notifyUnread = false;
if (m_hContact) {
int historyMode = g_plugin.iHistoryMode;
@@ -400,7 +388,7 @@ bool CMsgDialog::OnInitDialog() } while ((hdbEvent = db_event_prev(m_hContact, hdbEvent)));
}
- SendMessage(m_hwnd, DM_OPTIONSAPPLIED, 0, 0);
+ SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
if (notifyUnread) {
if (GetForegroundWindow() != m_hwndParent || m_pParent->m_hwndActive != m_hwnd) {
@@ -425,6 +413,8 @@ void CMsgDialog::OnDestroy() {
NotifyEvent(MSG_WINDOW_EVT_CLOSING);
+ g_arDialogs.remove(this);
+
if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
@@ -821,7 +811,7 @@ void CMsgDialog::Reattach(HWND hwndContainer) m_pParent->RemoveChild(m_hwnd);
SendMessage(m_hwnd, DM_SETPARENT, 0, (LPARAM)hParent);
m_pParent->AddChild(this);
- SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0);
+ UpdateTabControl();
m_pParent->ActivateChild(m_hwnd);
NotifyEvent(MSG_WINDOW_EVT_OPENING);
NotifyEvent(MSG_WINDOW_EVT_OPEN);
@@ -870,7 +860,10 @@ void CMsgDialog::SetDialogToType() }
m_message.Show();
- m_log.Show(m_hwndIeview == nullptr);
+
+ bool bLogEnabled = (m_hwndIeview == nullptr);
+ m_log.Show(bLogEnabled);
+ m_log.Enable(bLogEnabled);
m_splitterY.Show();
m_btnOk.Enable(m_message.GetRichTextLength() != 0);
@@ -914,47 +907,44 @@ void CMsgDialog::UpdateStatusBar() if (m_pParent->m_hwndActive != m_hwnd)
return;
+ wchar_t szTemp[512];
+
+ StatusBarData sbd = {};
+ sbd.iFlags = SBDF_TEXT | SBDF_ICON;
+ sbd.pszText = szTemp;
+
if (isChat()) {
- wchar_t szTemp[512];
mir_snwprintf(szTemp, L"%s : %s", m_si->pMI->ptszModDispName, m_si->ptszStatusbarText ? m_si->ptszStatusbarText : L"");
- StatusBarData sbd;
sbd.iItem = 0;
sbd.iFlags = SBDF_TEXT | SBDF_ICON;
sbd.hIcon = m_si->wStatus == ID_STATUS_ONLINE ? m_si->pMI->hOnlineIcon : m_si->pMI->hOfflineIcon;
- sbd.pszText = szTemp;
m_pParent->UpdateStatusBar(sbd, m_hwnd);
sbd.iItem = 1;
sbd.hIcon = nullptr;
- sbd.pszText = L"";
+ szTemp[0] = 0;
m_pParent->UpdateStatusBar(sbd, m_hwnd);
Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 0, 0);
}
else {
- wchar_t szText[256];
- StatusBarData sbd = { 0 };
- sbd.iFlags = SBDF_TEXT | SBDF_ICON;
if (m_iMessagesInProgress && g_dat.flags.bShowProgress) {
sbd.hIcon = g_plugin.getIcon(IDI_TIMESTAMP);
- sbd.pszText = szText;
- mir_snwprintf(szText, TranslateT("Sending in progress: %d message(s) left..."), m_iMessagesInProgress);
+ mir_snwprintf(szTemp, TranslateT("Sending in progress: %d message(s) left..."), m_iMessagesInProgress);
}
else if (m_nTypeSecs) {
sbd.hIcon = g_plugin.getIcon(IDI_TYPING);
- sbd.pszText = szText;
- mir_snwprintf(szText, TranslateT("%s is typing a message..."), Clist_GetContactDisplayName(m_hContact));
+ mir_snwprintf(szTemp, TranslateT("%s is typing a message..."), Clist_GetContactDisplayName(m_hContact));
m_nTypeSecs--;
}
else if (m_lastMessage) {
wchar_t date[64], time[64];
TimeZone_PrintTimeStamp(nullptr, m_lastMessage, L"d", date, _countof(date), 0);
TimeZone_PrintTimeStamp(nullptr, m_lastMessage, L"t", time, _countof(time), 0);
- mir_snwprintf(szText, TranslateT("Last message received on %s at %s."), date, time);
- sbd.pszText = szText;
+ mir_snwprintf(szTemp, TranslateT("Last message received on %s at %s."), date, time);
}
- else sbd.pszText = L"";
+ else szTemp[0] = 0;
m_pParent->UpdateStatusBar(sbd, m_hwnd);
UpdateReadChars();
@@ -985,6 +975,15 @@ void CMsgDialog::UpdateReadChars() }
}
+void CMsgDialog::UpdateTabControl()
+{
+ TabControlData tcd;
+ tcd.iFlags = TCDF_TEXT | TCDF_ICON;
+ tcd.hIcon = GetTabIcon();
+ tcd.pszText = Clist_GetContactDisplayName(m_hContact);
+ m_pParent->UpdateTabControl(tcd, m_hwnd);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
static const wchar_t *titleTokenNames[] = { L"%name%", L"%status%", L"%statusmsg%", L"%account%" };
@@ -1044,8 +1043,7 @@ void CMsgDialog::UpdateTitle() tbd.pszText = wszTitle.GetBuffer();
m_pParent->UpdateTitleBar(tbd, m_hwnd);
- if (isChat())
- SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0);
+ UpdateTabControl();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1579,14 +1577,6 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) }
break;
- case DM_UPDATETABCONTROL:
- TabControlData tcd;
- tcd.iFlags = TCDF_TEXT | TCDF_ICON;
- tcd.hIcon = GetTabIcon();
- tcd.pszText = Clist_GetContactDisplayName(m_hContact);
- m_pParent->UpdateTabControl(tcd, m_hwnd);
- break;
-
case DM_CLISTSETTINGSCHANGED:
if (wParam == m_hContact && m_hContact && m_szProto) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
@@ -1601,79 +1591,11 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) SetStatusIcon();
SendMessage(m_hwnd, DM_UPDATEICON, 0, 0);
UpdateTitle();
- SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0);
+ UpdateTabControl();
ShowAvatar();
}
break;
- case DM_OPTIONSAPPLIED:
- m_bUseIEView = g_dat.ieviewInstalled ? g_dat.flags.bUseIeview : false;
- if (m_bUseIEView && m_hwndIeview == nullptr) {
- IEVIEWWINDOW ieWindow = { sizeof(ieWindow) };
- ieWindow.iType = IEW_CREATE;
- ieWindow.dwMode = IEWM_SCRIVER;
- ieWindow.parent = m_hwnd;
- ieWindow.cx = 200;
- ieWindow.cy = 300;
- CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- m_hwndIeview = ieWindow.hwnd;
- if (m_hwndIeview == nullptr)
- m_bUseIEView = false;
- }
- else if (!m_bUseIEView && m_hwndIeview != nullptr) {
- if (m_hwndIeview != nullptr) {
- IEVIEWWINDOW ieWindow = { sizeof(ieWindow) };
- ieWindow.iType = IEW_DESTROY;
- ieWindow.hwnd = m_hwndIeview;
- CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- }
- m_hwndIeview = nullptr;
- }
-
- SendMessage(m_hwnd, DM_GETAVATAR, 0, 0);
- SetDialogToType();
- {
- COLORREF colour = g_plugin.getDword(SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
- m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour);
- 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 = (WORD)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);
- }
-
- memset(&pf2, 0, sizeof(pf2));
- pf2.cbSize = sizeof(pf2);
- pf2.dwMask = PFM_OFFSET;
- pf2.dxOffset = (g_dat.flags.bIndentText) ? g_dat.indentSize * 1440 / g_dat.logPixelSX : 0;
-
- ClearLog();
- m_log.SendMsg(EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
- m_log.SendMsg(EM_SETLANGOPTIONS, 0, (LPARAM)m_log.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~(IMF_AUTOKEYBOARD | IMF_AUTOFONTSIZEADJUST));
-
- SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
- UpdateTitle();
- SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0);
- UpdateStatusBar();
- m_message.SendMsg(EM_REQUESTRESIZE, 0, 0);
- SetupInfobar();
- break;
-
case DM_USERNAMETOCLIP:
if (m_hContact) {
char buf[128];
@@ -1929,6 +1851,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) }
}
else if (wParam == TIMERID_UNREAD) {
+ TabControlData tcd;
tcd.iFlags = TCDF_ICON;
if (!m_bShowTyping) {
m_iShowUnread++;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 45660ba6bc..062e19990a 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -79,7 +79,8 @@ int FontServiceFontsChanged(WPARAM, LPARAM) {
LoadMsgLogIcons();
LoadInfobarFonts();
- Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
+ for (auto &it : g_arDialogs)
+ it->UpdateOptions();
return 0;
}
@@ -182,7 +183,8 @@ class CBaseOptionDlg : public CDlgBase {
ReloadGlobals();
WindowList_Broadcast(g_dat.hParentWindowList, DM_OPTIONSAPPLIED, 0, 0);
- Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
+ for (auto &it : g_arDialogs)
+ it->UpdateOptions();
Chat_UpdateOptions();
}
@@ -839,7 +841,8 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam g_plugin.bShowTypingClist = IsDlgButtonChecked(hwndDlg, IDC_NOTIFYTRAY);
g_plugin.bShowTypingSwitch = IsDlgButtonChecked(hwndDlg, IDC_TYPINGSWITCH);
ReloadGlobals();
- Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
+ for (auto &it : g_arDialogs)
+ it->UpdateOptions();
}
break;
}
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index c0411a893c..5d43bc7ed6 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -156,6 +156,7 @@ public: void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;
+ void UpdateTabControl();
void UpdateTitle() override;
void FixTabIcons();
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 7c11576c55..45fd0c664f 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -135,5 +135,6 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam); #include "chat.h"
extern GlobalMessageData g_dat;
+extern LIST<CMsgDialog> g_arDialogs;
#endif
diff --git a/plugins/Scriver/src/tabs.h b/plugins/Scriver/src/tabs.h index bb2aeb7491..f5f37435d0 100644 --- a/plugins/Scriver/src/tabs.h +++ b/plugins/Scriver/src/tabs.h @@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MSGWINDOW_H
/* child window services */
-#define DM_UPDATETABCONTROL (WM_USER+0x1B2)
#define DM_SETPARENT (WM_USER+0x1B3)
#define DM_ACTIVATE (WM_USER+0x1B6)
#define DM_GETCONTEXTMENU (WM_USER+0x1B7)
|