diff options
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index c0acfbd068..10ddae9188 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -595,25 +595,6 @@ bool CMsgDialog::OnInitDialog() DM_OptionsApplied();
- // restore saved msg if any...
- ptrW wszSavedMsg(g_plugin.getWStringA(m_hContact, "SavedMsg"));
- if (wszSavedMsg != 0) {
- SETTEXTEX stx = { ST_DEFAULT, 1200 };
- m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, wszSavedMsg);
- UpdateSaveAndSendButton();
- if (m_pContainer->m_hwndActive == m_hwnd)
- UpdateReadChars();
- }
-
- if (wszInitialText) {
- m_message.SetText(wszInitialText);
- int len = GetWindowTextLength(m_message.GetHwnd());
- PostMessage(m_message.GetHwnd(), EM_SETSEL, len, len);
- if (len)
- EnableSendButton(true);
- mir_free(wszInitialText);
- }
-
for (MEVENT hdbEvent = db_event_last(m_hContact); hdbEvent; hdbEvent = db_event_prev(m_hContact, hdbEvent)) {
DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
@@ -625,6 +606,25 @@ bool CMsgDialog::OnInitDialog() }
}
+ // restore saved msg if any...
+ ptrW wszSavedMsg(g_plugin.getWStringA(m_hContact, "SavedMsg"));
+ if (wszSavedMsg != 0) {
+ SETTEXTEX stx = { ST_DEFAULT, 1200 };
+ m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, wszSavedMsg);
+ UpdateSaveAndSendButton();
+ if (m_pContainer->m_hwndActive == m_hwnd)
+ UpdateReadChars();
+ }
+
+ if (wszInitialText) {
+ m_message.SetText(wszInitialText);
+ int len = GetWindowTextLength(m_message.GetHwnd());
+ PostMessage(m_message.GetHwnd(), EM_SETSEL, len, len);
+ if (len)
+ EnableSendButton(true);
+ mir_free(wszInitialText);
+ }
+
SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
SetWindowPos(m_hwnd, nullptr, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), m_bActivate ? 0 : SWP_NOZORDER | SWP_NOACTIVATE);
|