summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-17 20:43:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-17 20:43:20 +0300
commitac297d39f72433e077396a02c71526d50b157b17 (patch)
tree18d2fa80b717c9418d3456568e51998dce297e37 /plugins/Scriver/src
parentf4ba44ddae2289b44e11e42dc934cb03462793bf (diff)
Chat: common code moved to mir_app
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp46
2 files changed, 2 insertions, 45 deletions
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index f9c893b528..d404942836 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -153,7 +153,6 @@ public:
void CloseTab() override;
void LoadSettings() override;
- void RedrawLog() override;
void ScrollToBottom() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 8dff1c3e35..d69eb28703 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -218,40 +218,6 @@ void CMsgDialog::Reattach(HWND hwndContainer)
/////////////////////////////////////////////////////////////////////////////////////////
-static void __cdecl phase2(SESSION_INFO *si)
-{
- Thread_SetName("Scriver: phase2");
-
- Sleep(30);
- if (si && si->pDlg)
- si->pDlg->RedrawLog2();
-}
-
-void CMsgDialog::RedrawLog()
-{
- m_si->LastTime = 0;
- if (m_si->pLog) {
- LOGINFO *pLog = m_si->pLog;
- if (m_si->iEventCount > 60) {
- int index = 0;
- while (index < 59) {
- if (pLog->next == nullptr)
- break;
-
- pLog = pLog->next;
- if ((m_si->iType != GCW_CHATROOM && m_si->iType != GCW_PRIVMESS) || !m_bFilterEnabled || (m_iLogFilterFlags & pLog->iType) != 0)
- index++;
- }
- StreamInEvents(pLog, true);
- mir_forkThread<SESSION_INFO>(phase2, m_si);
- }
- else StreamInEvents(m_si->pLogEnd, true);
- }
- else ClearLog();
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
void CMsgDialog::ScrollToBottom()
{
if (m_hwndIeview != nullptr) {
@@ -524,14 +490,6 @@ 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_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);
-
UpdateStatusBar();
UpdateTitle();
FixTabIcons();
@@ -565,8 +523,8 @@ void CMsgDialog::UpdateOptions()
InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
}
m_message.SendMsg(EM_REQUESTRESIZE, 0, 0);
- Resize();
- RedrawLog2();
+
+ CSuper::UpdateOptions();
}
void CMsgDialog::UpdateStatusBar()