Set the mark in the window close button to signal document modified, rather than prepending a star to the window title, on wxMac.

Originally committed to SVN as r1576.
This commit is contained in:
Niels Martin Hansen 2007-09-22 03:07:16 +00:00
parent eee384aa0f
commit 50f6d65ace

View file

@ -765,7 +765,9 @@ void FrameMain::UpdateTitle() {
// Create ideal title
wxString newTitle = _T("");
#ifndef __WXMAC__
if (subsMod) newTitle << _T("* ");
#endif
if (AssFile::top->filename != _T("")) {
wxFileName file (AssFile::top->filename);
newTitle << file.GetFullName();
@ -773,6 +775,12 @@ void FrameMain::UpdateTitle() {
else newTitle << _T("Untitled");
newTitle << _T(" - Aegisub ") << GetAegisubLongVersionString();
#ifdef __WXMAC__
// On Mac, set the mark in the close button
WindowRef wnd = (WindowRef)MacGetWindowRef();
SetWindowModified(wnd, subsMod);
#endif
// Get current title
wxString curTitle = GetTitle();
if (curTitle != newTitle) SetTitle(newTitle);