Closed Bug 133193 Opened 23 years ago Closed 23 years ago

"Mozilla Document" string hardcoded in nsDocumentViewer.cpp

Categories

(Core :: Printing: Output, defect, P2)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: ian, Assigned: rods)

Details

Attachments

(1 file, 1 obsolete file)

STEPS TO REPRODUCE Look at the print progress dialog title when using a vendor-customised version of Mozilla (e.g. Netscape commercial builds). ACTUAL RESULTS It says "Mozilla Document" EXPECTED RESULTS It should use whatever is in brand.properties, accessible via the string bundle APIs. For example, "Netscape 6 Document". The error is specifically here: http://lxr.mozilla.org/seamonkey/source/content/base/src/nsDocumentViewer.cpp#2560
Keywords: nsbeta1
Attached patch patch (obsolete) — Splinter Review
Reads the "brnad name" property and then caches it so it can use it on documents with no title.
Attached patch patchSplinter Review
Note that the these two parts are in debug code: @@ -2123,9 +2145,10 @@ @@ -2138,6 +2161,10 @@
Attachment #76258 - Attachment is obsolete: true
Comment on attachment 76263 [details] [diff] [review] patch r=dcone
Attachment #76263 - Flags: review+
Comment on attachment 76263 [details] [diff] [review] patch sr=attinasi
Attachment #76263 - Flags: superreview+
nsbeta1+
Keywords: nsbeta1nsbeta1+
Priority: -- → P2
Target Milestone: --- → mozilla1.0
Keywords: approval, review
Comment on attachment 76263 [details] [diff] [review] patch a=dbaron for trunk checkin A few comments, though: >+ PRUnichar* aBrandName, This could be |const PRUnichar*| (and should be if you follow our usual string conventions) >+ nsXPIDLString uStr; >+ nsCOMPtr<nsIStringBundleService> svc( do_GetService( NS_STRINGBUNDLE_CONTRACTID ) ); >+ if (svc) { >+ svc->CreateBundle( "chrome://global/locale/brand.properties", getter_AddRefs( brandBundle ) ); >+ if (brandBundle) { >+ brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), getter_Copies( uStr ) ); >+ mBrandName = ToNewUnicode(uStr); There's no need for |uStr| here, and you could save a string-copy and some code size with: >nsCOMPtr<nsIStringBundleService> svc( do_GetService( NS_STRINGBUNDLE_CONTRACTID ) ); >if (svc) { > svc->CreateBundle( "chrome://global/locale/brand.properties", getter_AddRefs( brandBundle ) ); > if (brandBundle) { > brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), &mBrandName );
Attachment #76263 - Flags: approval+
Fix was checked in. Marking fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
ian, please verify...and mark verified-fixed..thanks
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: