Closed Bug 382064 Opened 17 years ago Closed 17 years ago

Remove support for nsIMsgStringService

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mscott, Assigned: mscott)

References

Details

Attachments

(2 files)

Instead of updating this interface, we should just get rid of it and go through the string bundle service directly. I think we invented this service back in the day when string bundles weren't being cached. Most of the mailnews code already uses string bundles directly but some code in local and compose go through this intermediary service.
Attached patch the fixSplinter Review
This patch removes nsIMsgStringService.

mailnews\local was easy to fix, just use the nsIStringBundleService directly.

compose is a mess unfortunately. We use string IDs as both string IDs and error codes that get passed around. This made the transition to using the string bundles directly much harder because sometimes we have to unwrap the 'error' code portion of the ID before calling GetStringFromID. I've tried to improve this a little bit by removing the error code wrapping around all the string IDs that are only used as string IDs. And only methods that can receive error codes try to unwrap the err part of the string ID before calling GetSTringFromID. 

It would still be useful to have someone finish cleaning this up by ending the practice of using the same ID as an error code and a string ID. I'll file a separate bug in case someone wants to tackle that.
OS: Windows Vista → All
Hardware: PC → All
Version: 2.0 → Trunk
Comment on attachment 266138 [details] [diff] [review]
the fix

I forgot to ask for a review on this :)
Attachment #266138 - Flags: superreview?(bienvenu)
Comment on attachment 266138 [details] [diff] [review]
the fix

is there any js that tries to use these removed classes?
Attachment #266138 - Flags: superreview?(bienvenu) → superreview+
Checked in, let's hope I didn't mess up any of the compose error & string ID abuse.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
This caused a regression, see bug 385220.
Depends on: 385220
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: