diff options
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 21 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 13 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 13 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 2 |
6 files changed, 14 insertions, 46 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 009b6f3f64..5d093e9bd9 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1083,23 +1083,10 @@ void CMsgDialog::DM_EventAdded(WPARAM hContact, LPARAM lParam) } m_cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0); - if (hDbEvent != m_hDbEventFirst || isChat()) { - if (!m_bScrollingDisabled) - StreamEvents(hDbEvent, 1, 1); - else { - if (m_iNextQueuedEvent >= m_iEventQueueSize) { - m_hQueuedEvents = (MEVENT*)mir_realloc(m_hQueuedEvents, (m_iEventQueueSize + 10) * sizeof(MEVENT)); - m_iEventQueueSize += 10; - } - m_hQueuedEvents[m_iNextQueuedEvent++] = hDbEvent; - - wchar_t szBuf[100]; - mir_snwprintf(szBuf, TranslateT("Auto scrolling is disabled, %d message(s) queued (press F12 to enable it)"), m_iNextQueuedEvent); - SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, szBuf); - RedrawWindow(GetDlgItem(m_hwnd, IDC_LOGFROZENTEXT), nullptr, nullptr, RDW_INVALIDATE); - } - } - else RemakeLog(); + if (hDbEvent != m_hDbEventFirst || isChat()) + StreamEvents(hDbEvent, 1, 1); + else + RemakeLog(); // handle tab flashing if (!bDisableNotify && !bIsStatusChangeEvent) diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 888095a85b..54c381ed0a 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -374,7 +374,6 @@ CMsgDialog::~CMsgDialog() {
mir_free(m_sendBuffer);
mir_free(m_hHistoryEvents);
- mir_free(m_hQueuedEvents);
if (m_hClientIcon) DestroyIcon(m_hClientIcon);
if (m_hSmileyIcon) DestroyIcon(m_hSmileyIcon);
@@ -469,8 +468,6 @@ bool CMsgDialog::OnInitDialog() if (M.GetByte(m_hContact, "no_ack", 0))
m_sendMode |= SMODE_NOACK;
- m_hQueuedEvents = (MEVENT*)mir_calloc(sizeof(MEVENT)* EVENT_QUEUE_SIZE);
- m_iEventQueueSize = EVENT_QUEUE_SIZE;
m_iCurrentQueueError = -1;
// message history limit
@@ -1573,8 +1570,7 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter) if (msg == WM_KEYDOWN && wp == VK_F12) {
if (isShift || isCtrl || isAlt)
return _dlgReturn(m_hwnd, 1);
- if (m_bScrollingDisabled)
- ReplayQueue();
+
m_bScrollingDisabled = !m_bScrollingDisabled;
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, (m_bNotOnList || m_bScrollingDisabled) ? SW_SHOW : SW_HIDE);
if (!m_bScrollingDisabled)
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 67e85f43b8..4eefe4db8c 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1229,19 +1229,6 @@ void CMsgDialog::RemakeLog() } ///////////////////////////////////////////////////////////////////////////////////////// - -void CMsgDialog::ReplayQueue() -{ - for (int i = 0; i < m_iNextQueuedEvent; i++) - if (m_hQueuedEvents[i] != 0) - StreamEvents(m_hQueuedEvents[i], 1, 1); - - m_iNextQueuedEvent = 0; - SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, m_bNotOnList ? TranslateT("Contact not on list. You may add it...") : - TranslateT("Auto scrolling is disabled (press F12 to enable it)")); -} - -///////////////////////////////////////////////////////////////////////////////////////// // saves a contact picture to disk // takes hbm (bitmap handle) and bool isOwnPic (1 == save the picture as your own avatar) // requires AVS service (Miranda 0.7+) diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 5e05db523c..e00e5d603a 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -1269,10 +1269,8 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DBEVEN // begin to draw
m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
-
m_rtf.SendMsg(EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
- m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&oldSel);
- m_rtf.SendMsg(EM_HIDESELECTION, FALSE, 0);
+
m_pDlg.m_hDbEventLast = streamData.hDbEventLast;
if (m_pDlg.m_isAutoRTL & 1)
@@ -1304,8 +1302,13 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DBEVEN ReplaceIcons(startAt, fAppend, isSent);
m_pDlg.m_bClrAdded = false;
- int len = GetWindowTextLength(m_rtf.GetHwnd())-1;
- m_rtf.SendMsg(EM_SETSEL, len, len);
+ if (!m_pDlg.m_bScrollingDisabled) {
+ int len = GetWindowTextLength(m_rtf.GetHwnd()) - 1;
+ m_rtf.SendMsg(EM_SETSEL, len, len);
+ }
+ else m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&oldSel);
+
+ m_rtf.SendMsg(EM_HIDESELECTION, FALSE, 0);
m_rtf.SendMsg(WM_SETREDRAW, TRUE, 0);
InvalidateRect(m_rtf.GetHwnd(), nullptr, FALSE);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 0305e83909..bf365bf55f 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -392,7 +392,6 @@ class CMsgDialog : public CSrmmBaseDialog void LoadSplitter(void);
void PlayIncomingSound(void) const;
LRESULT ProcessHotkeysByMsgFilter(const CCtrlBase &pCtrl, UINT msg, WPARAM wParam, LPARAM lParam);
- void ReplayQueue(void);
void SaveAvatarToFile(HBITMAP hbm, int isOwnPic);
void SendHBitmapAsFile(HBITMAP hbmp) const;
void ShowPopupMenu(const CCtrlBase&, POINT pt);
@@ -435,10 +434,6 @@ class CMsgDialog : public CSrmmBaseDialog bool m_bDeferredScroll, m_bDeferredRemakeLog;
bool m_bWasBackgroundCreate;
- MEVENT *m_hQueuedEvents;
- int m_iNextQueuedEvent;
- int m_iEventQueueSize;
-
int m_iRealAvatarHeight;
int m_iButtonBarReallyNeeds;
DWORD m_dwLastActivity;
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 555d02ff66..ff0f96126a 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
#define __MINOR_VERSION 6
#define __RELEASE_NUM 1
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>
|