1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 02:09:35 +02:00

onAccept -> onDialogClosed

This commit is contained in:
Nikolay Pultsin 2011-10-27 18:05:45 +01:00
parent 6cd5b5e228
commit edffb5600b
4 changed files with 12 additions and 4 deletions

View file

@ -51,7 +51,9 @@ class DictionaryPreference extends ZLStringListPreference {
setInitialValue(myOption.getValue());
}
public void onAccept() {
@Override
protected void onDialogClosed(boolean result) {
super.onDialogClosed(result);
myOption.setValue(getValue());
}
}

View file

@ -61,7 +61,9 @@ class FontOption extends ZLStringListPreference {
}
}
public void onAccept() {
@Override
protected void onDialogClosed(boolean result) {
super.onDialogClosed(result);
final String value = getValue();
myOption.setValue(UNCHANGED.equals(value) ? "" : value);
}

View file

@ -42,7 +42,9 @@ class FontStylePreference extends ZLStringListPreference {
setInitialValue(myValues[intValue]);
}
public void onAccept() {
@Override
protected void onDialogClosed(boolean result) {
super.onDialogClosed(result);
final int intValue = findIndexOfValue(getValue());
myBoldOption.setValue((intValue & 0x1) == 0x1);
myItalicOption.setValue((intValue & 0x2) == 0x2);

View file

@ -49,7 +49,9 @@ class ZLIntegerChoicePreference extends ZLStringListPreference {
setInitialValue(valueResourceKeys[index]);
}
public void onAccept() {
@Override
protected void onDialogClosed(boolean result) {
super.onDialogClosed(result);
myOption.setValue(myValues[findIndexOfValue(getValue())]);
}
}