diff --git a/toolkit/content/customizeCharset.js b/toolkit/content/customizeCharset.js index 317ae667c74..4b2f074b513 100644 --- a/toolkit/content/customizeCharset.js +++ b/toolkit/content/customizeCharset.js @@ -131,32 +131,6 @@ function LoadActiveCharSets() } } - -function SelectAvailableCharset() -{ - //Remove the selection in the active charsets list - var active_charsets = document.getElementById('active_charsets'); - - if (active_charsets.selectedItems.length > 0) - active_charsets.clearSelection(); - - update_buttons(); -} //SelectAvailableCharset - - - -function SelectActiveCharset() -{ - //Remove the selection in the available charsets list - var available_charsets = document.getElementById('available_charsets'); - - if (available_charsets.selectedItems.length > 0) - available_charsets.clearSelection(); - - update_buttons(); -} //SelectActiveCharset - - function enable_save() { var save_button = document.documentElement.getButton("accept"); @@ -231,25 +205,13 @@ function RemoveActiveCharset() var numSelected = listbox.selectedItems.length; var deleted_all = false; - while (listbox.selectedItems.length > 0) { - var selectedNode = listbox.selectedItems[0]; - dump(selectedNode + " - " + listbox.selectedItems.length + "\n"); - nextNode = selectedNode.nextSibling; - - if (!nextNode) { - if (selectedNode.previousSibling) - nextNode = selectedNode.previousSibling; - } - - listbox.removeChild(selectedNode); - } //while - - if (nextNode) { - listbox.selectItem(nextNode) - } else { - //listbox.clearSelection(); + var numSelectedItems = listbox.selectedItems.length; + for (count = 0; count < numSelectedItems; count ++) { + listbox.removeChild(listbox.selectedItems[0]); } + listbox.clearSelection(); + enable_save(); } //RemoveActiveCharset diff --git a/toolkit/content/customizeCharset.xul b/toolkit/content/customizeCharset.xul index c2675b2b707..7e62dce4638 100644 --- a/toolkit/content/customizeCharset.xul +++ b/toolkit/content/customizeCharset.xul @@ -39,7 +39,6 @@ #***** END LICENSE BLOCK ***** --> - @@ -48,8 +47,7 @@ onload="Init();" ondialogaccept="return Save();" persist="width height" - headertitle="&left.header;" - width="500" height="394"> + headertitle="&left.header;">