From 094286a08f6fb60d69ff0b91b2c378ca0bd96eb7 Mon Sep 17 00:00:00 2001 From: "hyatt%mozilla.org" Date: Tue, 12 Aug 2003 05:51:39 +0000 Subject: [PATCH] Fix for 215296, r=bryner, sr=brendan, a=asa, This patch retains Seamonkey's behavior for titles on all platforms while patching Mac behavior to leave off the modifier for FB+TB git-svn-id: svn://10.0.0.236/trunk@145900 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xpfe/appshell/src/nsContentTreeOwner.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp index aef52966f70..cd461397863 100644 --- a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp +++ b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp @@ -710,10 +710,23 @@ void nsContentTreeOwner::XULWindow(nsXULWindow* aXULWindow) if(contentTitleSetting.Equals(NS_LITERAL_STRING("true"))) { mContentTitleSetting = PR_TRUE; - docShellElement->GetAttribute(NS_LITERAL_STRING("titlemodifier"), mWindowTitleModifier); - docShellElement->GetAttribute(NS_LITERAL_STRING("titlemenuseparator"), mTitleSeparator); - docShellElement->GetAttribute(NS_LITERAL_STRING("titlepreface"), mTitlePreface); docShellElement->GetAttribute(NS_LITERAL_STRING("titledefault"), mTitleDefault); + docShellElement->GetAttribute(NS_LITERAL_STRING("titlemodifier"), mWindowTitleModifier); + docShellElement->GetAttribute(NS_LITERAL_STRING("titlepreface"), mTitlePreface); + +#if defined(XP_MACOSX) && defined(MOZ_XUL_APP) + // On OS X, treat the titlemodifier like it's the titledefault, and don't ever append + // the separator + appname. + if (mTitleDefault.IsEmpty()) { + docShellElement->SetAttribute(NS_LITERAL_STRING("titledefault"), + mWindowTitleModifier); + docShellElement->RemoveAttribute(NS_LITERAL_STRING("titlemodifier")); + mTitleDefault = mWindowTitleModifier; + mWindowTitleModifier.Truncate(); + } +#else + docShellElement->GetAttribute(NS_LITERAL_STRING("titlemenuseparator"), mTitleSeparator); +#endif } } else