Closed
Bug 458548
Opened 16 years ago
Closed 14 years ago
Get rid of string-bundle globals
Categories
(Thunderbird :: Mail Window Front End, defect)
Thunderbird
Mail Window Front End
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 7.0
People
(Reporter: jminta, Assigned: iannbugzilla)
References
Details
Attachments
(1 file, 3 obsolete files)
42.76 KB,
patch
|
Bienvenu
:
review+
|
Details | Diff | Splinter Review |
There are a bunch of files that assume that various string-bundle global variables will have been set prior to various functions being called. Because this isn't well centralized, we end up having tons of people setting these variables just to be sure [1], which is silly. Moreover, my standard argument that getElementById is *very* fast applies, making these variables silly in the first place.
This patch removes gMessengerBundle and gBrandBundle. It also includes a bit of code to clean up how we open windows, but that part should be very straightforward.
Have to ask for sr since this global variable mess also breaks the "don't let common code depend on forked code" rule. :-(
Attachment #341784 -
Flags: superreview?(bienvenu)
Attachment #341784 -
Flags: review?(philringnalda)
Updated•16 years ago
|
Attachment #341784 -
Flags: review?(philringnalda) → review+
Comment 1•16 years ago
|
||
Comment on attachment 341784 [details] [diff] [review]
patch v1
r=me as long as you clean up the (yeah, you just moved it, but that means you own it) trailing whitespace and the easy long lines from http://beaufour.dk/jst-review/?patch=341784
![]() |
||
Comment 2•16 years ago
|
||
bienvenu, sr ping?
Comment 3•16 years ago
|
||
ah, an other bug that I wasn't cc'ed on, so I didn't see the r+ go by. Does this still apply?
Updated•16 years ago
|
Attachment #341784 -
Attachment is obsolete: true
Attachment #341784 -
Flags: superreview?(bienvenu)
Comment 4•16 years ago
|
||
Comment on attachment 341784 [details] [diff] [review]
patch v1
This patch is definitely rotted. Regrettably, refactoring patches tend to rot quickly. Even if they still apply, new code may have been introduced that the patch needs to cover...
Unbitrotted version of the patch
Assignee: jminta → iann_bugzilla
Attachment #536193 -
Flags: review?(philringnalda)
Comment 6•14 years ago
|
||
Comment on attachment 536193 [details] [diff] [review]
Remove gMessengerBundle and gBrandBundle patch v2.0 [Backed out: comment 7 & 8]
Still seems like a good idea to me.
Attachment #536193 -
Flags: review?(philringnalda) → review+
Attachment #536193 -
Flags: superreview?(dbienvenu)
Updated•14 years ago
|
Attachment #536193 -
Flags: superreview?(dbienvenu) → superreview+
Comment on attachment 536193 [details] [diff] [review]
Remove gMessengerBundle and gBrandBundle patch v2.0 [Backed out: comment 7 & 8]
http://hg.mozilla.org/comm-central/rev/4f13eb9c9536
Attachment #536193 -
Attachment description: Remove gMessengerBundle and gBrandBundle patch v2.0 → Remove gMessengerBundle and gBrandBundle patch v2.0 [Checked in: comment 7]
Comment 8•14 years ago
|
||
Comment on attachment 536193 [details] [diff] [review]
Remove gMessengerBundle and gBrandBundle patch v2.0 [Backed out: comment 7 & 8]
I had to back this out because it was causing our Mac and Windows MozMill tests to be orange, but I couldn't identify the cause of the error:
http://hg.mozilla.org/comm-central/rev/f438ee543856
Attachment #536193 -
Attachment description: Remove gMessengerBundle and gBrandBundle patch v2.0 [Checked in: comment 7] → Remove gMessengerBundle and gBrandBundle patch v2.0 [Backed out: comment 7 & 8]
Comment 9•14 years ago
|
||
One issue is with this (I think):
+ item.label = document.getElementById("bundle_messenger")
+ .getFormattedString("attachmentDisplayNameFormat",
+ [attachmentIndex, displayName]);
The label property won't work here, since item is an XBL element that hasn't been added to the DOM yet, so the XBL stuff hasn't loaded yet. You need to use setAttribute.
Assignee | ||
Comment 10•14 years ago
|
||
Changes since last version:
* Made sure setAttribute is used where the menuitem hasn't been added to the DOM yet.
Attachment #536193 -
Attachment is obsolete: true
Attachment #536781 -
Flags: superreview?(dbienvenu)
Attachment #536781 -
Flags: review?(philringnalda)
Updated•14 years ago
|
Attachment #536781 -
Flags: review?(philringnalda) → review?(dbienvenu)
Comment 11•14 years ago
|
||
Fair warning: I probably bitrotted this in bug 656045 (this bug bitrotted me when it had been checked in).
Assignee | ||
Comment 12•14 years ago
|
||
Changes since previous version:
* Unbitrotted following landing of patch from bug 656045.
Attachment #536781 -
Attachment is obsolete: true
Attachment #537225 -
Flags: review?(dbienvenu)
Attachment #536781 -
Flags: superreview?(dbienvenu)
Attachment #536781 -
Flags: review?(dbienvenu)
Updated•14 years ago
|
Attachment #537225 -
Flags: review?(dbienvenu) → review+
Assignee | ||
Comment 13•14 years ago
|
||
Comment on attachment 537225 [details] [diff] [review]
Unbitrotted non-DOM attached labels patch [Checked in: Comment 13 & Comment 15]
http://hg.mozilla.org/comm-central/rev/ae64e58a6575
Attachment #537225 -
Attachment description: Unbitrotted non-DOM attached labels patch → Unbitrotted non-DOM attached labels patch [Checked in: Comment 13]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 7.0
Comment 14•14 years ago
|
||
Comment on attachment 537225 [details] [diff] [review]
Unbitrotted non-DOM attached labels patch [Checked in: Comment 13 & Comment 15]
Review of attachment 537225 [details] [diff] [review]:
-----------------------------------------------------------------
::: mail/base/content/msgHdrViewOverlay.js
@@ +1187,5 @@
> var card = aCard || getCardForEmail(aEmailAddress).card;
>
> // If this address is one of the user's identities...
> if (aEmailAddress == identity.email) {
> + var brand = document.getElementById("bundle_messenger");
I think you mean "var bundle" here. This is currently breaking the "You" shorthand in message headers.
Assignee | ||
Comment 15•14 years ago
|
||
(In reply to comment #14)
> Comment on attachment 537225 [details] [diff] [review] [review]
> Unbitrotted non-DOM attached labels patch [Checked in: Comment 13]
>
> Review of attachment 537225 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
>
> ::: mail/base/content/msgHdrViewOverlay.js
> @@ +1187,5 @@
> > var card = aCard || getCardForEmail(aEmailAddress).card;
> >
> > // If this address is one of the user's identities...
> > if (aEmailAddress == identity.email) {
> > + var brand = document.getElementById("bundle_messenger");
>
> I think you mean "var bundle" here. This is currently breaking the "You"
> shorthand in message headers.
Thanks for catching that, bustage fix pushed as http://hg.mozilla.org/comm-central/rev/228f42df2090
Attachment #537225 -
Attachment description: Unbitrotted non-DOM attached labels patch [Checked in: Comment 13] → Unbitrotted non-DOM attached labels patch [Checked in: Comment 13 & Comment 15]
You need to log in
before you can comment on or make changes to this bug.
Description
•