bug 222625: Default attribute for preferences should be "value"

bug 222030: useless use of wsm_attributes used in <data/> objects
and also remove some silly use of prefattribute
This commit is contained in:
chanial%noos.fr 2003-10-17 14:56:39 +00:00
Родитель a3fb7ce4e9
Коммит 75f2a9f5c3
4 изменённых файлов: 13 добавлений и 14 удалений

Просмотреть файл

@ -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!/!" )

Просмотреть файл

@ -92,7 +92,7 @@
<!-- gopher port doesn't have an accesskey because the window needs a redesign - bbaetz -->
<label value="&port.label;" accesskey="&gopherPort.accesskey;" control="networkProxyGopher_Port"/>
<textbox id="networkProxyGopher_Port" preftype="int" prefstring="network.proxy.gopher_port"
prefattribute="value" size="5"/>
size="5"/>
</hbox>
</row>
<row align="center">

Просмотреть файл

@ -116,7 +116,7 @@
accesskey="&forOriginatingSiteOnly.accesskey;"
oncommand="updateImagePref()"
style="margin-left: 23px;"/>
<data id="enableImagePref" preftype="int" prefstring="network.image.imageBehavior" prefattribute="value" wsm_attributes="value"/>
<data id="enableImagePref" preftype="int" prefstring="network.image.imageBehavior"/>
</vbox>
<vbox>
<button id="manageImages" class="uniWidthButton"

Просмотреть файл

@ -64,8 +64,7 @@
control="selectLangs"/>
</hbox>
<menulist id="selectLangs" oncommand="selectLanguage();"
preftype="localizedstring" prefstring="font.language.group"
wsm_attributes="value">
preftype="localizedstring" prefstring="font.language.group">
<menupopup>
<menuitem value="x-western" label="&font.langGroup.latin1;"/>
<menuitem value="x-central-euro" label="&font.langGroup.latin2;"/>
@ -282,13 +281,13 @@
<label value="&textColor.label;" accesskey="&textColor.accesskey;" control="foregroundtextmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="foregroundtextmenu" palettename="standard"/>
<data id="foregroundText" preftype="color" prefstring="browser.display.foreground_color" prefattribute="value" wsm_attributes="value"/>
<data id="foregroundText" preftype="color" prefstring="browser.display.foreground_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label value="&backgroundColor.label;" accesskey="&backgroundColor.accesskey;" control="backgroundmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="backgroundmenu" palettename="standard"/>
<data id="background" preftype="color" prefstring="browser.display.background_color" prefattribute="value" wsm_attributes="value"/>
<data id="background" preftype="color" prefstring="browser.display.background_color"/>
</hbox>
<separator class="thin"/>
<hbox align="center">
@ -303,13 +302,13 @@
<label value="&linkColor.label;" accesskey="&linkColor.accesskey;" control="unvisitedlinkmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="unvisitedlinkmenu" palettename="standard"/>
<data id="unvisitedLinks" preftype="string" prefstring="browser.anchor_color" prefattribute="value" wsm_attributes="value"/>
<data id="unvisitedLinks" preftype="string" prefstring="browser.anchor_color"/>
</hbox>
<hbox align="center" style="margin-top: 5px">
<label value="&visitedLinkColor.label;" accesskey="&visitedLinkColor.accesskey;" control="visitedlinkmenu"/>
<spacer flex="1"/>
<colorpicker type="button" id="visitedlinkmenu" palettename="standard"/>
<data id="visitedLinks" preftype="string" prefstring="browser.visited_color" prefattribute="value" wsm_attributes="value"/>
<data id="visitedLinks" preftype="string" prefstring="browser.visited_color"/>
</hbox>
<separator class="thin"/>
<hbox align="center">