Skip to content

Commit 94f68c2

Browse files
committed
SetTitle now also changes tabs if tabbed frame used
1 parent 444d87f commit 94f68c2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

MDITabs.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,15 @@ CString GetTabText (HWND hwnd)
107107
{
108108
CChildFrame * pWorldFrame = (CChildFrame *) pWnd;
109109
CMUSHclientDoc * pDoc = pWorldFrame->m_pDoc;
110-
strName = pDoc->m_mush_name;
111-
if (pDoc->m_new_lines && !pDoc->m_bDoNotShowOutstandingLines)
112-
strName += CFormat (" (%i)", pDoc->m_new_lines);
113-
110+
// custom title?
111+
if (pDoc->m_strWindowTitle.IsEmpty ())
112+
{
113+
strName = pDoc->m_mush_name;
114+
if (pDoc->m_new_lines && !pDoc->m_bDoNotShowOutstandingLines)
115+
strName += CFormat (" (%i)", pDoc->m_new_lines);
116+
}
117+
else
118+
strName = pDoc->m_strWindowTitle;
114119
}
115120
else if (pWnd->IsKindOf(RUNTIME_CLASS(CTextChildFrame)))
116121
{
@@ -122,6 +127,7 @@ CString GetTabText (HWND hwnd)
122127
strName += " *";
123128
}
124129

130+
strName.Replace ("&", "&&");
125131
return strName;
126132
}
127133

0 commit comments

Comments
 (0)