| author | Brian Nicholson <bnicholson@mozilla.com> |
| Thu, 09 Aug 2012 23:30:46 -0700 | |
| changeset 102053 | b5ae446888f54480e2d20e59dc1b8723799a5cbb |
| parent 94475 | f4157e8c410708d76703f19e4dfb61859bfe32d8 |
| permissions | -rw-r--r-- |
|
94475
f4157e8c410708d76703f19e4dfb61859bfe32d8
Bug 716478 - update licence to MPL 2.
Gervase Markham <gerv@gerv.net>
parents:
85190
diff
changeset
|
1 |
/* This Source Code Form is subject to the terms of the Mozilla Public |
|
f4157e8c410708d76703f19e4dfb61859bfe32d8
Bug 716478 - update licence to MPL 2.
Gervase Markham <gerv@gerv.net>
parents:
85190
diff
changeset
|
2 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|
f4157e8c410708d76703f19e4dfb61859bfe32d8
Bug 716478 - update licence to MPL 2.
Gervase Markham <gerv@gerv.net>
parents:
85190
diff
changeset
|
3 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
f4157e8c410708d76703f19e4dfb61859bfe32d8
Bug 716478 - update licence to MPL 2.
Gervase Markham <gerv@gerv.net>
parents:
85190
diff
changeset
|
4 |
|
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
5 |
function MultiplexHandler(aEvent) |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
6 |
{ |
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
7 |
MultiplexHandlerEx( |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
8 |
aEvent, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
9 |
function Browser_SelectDetector(event) { |
|
85190
f173a9a1e0560a1c61e69702e4c7558be8dd47df
Rename BrowserSetForcedDetector and remove unnecessary parameter. Bug 720310, r=gavin
Simon Montagu <smontagu@smontagu.org>
parents:
68900
diff
changeset
|
10 |
BrowserCharsetReload(); |
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
11 |
/* window.content.location.reload() will re-download everything */ |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
12 |
SelectDetector(event, null); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
13 |
}, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
14 |
function Browser_SetForcedCharset(charset, isPredefined) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
15 |
BrowserSetForcedCharacterSet(charset); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
16 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
17 |
); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
18 |
} |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
19 |
|
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
20 |
function MailMultiplexHandler(aEvent) |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
21 |
{ |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
22 |
MultiplexHandlerEx( |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
23 |
aEvent, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
24 |
function Mail_SelectDetector(event) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
25 |
SelectDetector( |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
26 |
event, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
27 |
function Mail_Reload() { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
28 |
messenger.setDocumentCharset(msgWindow.mailCharacterSet); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
29 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
30 |
); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
31 |
}, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
32 |
function Mail_SetForcedCharset(charset, isPredefined) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
33 |
MessengerSetForcedCharacterSet(charset); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
34 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
35 |
); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
36 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
37 |
|
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
38 |
function ComposerMultiplexHandler(aEvent) |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
39 |
{ |
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
40 |
MultiplexHandlerEx( |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
41 |
aEvent, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
42 |
function Composer_SelectDetector(event) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
43 |
SelectDetector( |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
44 |
event, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
45 |
function Composer_Reload() { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
46 |
EditorLoadUrl(GetDocumentUrl()); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
47 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
48 |
); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
49 |
}, |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
50 |
function Composer_SetForcedCharset(charset, isPredefined) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
51 |
if ((!isPredefined) && charset.length > 0) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
52 |
gCharsetMenu.SetCurrentComposerCharset(charset); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
53 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
54 |
EditorSetDocumentCharacterSet(charset); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
55 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
56 |
); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
57 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
58 |
|
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
59 |
function MultiplexHandlerEx(aEvent, aSelectDetector, aSetForcedCharset) |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
60 |
{ |
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
61 |
try { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
62 |
var node = aEvent.target; |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
63 |
var name = node.getAttribute('name'); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
64 |
|
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
65 |
if (name == 'detectorGroup') { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
66 |
aSelectDetector(aEvent); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
67 |
} else if (name == 'charsetGroup') { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
68 |
var charset = node.getAttribute('id'); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
69 |
charset = charset.substring('charset.'.length, charset.length) |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
70 |
aSetForcedCharset(charset, true); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
71 |
} else if (name == 'charsetCustomize') { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
72 |
//do nothing - please remove this else statement, once the charset prefs moves to the pref window |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
73 |
} else { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
74 |
aSetForcedCharset(node.getAttribute('id'), false); |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
75 |
} |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
76 |
} catch(ex) { |
|
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
77 |
alert(ex); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
78 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
79 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
80 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
81 |
function SelectDetector(event, doReload) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
82 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
83 |
dump("Charset Detector menu item pressed: " + event.target.getAttribute('id') + "\n"); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
84 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
85 |
var uri = event.target.getAttribute("id"); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
86 |
var prefvalue = uri.substring('chardet.'.length, uri.length); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
87 |
if ("off" == prefvalue) { // "off" is special value to turn off the detectors |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
88 |
prefvalue = ""; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
89 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
90 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
91 |
try { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
92 |
var pref = Components.classes["@mozilla.org/preferences-service;1"] |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
93 |
.getService(Components.interfaces.nsIPrefBranch); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
94 |
var str = Components.classes["@mozilla.org/supports-string;1"] |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
95 |
.createInstance(Components.interfaces.nsISupportsString); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
96 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
97 |
str.data = prefvalue; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
98 |
pref.setComplexValue("intl.charset.detector", |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
99 |
Components.interfaces.nsISupportsString, str); |
|
68900
83b30b8ad22c3a2aad1fb93766c6175e4de8548c
Bug 236872 - Changing Auto-Detection Scheme breaks the message display output; r=enndeakin
Zane U. Ji <ZaneUJi@gmail.com>
parents:
48682
diff
changeset
|
100 |
if (typeof doReload == "function") doReload(); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
101 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
102 |
catch (ex) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
103 |
dump("Failed to set the intl.charset.detector preference.\n"); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
104 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
105 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
106 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
107 |
var gPrevCharset = null; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
108 |
function UpdateCurrentCharset() |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
109 |
{ |
|
15673
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
110 |
// extract the charset from DOM |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
111 |
var wnd = document.commandDispatcher.focusedWindow; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
112 |
if ((window == wnd) || (wnd == null)) wnd = window.content; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
113 |
|
|
15673
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
114 |
// Uncheck previous item |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
115 |
if (gPrevCharset) { |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
116 |
var pref_item = document.getElementById('charset.' + gPrevCharset); |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
117 |
if (pref_item) |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
118 |
pref_item.setAttribute('checked', 'false'); |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
119 |
} |
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
120 |
|
|
e64a979ed64ca82d8ad98f32ec0ad92b01e180eb
Bug 441876: remove UTF-7 option from browser Character Encoding menus, r=smontagu, sr=bzbarsky
Gavin Sharp <gavin@mozilla.com>
parents:
1
diff
changeset
|
121 |
var menuitem = document.getElementById('charset.' + wnd.document.characterSet); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
122 |
if (menuitem) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
123 |
menuitem.setAttribute('checked', 'true'); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
124 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
125 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
126 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
127 |
function UpdateCurrentMailCharset() |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
128 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
129 |
var charset = msgWindow.mailCharacterSet; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
130 |
var menuitem = document.getElementById('charset.' + charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
131 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
132 |
if (menuitem) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
133 |
menuitem.setAttribute('checked', 'true'); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
134 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
135 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
136 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
137 |
function UpdateCharsetDetector() |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
138 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
139 |
var prefvalue; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
140 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
141 |
try { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
142 |
var pref = Components.classes["@mozilla.org/preferences-service;1"] |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
143 |
.getService(Components.interfaces.nsIPrefBranch); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
144 |
prefvalue = pref.getComplexValue("intl.charset.detector", |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
145 |
Components.interfaces.nsIPrefLocalizedString).data; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
146 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
147 |
catch (ex) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
148 |
prefvalue = ""; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
149 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
150 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
151 |
if (prefvalue == "") prefvalue = "off"; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
152 |
dump("intl.charset.detector = "+ prefvalue + "\n"); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
153 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
154 |
prefvalue = 'chardet.' + prefvalue; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
155 |
var menuitem = document.getElementById(prefvalue); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
156 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
157 |
if (menuitem) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
158 |
menuitem.setAttribute('checked', 'true'); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
159 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
160 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
161 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
162 |
function UpdateMenus(event) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
163 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
164 |
// use setTimeout workaround to delay checkmark the menu |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
165 |
// when onmenucomplete is ready then use it instead of oncreate |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
166 |
// see bug 78290 for the detail |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
167 |
UpdateCurrentCharset(); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
168 |
setTimeout(UpdateCurrentCharset, 0); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
169 |
UpdateCharsetDetector(); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
170 |
setTimeout(UpdateCharsetDetector, 0); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
171 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
172 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
173 |
function CreateMenu(node) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
174 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
175 |
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
176 |
observerService.notifyObservers(null, "charsetmenu-selected", node); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
177 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
178 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
179 |
function UpdateMailMenus(event) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
180 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
181 |
// use setTimeout workaround to delay checkmark the menu |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
182 |
// when onmenucomplete is ready then use it instead of oncreate |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
183 |
// see bug 78290 for the detail |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
184 |
UpdateCurrentMailCharset(); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
185 |
setTimeout(UpdateCurrentMailCharset, 0); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
186 |
UpdateCharsetDetector(); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
187 |
setTimeout(UpdateCharsetDetector, 0); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
188 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
189 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
190 |
var gCharsetMenu = Components.classes['@mozilla.org/rdf/datasource;1?name=charset-menu'].getService().QueryInterface(Components.interfaces.nsICurrentCharsetListener); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
191 |
var gLastBrowserCharset = null; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
192 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
193 |
function charsetLoadListener (event) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
194 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
195 |
var charset = window.content.document.characterSet; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
196 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
197 |
if (charset.length > 0 && (charset != gLastBrowserCharset)) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
198 |
gCharsetMenu.SetCurrentCharset(charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
199 |
gPrevCharset = gLastBrowserCharset; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
200 |
gLastBrowserCharset = charset; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
201 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
202 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
203 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
204 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
205 |
function composercharsetLoadListener (event) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
206 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
207 |
var charset = window.content.document.characterSet; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
208 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
209 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
210 |
if (charset.length > 0 ) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
211 |
gCharsetMenu.SetCurrentComposerCharset(charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
212 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
213 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
214 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
215 |
function SetForcedEditorCharset(charset) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
216 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
217 |
if (charset.length > 0 ) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
218 |
gCharsetMenu.SetCurrentComposerCharset(charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
219 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
220 |
EditorSetDocumentCharacterSet(charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
221 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
222 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
223 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
224 |
var gLastMailCharset = null; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
225 |
|
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
226 |
function mailCharsetLoadListener (event) |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
227 |
{ |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
228 |
if (msgWindow) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
229 |
var charset = msgWindow.mailCharacterSet; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
230 |
if (charset.length > 0 && (charset != gLastMailCharset)) { |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
231 |
gCharsetMenu.SetCurrentMailCharset(charset); |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
232 |
gLastMailCharset = charset; |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
233 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
234 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
235 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
236 |
|
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
237 |
function InitCharsetMenu() |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
238 |
{ |
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
239 |
removeEventListener("load", InitCharsetMenu, true); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
240 |
|
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
241 |
var wintype = document.documentElement.getAttribute('windowtype'); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
242 |
if (window && (wintype == "navigator:browser")) |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
243 |
{ |
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
244 |
var contentArea = window.document.getElementById("appcontent"); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
245 |
if (contentArea) |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
246 |
contentArea.addEventListener("pageshow", charsetLoadListener, true); |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
247 |
} |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
248 |
else |
|
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
249 |
{ |
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
250 |
var arrayOfStrings = wintype.split(":"); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
251 |
if (window && arrayOfStrings[0] == "mail") |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
252 |
{ |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
253 |
var messageContent = window.document.getElementById("messagepane"); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
254 |
if (messageContent) |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
255 |
messageContent.addEventListener("pageshow", mailCharsetLoadListener, true); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
256 |
} |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
257 |
else |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
258 |
if (window && arrayOfStrings[0] == "composer") |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
259 |
{ |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
260 |
contentArea = window.document.getElementById("appcontent"); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
261 |
if (contentArea) |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
262 |
contentArea.addEventListener("pageshow", composercharsetLoadListener, true); |
|
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
263 |
} |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
264 |
} |
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
265 |
} |
|
1
9b2a99adc05e53cd4010de512f50118594756650
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff
changeset
|
266 |
|
|
48682
e5e95e3947c33349c1fcc0864bec061fcb749a6c
Bug 580868 charsetOverlay should not cause XBL bindings to attach when it's not safe r+a=gavin
Neil Rashbrook <neil@parkwaycc.co.uk>
parents:
15673
diff
changeset
|
267 |
addEventListener("load", InitCharsetMenu, true); |