Rename "armour" to "armor"

This commit is contained in:
Thialfihar 2014-04-02 15:36:32 +02:00
parent 6ac13d9f69
commit c4c9713da4
6 changed files with 20 additions and 20 deletions

View File

@ -55,7 +55,7 @@ public final class Constants {
public static final class Pref { public static final class Pref {
public static final String DEFAULT_ENCRYPTION_ALGORITHM = "defaultEncryptionAlgorithm"; public static final String DEFAULT_ENCRYPTION_ALGORITHM = "defaultEncryptionAlgorithm";
public static final String DEFAULT_HASH_ALGORITHM = "defaultHashAlgorithm"; public static final String DEFAULT_HASH_ALGORITHM = "defaultHashAlgorithm";
public static final String DEFAULT_ASCII_ARMOUR = "defaultAsciiArmour"; public static final String DEFAULT_ASCII_ARMOR = "defaultAsciiArmor";
public static final String DEFAULT_MESSAGE_COMPRESSION = "defaultMessageCompression"; public static final String DEFAULT_MESSAGE_COMPRESSION = "defaultMessageCompression";
public static final String DEFAULT_FILE_COMPRESSION = "defaultFileCompression"; public static final String DEFAULT_FILE_COMPRESSION = "defaultFileCompression";
public static final String PASSPHRASE_CACHE_TTL = "passphraseCacheTtl"; public static final String PASSPHRASE_CACHE_TTL = "passphraseCacheTtl";

View File

@ -118,13 +118,13 @@ public class Preferences {
editor.commit(); editor.commit();
} }
public boolean getDefaultAsciiArmour() { public boolean getDefaultAsciiArmor() {
return mSharedPreferences.getBoolean(Constants.Pref.DEFAULT_ASCII_ARMOUR, false); return mSharedPreferences.getBoolean(Constants.Pref.DEFAULT_ASCII_ARMOR, false);
} }
public void setDefaultAsciiArmour(boolean value) { public void setDefaultAsciiArmor(boolean value) {
SharedPreferences.Editor editor = mSharedPreferences.edit(); SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.putBoolean(Constants.Pref.DEFAULT_ASCII_ARMOUR, value); editor.putBoolean(Constants.Pref.DEFAULT_ASCII_ARMOR, value);
editor.commit(); editor.commit();
} }

View File

@ -138,8 +138,8 @@ public class EncryptFileFragment extends Fragment {
mDeleteAfter = (CheckBox) view.findViewById(R.id.deleteAfterEncryption); mDeleteAfter = (CheckBox) view.findViewById(R.id.deleteAfterEncryption);
mShareAfter = (CheckBox) view.findViewById(R.id.shareAfterEncryption); mShareAfter = (CheckBox) view.findViewById(R.id.shareAfterEncryption);
mAsciiArmor = (CheckBox) view.findViewById(R.id.asciiArmour); mAsciiArmor = (CheckBox) view.findViewById(R.id.asciiArmor);
mAsciiArmor.setChecked(Preferences.getPreferences(getActivity()).getDefaultAsciiArmour()); mAsciiArmor.setChecked(Preferences.getPreferences(getActivity()).getDefaultAsciiArmor());
return view; return view;
} }

View File

@ -110,8 +110,8 @@ public class PreferencesActivity extends PreferenceActivity {
(IntegerListPreference) findPreference(Constants.Pref.DEFAULT_FILE_COMPRESSION), (IntegerListPreference) findPreference(Constants.Pref.DEFAULT_FILE_COMPRESSION),
entries, values); entries, values);
initializeAsciiArmour( initializeAsciiArmor(
(CheckBoxPreference) findPreference(Constants.Pref.DEFAULT_ASCII_ARMOUR)); (CheckBoxPreference) findPreference(Constants.Pref.DEFAULT_ASCII_ARMOR));
initializeForceV3Signatures( initializeForceV3Signatures(
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES)); (CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
@ -247,8 +247,8 @@ public class PreferencesActivity extends PreferenceActivity {
(IntegerListPreference) findPreference(Constants.Pref.DEFAULT_FILE_COMPRESSION), (IntegerListPreference) findPreference(Constants.Pref.DEFAULT_FILE_COMPRESSION),
entries, values); entries, values);
initializeAsciiArmour( initializeAsciiArmor(
(CheckBoxPreference) findPreference(Constants.Pref.DEFAULT_ASCII_ARMOUR)); (CheckBoxPreference) findPreference(Constants.Pref.DEFAULT_ASCII_ARMOR));
initializeForceV3Signatures( initializeForceV3Signatures(
(CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES)); (CheckBoxPreference) findPreference(Constants.Pref.FORCE_V3_SIGNATURES));
@ -362,12 +362,12 @@ public class PreferencesActivity extends PreferenceActivity {
}); });
} }
private static void initializeAsciiArmour(final CheckBoxPreference mAsciiArmour) { private static void initializeAsciiArmor(final CheckBoxPreference mAsciiArmor) {
mAsciiArmour.setChecked(sPreferences.getDefaultAsciiArmour()); mAsciiArmor.setChecked(sPreferences.getDefaultAsciiArmor());
mAsciiArmour.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { mAsciiArmor.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) { public boolean onPreferenceChange(Preference preference, Object newValue) {
mAsciiArmour.setChecked((Boolean) newValue); mAsciiArmor.setChecked((Boolean) newValue);
sPreferences.setDefaultAsciiArmour((Boolean) newValue); sPreferences.setDefaultAsciiArmor((Boolean) newValue);
return false; return false;
} }
}); });

View File

@ -54,7 +54,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<CheckBox <CheckBox
android:id="@+id/asciiArmour" android:id="@+id/asciiArmor"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"

View File

@ -35,7 +35,7 @@
android:title="@string/label_file_compression" /> android:title="@string/label_file_compression" />
<CheckBoxPreference <CheckBoxPreference
android:key="defaultAsciiArmour" android:key="defaultAsciiArmor"
android:persistent="false" android:persistent="false"
android:title="@string/label_ascii_armor" /> android:title="@string/label_ascii_armor" />
</PreferenceCategory> </PreferenceCategory>