зеркало из https://github.com/mozilla/pjs.git
bug 64983, r=nhotta, sr=sfraser
When open DBCS filename by composer, title is shown incorrectly. This bug is the regression of sfraser's check in (nsEditorShell.cpp v1.222).
This commit is contained in:
Родитель
b4347ac7e8
Коммит
c9ffdd5eba
|
@ -1853,10 +1853,10 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
}
|
||||
else // have a file spec
|
||||
{
|
||||
nsXPIDLCString leafName;
|
||||
docFile->GetLeafName(getter_Copies(leafName));
|
||||
nsXPIDLString leafName;
|
||||
docFile->GetUnicodeLeafName(getter_Copies(leafName));
|
||||
if (leafName.get() && *leafName)
|
||||
fileName.AssignWithConversion(leafName);
|
||||
fileName.Assign(leafName);
|
||||
|
||||
nsCOMPtr<nsIFile> parentPath;
|
||||
if (NS_SUCCEEDED(docFile->GetParent(getter_AddRefs(parentPath))))
|
||||
|
@ -2120,10 +2120,10 @@ nsEditorShell::UpdateWindowTitle()
|
|||
nsCOMPtr<nsIFile> docFileSpec;
|
||||
if (NS_SUCCEEDED(diskDoc->GetFileSpec(getter_AddRefs(docFileSpec))))
|
||||
{
|
||||
nsXPIDLCString fileName;
|
||||
docFileSpec->GetLeafName(getter_Copies(fileName));
|
||||
nsXPIDLString fileName;
|
||||
docFileSpec->GetUnicodeLeafName(getter_Copies(fileName));
|
||||
windowCaption.AppendWithConversion(" [");
|
||||
windowCaption.AppendWithConversion(fileName);
|
||||
windowCaption.Append(fileName);
|
||||
windowCaption.AppendWithConversion("]");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1853,10 +1853,10 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
}
|
||||
else // have a file spec
|
||||
{
|
||||
nsXPIDLCString leafName;
|
||||
docFile->GetLeafName(getter_Copies(leafName));
|
||||
nsXPIDLString leafName;
|
||||
docFile->GetUnicodeLeafName(getter_Copies(leafName));
|
||||
if (leafName.get() && *leafName)
|
||||
fileName.AssignWithConversion(leafName);
|
||||
fileName.Assign(leafName);
|
||||
|
||||
nsCOMPtr<nsIFile> parentPath;
|
||||
if (NS_SUCCEEDED(docFile->GetParent(getter_AddRefs(parentPath))))
|
||||
|
@ -2120,10 +2120,10 @@ nsEditorShell::UpdateWindowTitle()
|
|||
nsCOMPtr<nsIFile> docFileSpec;
|
||||
if (NS_SUCCEEDED(diskDoc->GetFileSpec(getter_AddRefs(docFileSpec))))
|
||||
{
|
||||
nsXPIDLCString fileName;
|
||||
docFileSpec->GetLeafName(getter_Copies(fileName));
|
||||
nsXPIDLString fileName;
|
||||
docFileSpec->GetUnicodeLeafName(getter_Copies(fileName));
|
||||
windowCaption.AppendWithConversion(" [");
|
||||
windowCaption.AppendWithConversion(fileName);
|
||||
windowCaption.Append(fileName);
|
||||
windowCaption.AppendWithConversion("]");
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче