Closed Bug 50277 Opened 24 years ago Closed 24 years ago

pref-languages should have context enabled/disabled features

Categories

(SeaMonkey :: Preferences, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: maolson)

References

Details

Attachments

(5 files)

When first entering the pref-panel no languages is selected, which it correct, but then the "Remove", "Move Up" and "Move Down" buttons should be disabled. The same thing if you delete all languages. Then only the "Add" button should be enabled.
Keywords: patch
The same is true for other panels (like Smart Browsing, Helper Appl, etc.). Should I open seperate bugs or include everything in here?
adding review kw to get on the reviewing radar...
Keywords: review
please: someone review and checkin, if patch still valid. I've created the rather big patch more than 3 months ago!
Henrik, there is hardly anyone (if even that) actively querying for the patch/review keywords. You'll need to e-mail the appropriate people for review and approval, at which point your patch can be checked in.
This one shoul almost be ready to be sr and added to moz... I've fixed all but one js warn: JavaScript strict warning: chrome://communicator/content/pref/pref-languages.js line 69: reference to undefined property window.arguments how do I get rid of that one? The line is: if (!window.arguments) {
if (!(window && arguments in window && window.arguments)) or something wierd like that, there's an example in some of the other recent patches of how to do this. @@ -226,24 +226,25 @@ please reflow the indentation. + var arrayOfPrefs = pref_string.split(', '); is wrong. + if (str) { + if (!tit) + tit = '[' + str + ']'; + AddTreeItem(document, active_languages_treeroot, str, tit); !+ } !+ } = !+ } !+ } .. if might be worth caching the document.getElementById("remove"),up,down, ! <script language="javascript" src="chrome://communicator/content/pref/prefutilities.js"></script> ! <script language="JavaScript"> = ! <script type="text/javascript" src="chrome://communicator/content/pref/prefutilities.js"/> ! <script type="text/javascript"> please ^
Henrik, for that last one: |if ("arguments" in window) {| is equivalent
I need a bugzilla to confirm my comments sometimes... My code snippet is obviously backwards for the situation cited, but you should get the idea.
Ok, the attached patch is simply Henrik Gemal's patch updated against a current tree. I noticed that I left out Henrik's name from the contributors lists, so could whomever checks this in please add it back. Blake, Ben, this should be ready for r/sr if you would do the honors. Timeless: I am not convinced caching the getElementById calls would be a very big win, but I have been wrong before... (often)
try this url: javascript:for(i=0;i<0;i++)alert(i);alert("".split(',').length) based on the above, the following is useless :-( + if (arrayOfPrefs) { for (var i = 0; i < arrayOfPrefs.length; i++) { + if (pref_string) { is probably better. however it would obviously go elsewhere. please try to wrap lines near 80 cols, even for xul. thanks
r=timeless cc alecf for a=
Assignee: matt → maolson
Keywords: reviewapproval
Blocks: 57657
You should be able to use .disabled directly for the buttons, instead of set/removeAttribute. Please do that instead.
sr=alecf
Checked in, with a couple modifications.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
vrfy fixed using 2001.02.09.0x comm bits on linux, winnt and mac.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: