From 6b2f7379824b8630387f418a1a851f7f65f36be6 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 29 Oct 2008 03:52:20 +0000 Subject: [PATCH] more settings UI for "AlwaysBcc" --- .../fsck/k9/activity/setup/AccountSettings.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index da9096406..5eb38ee07 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -24,6 +24,7 @@ public class AccountSettings extends PreferenceActivity { private static final String PREFERENCE_TOP_CATERGORY = "account_settings"; private static final String PREFERENCE_DESCRIPTION = "account_description"; private static final String PREFERENCE_NAME = "account_name"; + private static final String PREFERENCE_ALWAYS_BCC = "account_always_bcc"; private static final String PREFERENCE_FREQUENCY = "account_check_frequency"; private static final String PREFERENCE_DEFAULT = "account_default"; private static final String PREFERENCE_NOTIFY = "account_notify"; @@ -37,6 +38,7 @@ public class AccountSettings extends PreferenceActivity { private EditTextPreference mAccountDescription; private EditTextPreference mAccountName; + private EditTextPreference mAccountAlwaysBcc; private ListPreference mCheckFrequency; private CheckBoxPreference mAccountDefault; private CheckBoxPreference mAccountNotify; @@ -84,6 +86,21 @@ public class AccountSettings extends PreferenceActivity { } }); + mAccountAlwaysBcc = (EditTextPreference) findPreference(PREFERENCE_ALWAYS_BCC); + mAccountAlwaysBcc.setSummary(mAccount.getAlwaysBcc()); + mAccountAlwaysBcc.setText(mAccount.getAlwaysBcc()); + mAccountAlwaysBcc.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { + public boolean onPreferenceChange(Preference preference, Object newValue) { + final String summary = newValue.toString(); + mAccountAlwaysBcc.setSummary(summary); + mAccountAlwaysBcc.setText(summary); + return false; + } + }); + + + + mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY); mCheckFrequency.setValue(String.valueOf(mAccount.getAutomaticCheckIntervalMinutes())); mCheckFrequency.setSummary(mCheckFrequency.getEntry());