Closed
Bug 133193
Opened 23 years ago
Closed 23 years ago
"Mozilla Document" string hardcoded in nsDocumentViewer.cpp
Categories
(Core :: Printing: Output, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: ian, Assigned: rods)
Details
Attachments
(1 file, 1 obsolete file)
5.79 KB,
patch
|
dcone
:
review+
attinasi
:
superreview+
dbaron
:
approval+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•23 years ago
|
||
Reads the "brnad name" property and then caches it so it can use it on
documents with no title.
Assignee | ||
Comment 2•23 years ago
|
||
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 3•23 years ago
|
||
Comment on attachment 76263 [details] [diff] [review]
patch
r=dcone
Attachment #76263 -
Flags: review+
Comment 4•23 years ago
|
||
Comment on attachment 76263 [details] [diff] [review]
patch
sr=attinasi
Attachment #76263 -
Flags: superreview+
Comment 5•23 years ago
|
||
nsbeta1+
Updated•23 years ago
|
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+
Comment 7•23 years ago
|
||
Fix was checked in. Marking fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•