summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-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);