From 98bb38ac3e74433f007cb6e1f3274c19603625d1 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 --- editor/composer/src/nsEditorShell.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/editor/composer/src/nsEditorShell.cpp b/editor/composer/src/nsEditorShell.cpp index 7ebffb4be8d8..f84c835d22f7 100644 --- a/editor/composer/src/nsEditorShell.cpp +++ b/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));