From 75f2a9f5c3e34506cac23c0eabfb359ff9970ac1 Mon Sep 17 00:00:00 2001 From: "chanial%noos.fr" Date: Fri, 17 Oct 2003 14:56:39 +0000 Subject: [PATCH] bug 222625: Default attribute for preferences should be "value" bug 222030: useless use of wsm_attributes used in objects and also remove some silly use of prefattribute --- .../components/prefwindow/content/nsPrefWindow.js | 12 ++++++------ .../prefwindow/content/pref-connection.xul | 2 +- .../components/prefwindow/content/pref-features.xul | 2 +- browser/components/prefwindow/content/pref-fonts.xul | 11 +++++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/browser/components/prefwindow/content/nsPrefWindow.js b/browser/components/prefwindow/content/nsPrefWindow.js index 6365d3f8851c..b445b85fc463 100644 --- a/browser/components/prefwindow/content/nsPrefWindow.js +++ b/browser/components/prefwindow/content/nsPrefWindow.js @@ -197,12 +197,12 @@ nsPrefWindow.prototype = var elt = itemObject.localname; var prefattribute = itemObject.prefattribute; if (!prefattribute) { - if (elt == "radiogroup" || elt == "textbox" || elt == "menulist") - prefattribute = "value"; - else if (elt == "checkbox") + if (elt == "checkbox") prefattribute = "checked"; else if (elt == "button") prefattribute = "disabled"; + else + prefattribute = "value"; } var value = itemObject[prefattribute]; @@ -328,12 +328,12 @@ nsPrefWindow.prototype = var prefdefval = prefElements[i].getAttribute( "prefdefval" ); var prefattribute = prefElements[i].getAttribute( "prefattribute" ); if (!prefattribute) { - if (elt == "radiogroup" || elt == "textbox" || elt == "menulist") - prefattribute = "value"; - else if (elt == "checkbox") + if (elt == "checkbox") prefattribute = "checked"; else if (elt == "button") prefattribute = "disabled"; + else + prefattribute = "value"; } var prefvalue = this.getPref( preftype, prefstring ); if( prefvalue == "!/!ERROR_UNDEFINED_PREF!/!" ) diff --git a/browser/components/prefwindow/content/pref-connection.xul b/browser/components/prefwindow/content/pref-connection.xul index 4d024c412512..27dc5a031a31 100644 --- a/browser/components/prefwindow/content/pref-connection.xul +++ b/browser/components/prefwindow/content/pref-connection.xul @@ -92,7 +92,7 @@