diff options
author | George Hazan <george.hazan@gmail.com> | 2023-08-02 20:58:41 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-08-02 20:58:41 +0300 |
commit | 80b4989230d4532657c09436fdc09b1596baa103 (patch) | |
tree | 2658c2d06f28c79e3de70c54018ecacb3469a0a2 /src/core/stdmsg | |
parent | 87d62840dbe2252614bcb174d91574de900970c4 (diff) |
StdMsg: fix for #3605
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 26 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 1 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 4254e28119..52c8a90a76 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -135,11 +135,11 @@ bool CMsgDialog::OnInitDialog() m_iSplitterY = g_plugin.getDword(g_plugin.bSavePerContact ? m_hContact : 0, "splitterPos", m_minEditInit.bottom - m_minEditInit.top);
m_message.SendMsg(EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_CHANGE);
+ OnOptionsApplied(false);
+ UpdateAvatar();
if (isChat()) {
- OnOptionsApplied(false);
OnActivate();
- UpdateAvatar();
UpdateOptions();
UpdateStatusBar();
UpdateTitle();
@@ -166,8 +166,6 @@ bool CMsgDialog::OnInitDialog() if (bUpdate)
UpdateLastMessage();
- OnOptionsApplied(false);
-
uint32_t dwFlags = SWP_NOMOVE | SWP_NOSIZE;
if (!g_Settings.bTabsEnable)
dwFlags |= SWP_SHOWWINDOW;
@@ -181,8 +179,6 @@ bool CMsgDialog::OnInitDialog() SetForegroundWindow(m_hwnd);
SetFocus(m_message.GetHwnd());
}
-
- UpdateAvatar();
}
// restore saved msg if any...
@@ -199,6 +195,8 @@ bool CMsgDialog::OnInitDialog() }
}
+ PostMessage(m_hwnd, DM_REDRAW, 0, 0);
+
NotifyEvent(MSG_WINDOW_EVT_OPEN);
return true;
}
@@ -537,8 +535,19 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) UpdateAvatar();
break;
+ case DM_REDRAW:
+ if (isChat())
+ RedrawLog();
+ else
+ RemakeLog();
+ break;
+
case DM_OPTIONSAPPLIED:
OnOptionsApplied(wParam != 0);
+ if (isChat())
+ RedrawLog();
+ else
+ RemakeLog();
break;
case DM_NEWTIMEZONE:
@@ -1136,11 +1145,6 @@ void CMsgDialog::OnOptionsApplied(bool bUpdateAvatar) m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (WPARAM)&cf);
m_pLog->Clear();
- if (isChat())
- RedrawLog();
- else
- RemakeLog();
-
FixTabIcons();
}
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 51662e669d..de37332373 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SRMM_MSGS_H
#define DM_OPTIONSAPPLIED (WM_USER+14)
+#define DM_REDRAW (WM_USER+15)
#define DM_UPDATETITLE (WM_USER+16)
#define DM_NEWTIMEZONE (WM_USER+18)
#define HM_AVATARACK (WM_USER+28)
|