diff --git a/content/options.js b/content/options.js index 001f07b..91411a5 100644 --- a/content/options.js +++ b/content/options.js @@ -56,9 +56,26 @@ function setCustomOptViz() { ami_elements[idx].disabled = true; } } -// if (document.getElementById("proto_menu").value == 'custom') { -// document.getElementById("tbdialout-options-customoptions").collapsed = false; -// } else { -// document.getElementById("tbdialout-options-customoptions").collapsed = true; -// } -} \ No newline at end of file + setCustomAuthViz(); +} + +function setCustomAuthViz () { + if (document.getElementById("proto_menu").value == 'custom') { + var custom_auth_elements = new Array(); + custom_auth_elements.push(document.getElementById("customuser_text")); + custom_auth_elements.push(document.getElementById("custompass_text")); + var loadhidden = document.getElementById("custominbackground_cb").checked; + var idx; + for (idx in custom_auth_elements) { + if (loadhidden) { + custom_auth_elements[idx].disabled = false; + } else { + custom_auth_elements[idx].disabled = true; + } + } + var prefs = Components.classes["@mozilla.org/preferences-service;1"] + .getService(Components.interfaces.nsIPrefService) + .getBranch("extensions.tbdialout."); + prefs.setBoolPref("custominbackground", loadhidden); + } +} diff --git a/content/options.xul b/content/options.xul index 500c218..5d1579d 100644 --- a/content/options.xul +++ b/content/options.xul @@ -49,14 +49,16 @@ + + - + @@ -114,6 +116,10 @@ @@ -152,11 +158,14 @@