summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-13 21:06:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-13 21:06:12 +0300
commit3edf6f4e2c090738da307b3ba7c31469ed964b5d (patch)
tree1b6b635bd1381b57674e7c5a6f9dd0f4ce3bad7d /src
parent2530c0baecb30ca4a97b5118c6ddab02318c7ca1 (diff)
fixes #1353 (StdMsg: missing window icon if tabs are disabled)
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/chat_manager.cpp1
-rw-r--r--src/core/stdmsg/src/tabs.cpp13
2 files changed, 10 insertions, 4 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp
index d55671f558..fd0bf8cf8a 100644
--- a/src/core/stdmsg/src/chat_manager.cpp
+++ b/src/core/stdmsg/src/chat_manager.cpp
@@ -199,6 +199,7 @@ static void ShowRoom(SESSION_INFO *si)
pDlg->SetParent(pContainer->GetHwnd());
pDlg->Create();
pContainer->Show();
+ pContainer->FixTabIcons(pDlg);
PostMessage(pContainer->GetHwnd(), WM_SIZE, 0, 0);
}
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index ba2e2670c5..a464ee96ad 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -284,10 +284,6 @@ void CTabbedWindow::FixTabIcons(CSrmmBaseDialog *pDlg)
if (pDlg == nullptr)
return;
- int idx = m_tab.GetDlgIndex(pDlg);
- if (idx == -1)
- return;
-
int image = 0;
if (SESSION_INFO *si = ((CChatRoomDlg*)pDlg)->m_si) {
if (!(si->wState & GC_EVENT_HIGHLIGHT)) {
@@ -297,6 +293,15 @@ void CTabbedWindow::FixTabIcons(CSrmmBaseDialog *pDlg)
}
else image = pcli->pfnIconFromStatusMode(GetContactProto(pDlg->m_hContact), Contact_GetStatus(pDlg->m_hContact), pDlg->m_hContact);
+ if (pDlg == m_pEmbed) {
+ SendMessage(m_hwnd, WM_SETICON, 0, (LPARAM)ImageList_GetIcon(Clist_GetImageList(), image, 0));
+ return;
+ }
+
+ int idx = m_tab.GetDlgIndex(pDlg);
+ if (idx == -1)
+ return;
+
TCITEM tci = {};
tci.mask = TCIF_IMAGE;
TabCtrl_GetItem(m_tab.GetHwnd(), idx, &tci);