mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
"reversed" attribute is true. if so, reverse the value.
This commit is contained in:
parent
f5a6026e45
commit
dc6f96ac32
@ -83,7 +83,7 @@
|
||||
<html:fieldset>
|
||||
|
||||
<html:div>
|
||||
<html:input id="pref:1:bool:mail.play_sound" type="checkbox"/>
|
||||
<html:input id="pref:1:bool:mail.play_sound" reversed="true" type="checkbox"/>
|
||||
<html:label for="pref:1:bool:mail.play_sound">&playSound.label;</html:label>
|
||||
</html:div>
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
</html:div>
|
||||
|
||||
<html:div>
|
||||
<html:input id="pref:1:bool:mailnews.confirm.moveFoldersToTrash" reverse="true" type="checkbox"/>
|
||||
<html:input id="pref:1:bool:mailnews.confirm.moveFoldersToTrash" reversed="true" type="checkbox"/>
|
||||
<html:label for="pref:1:bool:mailnews.confirm.moveFoldersToTrash">&confirmMove.label;</html:label>
|
||||
</html:div>
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
</html:div>
|
||||
|
||||
<!--html:table>
|
||||
<html:tr><html:td><html:input type="checkbox" reversed="true" id="pref:1:bool:mail.play_sound"/>
|
||||
<html:tr><html:td><html:input type="checkbox" id="pref:1:bool:mail.play_sound"/>
|
||||
<html:label>&playSound.label;</html:label></html:td></html:tr>
|
||||
<html:tr><html:td><html:input type="checkbox" id="pref:1:bool:mailnews.remember_selected_message"/>
|
||||
<html:label>&rememberLastMsg.label;</html:label></html:td></html:tr>
|
||||
|
@ -365,8 +365,13 @@ nsresult nsPrefWindow::InitializeOneInputWidget(
|
||||
if (WIDGET_IS_TYPE(inWidgetType,"checkbox"))
|
||||
{
|
||||
boolVal = (PRBool)(boolVal ^ inPrefOrdinal);
|
||||
inElement->SetDefaultChecked(boolVal);
|
||||
inElement->SetChecked(boolVal);
|
||||
nsAutoString val;
|
||||
(void)inElement->GetAttribute("reversed",val);
|
||||
if (val.Equals("true")) {
|
||||
boolVal = !boolVal;
|
||||
}
|
||||
inElement->SetDefaultChecked(boolVal);
|
||||
inElement->SetChecked(boolVal);
|
||||
}
|
||||
else if (WIDGET_IS_TYPE(inWidgetType,"radio") && inPrefOrdinal == boolVal)
|
||||
{
|
||||
@ -722,7 +727,12 @@ nsresult nsPrefWindow::FinalizeOneInputWidget(
|
||||
return rv;
|
||||
if (WIDGET_IS_TYPE(inWidgetType,"checkbox"))
|
||||
{
|
||||
boolVal = (PRBool)(boolVal ^ inPrefOrdinal);
|
||||
boolVal = (PRBool)(boolVal ^ inPrefOrdinal);
|
||||
nsAutoString val;
|
||||
(void)inElement->GetAttribute("reversed",val);
|
||||
if (val.Equals("true")) {
|
||||
boolVal = !boolVal;
|
||||
}
|
||||
mPrefs->SetBoolPref(tempPrefName, boolVal);
|
||||
}
|
||||
else if (WIDGET_IS_TYPE(inWidgetType,"radio") && boolVal)
|
||||
|
Loading…
Reference in New Issue
Block a user