From 628b736830da71d20cfed5bbda00233675c0807c Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Sat, 16 Feb 2002 02:24:04 +0000 Subject: [PATCH] Don't try to show empty name on Composer caption, b=121684, r=brade, sr=hewitt git-svn-id: svn://10.0.0.236/trunk@114647 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/composer/src/nsEditorShell.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 7ebffb4be8d..f84c835d22f 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -1848,11 +1848,14 @@ nsEditorShell::UpdateWindowTitleAndRecentMenu(PRBool aSaveToPrefs) docFileSpec->GetScheme(getter_Copies(schemeChar)); nsXPIDLCString fileNameChar; url->GetFileName(getter_Copies(fileNameChar)); - windowCaption += NS_LITERAL_STRING(" [") + - NS_ConvertASCIItoUCS2(schemeChar) + - NS_LITERAL_STRING(":/.../") + - NS_ConvertASCIItoUCS2(fileNameChar) + - NS_LITERAL_STRING("]"); + if (fileNameChar.Length() > 0) + { + windowCaption += NS_LITERAL_STRING(" [") + + NS_ConvertASCIItoUCS2(schemeChar) + + NS_LITERAL_STRING(":/.../") + + NS_ConvertASCIItoUCS2(fileNameChar) + + NS_LITERAL_STRING("]"); + } } } nsCOMPtr contentAreaAsWin(do_QueryInterface(mContentAreaDocShell));