diff options
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 8 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 7 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 62 |
4 files changed, 3 insertions, 76 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 0a3933204c..4cdd7cbfbd 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -96,9 +96,6 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive) static void OnLoadSettings()
{
- g_Settings.iX = db_get_dw(0, CHAT_MODULE, "roomx", -1);
- g_Settings.iY = db_get_dw(0, CHAT_MODULE, "roomy", -1);
-
g_Settings.bTabsEnable = db_get_b(0, CHAT_MODULE, "Tabs", 1) != 0;
g_Settings.bTabsAtBottom = db_get_b(0, CHAT_MODULE, "TabBottom", 0) != 0;
g_Settings.bTabCloseOnDblClick = db_get_b(0, CHAT_MODULE, "TabCloseOnDblClick", 0) != 0;
@@ -106,6 +103,7 @@ static void OnLoadSettings() g_Settings.iSplitterX = db_get_w(0, CHAT_MODULE, "SplitterX", 105);
if (g_Settings.iSplitterX <= 50)
g_Settings.iSplitterX = 105;
+
g_Settings.iSplitterY = db_get_w(0, CHAT_MODULE, "SplitterY", 90);
if (g_Settings.iSplitterY <= 65)
g_Settings.iSplitterY = 90;
@@ -215,10 +213,6 @@ void Unload_ChatModule() {
db_set_w(0, CHAT_MODULE, "SplitterX", (uint16_t)g_Settings.iSplitterX);
db_set_w(0, CHAT_MODULE, "SplitterY", (uint16_t)g_Settings.iSplitterY);
- db_set_dw(0, CHAT_MODULE, "roomx", g_Settings.iX);
- db_set_dw(0, CHAT_MODULE, "roomy", g_Settings.iY);
- db_set_dw(0, CHAT_MODULE, "roomwidth", g_Settings.iWidth);
- db_set_dw(0, CHAT_MODULE, "roomheight", g_Settings.iHeight);
DestroyMenu(g_hMenu);
}
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ff1cb96e1e..d1c05cfe85 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -578,8 +578,6 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) CSuper::DlgProc(uMsg, wParam, lParam); // call built-in resizer
SetButtonsPos();
-
- InvalidateRect(m_pOwner->m_hwndStatus, nullptr, false);
}
return TRUE;
@@ -727,11 +725,6 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SetFocus(m_message.GetHwnd());
break;
- case WM_LBUTTONDBLCLK:
- if (LOWORD(lParam) < 30)
- m_pLog->ScrollToBottom();
- break;
-
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_ACTIVE)
break;
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 147023d023..130dc2e4a3 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -77,7 +77,6 @@ class CMsgDialog; class CTabbedWindow : public CDlgBase
{
- void SaveWindowPosition(bool bUpdateSession);
void SetWindowPosition();
int oldSizeX = 0, oldSizeY = 0;
@@ -140,7 +139,6 @@ struct LOGSTREAMDATA : public GCLogStreamDataBase {}; struct GlobalLogSettings : public GlobalLogSettingsBase
{
- int iX, iY;
int iSplitterX, iSplitterY;
bool bTabsEnable, bTabsAtBottom, bTabCloseOnDblClick;
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index f1eb1a4f32..fcce849ab8 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -180,8 +180,6 @@ void CTabbedWindow::OnDestroy() {
DestroyWindow(m_hwndStatus); m_hwndStatus = nullptr;
- SaveWindowPosition(true);
-
Utils_SaveWindowPosition(m_hwnd, g_plugin.bSavePerContact ? ((m_pEmbed == nullptr) ? 0 : m_pEmbed->m_hContact) : 0, CHAT_MODULE, "room");
if (m_pEmbed == nullptr)
@@ -190,17 +188,15 @@ void CTabbedWindow::OnDestroy() void CTabbedWindow::OnResize()
{
- CDlgBase::OnResize();
-
SendMessage(m_hwndStatus, WM_SIZE, 0, 0);
+ CDlgBase::OnResize();
+
if (m_pEmbed) {
RECT rc;
GetClientRect(m_tab.GetHwnd(), &rc);
MoveWindow(m_pEmbed->GetHwnd(), 0, 0, rc.right - rc.left, rc.bottom - rc.top, FALSE);
}
-
- SaveWindowPosition(false);
}
int CTabbedWindow::Resizer(UTILRESIZECONTROL *urc)
@@ -363,25 +359,6 @@ void CTabbedWindow::RemoveTab(CMsgDialog *pDlg) }
}
-void CTabbedWindow::SaveWindowPosition(bool bUpdateSession)
-{
- WINDOWPLACEMENT wp = {};
- wp.length = sizeof(wp);
- GetWindowPlacement(m_hwnd, &wp);
-
- g_Settings.iX = wp.rcNormalPosition.left;
- g_Settings.iY = wp.rcNormalPosition.top;
- g_Settings.iWidth = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
- g_Settings.iHeight = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
-
- if (bUpdateSession) {
- iX = g_Settings.iX;
- iY = g_Settings.iY;
- iWidth = g_Settings.iWidth;
- iHeight = g_Settings.iHeight;
- }
-}
-
void CTabbedWindow::SetMessageHighlight(CMsgDialog *pDlg)
{
if (m_tab.GetDlgIndex(pDlg) == -1)
@@ -410,20 +387,6 @@ void CTabbedWindow::SetWindowPosition() return;
}
- if (iX) {
- WINDOWPLACEMENT wp;
- wp.length = sizeof(wp);
- GetWindowPlacement(m_hwnd, &wp);
-
- wp.rcNormalPosition.left = iX;
- wp.rcNormalPosition.top = iY;
- wp.rcNormalPosition.right = wp.rcNormalPosition.left + iWidth;
- wp.rcNormalPosition.bottom = wp.rcNormalPosition.top + iHeight;
- wp.showCmd = SW_HIDE;
- SetWindowPlacement(m_hwnd, &wp);
- return;
- }
-
int flag = m_pEmbed->m_bNoActivate ? RWPF_HIDDEN : 0;
if (Utils_RestoreWindowPosition(m_hwnd, g_plugin.bSavePerContact ? m_pEmbed->m_hContact : 0, CHAT_MODULE, "room", flag)) {
if (g_plugin.bSavePerContact) {
@@ -534,27 +497,6 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) int idx;
switch (msg) {
- case WM_MOVE:
- SaveWindowPosition(false);
- break;
-
- case WM_ENTERSIZEMOVE:
- GetClientRect(m_hwnd, &rc);
- oldSizeX = rc.right - rc.left;
- oldSizeY = rc.bottom - rc.top;
- break;
-
- case WM_EXITSIZEMOVE:
- GetClientRect(m_hwnd, &rc);
- if (!((rc.right - rc.left) == oldSizeX && (rc.bottom - rc.top) == oldSizeY)) {
- CMsgDialog *pDlg = (g_Settings.bTabsEnable) ? (CMsgDialog*)m_tab.GetActivePage() : m_pEmbed;
- if (pDlg != nullptr) {
- pDlg->m_pLog->ScrollToBottom();
- pDlg->Resize();
- }
- }
- break;
-
case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
|