Make reversed="true" preference work with checkbox listitems so I can remove my previous hack (ouch!) b=181973 r=caillon (over irc) sr=alecf

This commit is contained in:
neil%parkwaycc.co.uk 2006-05-17 02:39:17 +00:00
Родитель a035c0e29d
Коммит 52856a10a1
2 изменённых файлов: 6 добавлений и 13 удалений

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

@ -73,7 +73,7 @@ function nsPrefWindow( frame_id )
this.contentFrame = frame_id
this.wsm = new nsWidgetStateManager( frame_id );
this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "prefinverse", "disabled"];
this.wsm.attributes = ["preftype", "prefstring", "prefattribute", "disabled"];
this.pref = null;
this.chromeRegistry = null;
this.observerService= null;
@ -267,8 +267,6 @@ nsPrefWindow.prototype =
value = true;
else if( value == "false" && typeof(value) == "string" )
value = false;
if (itemObject.prefinverse == "true")
value = !value;
break;
case "int":
value = parseInt(value, 10);
@ -391,11 +389,6 @@ nsPrefWindow.prototype =
if (isPrefLocked)
root.disabled = "true";
root.localname = prefElements[i].localName;
if (preftype == "bool") {
root.prefinverse = prefElements[i].getAttribute("prefinverse");
if (root.prefinverse == "true")
root[prefattribute] = !prefvalue;
}
}
}
this.wsm.setPageData( aPageTag ); // do not set extra elements, accept hard coded defaults

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

@ -70,15 +70,15 @@
<listbox id="AllowList" flex="1">
<listitem type="checkbox" id="allowWindowMoveResize" label="&allowWindowMoveResize.label;"
prefinverse="true" prefstring="dom.disable_window_move_resize"/>
reversed="true" prefstring="dom.disable_window_move_resize"/>
<listitem type="checkbox" id="allowWindowFlip" label="&allowWindowFlip.label;"
prefinverse="true" prefstring="dom.disable_window_flip"/>
reversed="true" prefstring="dom.disable_window_flip"/>
<listitem type="checkbox" id="allowHideStatusBar" label="&allowHideStatusBar.label;"
prefinverse="true" prefstring="dom.disable_window_open_feature.status"/>
reversed="true" prefstring="dom.disable_window_open_feature.status"/>
<listitem type="checkbox" id="allowWindowStatusChange" label="&allowWindowStatusChange.label;"
prefinverse="true" prefstring="dom.disable_window_status_change"/>
reversed="true" prefstring="dom.disable_window_status_change"/>
<listitem type="checkbox" id="allowImageSrcChange" label="&allowWindowImageSrcChange.label;"
prefinverse="true" prefstring="dom.disable_image_src_set"/>
reversed="true" prefstring="dom.disable_image_src_set"/>
<listitem type="checkbox" id="allowContextmenuDisable" label="&allowContextmenuDisable.label;"
prefstring="dom.event.contextmenu.enabled"/>
</listbox>