mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
Added option to always show the CC/BCC text input fields
This commit is contained in:
parent
1ff3b6b88f
commit
d9f1690741
@ -552,6 +552,9 @@ http://k9mail.googlecode.com/
|
|||||||
<string name="account_settings_message_format_html">HTML (images and formatting are preserved)</string>
|
<string name="account_settings_message_format_html">HTML (images and formatting are preserved)</string>
|
||||||
<string name="account_settings_message_format_auto">Automatic (plain text unless replying to an HTML message)</string>
|
<string name="account_settings_message_format_auto">Automatic (plain text unless replying to an HTML message)</string>
|
||||||
|
|
||||||
|
<string name="account_settings_always_show_cc_bcc_label">Always show CC/BCC</string>
|
||||||
|
<string name="account_settings_always_show_cc_bcc_summary">Always show the CC/BCC text input fields</string>
|
||||||
|
|
||||||
<string name="account_settings_message_read_receipt_label">Read receipt</string>
|
<string name="account_settings_message_read_receipt_label">Read receipt</string>
|
||||||
<string name="account_settings_message_read_receipt_summary">Always request a read receipt</string>
|
<string name="account_settings_message_read_receipt_summary">Always request a read receipt</string>
|
||||||
|
|
||||||
|
@ -231,6 +231,12 @@
|
|||||||
android:entries="@array/account_settings_message_format_entries"
|
android:entries="@array/account_settings_message_format_entries"
|
||||||
android:entryValues="@array/account_settings_message_format_values" />
|
android:entryValues="@array/account_settings_message_format_values" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:persistent="false"
|
||||||
|
android:key="always_show_cc_bcc"
|
||||||
|
android:title="@string/account_settings_always_show_cc_bcc_label"
|
||||||
|
android:summary="@string/account_settings_always_show_cc_bcc_summary" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:key="message_read_receipt"
|
android:key="message_read_receipt"
|
||||||
|
@ -186,6 +186,7 @@ public class Account implements BaseAccount {
|
|||||||
private boolean mCryptoAutoSignature;
|
private boolean mCryptoAutoSignature;
|
||||||
private boolean mCryptoAutoEncrypt;
|
private boolean mCryptoAutoEncrypt;
|
||||||
private boolean mMarkMessageAsReadOnView;
|
private boolean mMarkMessageAsReadOnView;
|
||||||
|
private boolean mAlwaysShowCcBcc;
|
||||||
|
|
||||||
private CryptoProvider mCryptoProvider = null;
|
private CryptoProvider mCryptoProvider = null;
|
||||||
|
|
||||||
@ -276,6 +277,7 @@ public class Account implements BaseAccount {
|
|||||||
mCryptoAutoEncrypt = false;
|
mCryptoAutoEncrypt = false;
|
||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
mMarkMessageAsReadOnView = true;
|
mMarkMessageAsReadOnView = true;
|
||||||
|
mAlwaysShowCcBcc = false;
|
||||||
|
|
||||||
searchableFolders = Searchable.ALL;
|
searchableFolders = Searchable.ALL;
|
||||||
|
|
||||||
@ -441,6 +443,7 @@ public class Account implements BaseAccount {
|
|||||||
mCryptoAutoEncrypt = prefs.getBoolean(mUuid + ".cryptoAutoEncrypt", false);
|
mCryptoAutoEncrypt = prefs.getBoolean(mUuid + ".cryptoAutoEncrypt", false);
|
||||||
mEnabled = prefs.getBoolean(mUuid + ".enabled", true);
|
mEnabled = prefs.getBoolean(mUuid + ".enabled", true);
|
||||||
mMarkMessageAsReadOnView = prefs.getBoolean(mUuid + ".markMessageAsReadOnView", true);
|
mMarkMessageAsReadOnView = prefs.getBoolean(mUuid + ".markMessageAsReadOnView", true);
|
||||||
|
mAlwaysShowCcBcc = prefs.getBoolean(mUuid + ".alwaysShowCcBcc", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected synchronized void delete(Preferences preferences) {
|
protected synchronized void delete(Preferences preferences) {
|
||||||
@ -525,6 +528,7 @@ public class Account implements BaseAccount {
|
|||||||
editor.remove(mUuid + ".enableMoveButtons");
|
editor.remove(mUuid + ".enableMoveButtons");
|
||||||
editor.remove(mUuid + ".hideMoveButtonsEnum");
|
editor.remove(mUuid + ".hideMoveButtonsEnum");
|
||||||
editor.remove(mUuid + ".markMessageAsReadOnView");
|
editor.remove(mUuid + ".markMessageAsReadOnView");
|
||||||
|
editor.remove(mUuid + ".alwaysShowCcBcc");
|
||||||
for (String type : networkTypes) {
|
for (String type : networkTypes) {
|
||||||
editor.remove(mUuid + ".useCompression." + type);
|
editor.remove(mUuid + ".useCompression." + type);
|
||||||
}
|
}
|
||||||
@ -688,6 +692,7 @@ public class Account implements BaseAccount {
|
|||||||
editor.putBoolean(mUuid + ".cryptoAutoEncrypt", mCryptoAutoEncrypt);
|
editor.putBoolean(mUuid + ".cryptoAutoEncrypt", mCryptoAutoEncrypt);
|
||||||
editor.putBoolean(mUuid + ".enabled", mEnabled);
|
editor.putBoolean(mUuid + ".enabled", mEnabled);
|
||||||
editor.putBoolean(mUuid + ".markMessageAsReadOnView", mMarkMessageAsReadOnView);
|
editor.putBoolean(mUuid + ".markMessageAsReadOnView", mMarkMessageAsReadOnView);
|
||||||
|
editor.putBoolean(mUuid + ".alwaysShowCcBcc", mAlwaysShowCcBcc);
|
||||||
|
|
||||||
editor.putBoolean(mUuid + ".vibrate", mNotificationSetting.shouldVibrate());
|
editor.putBoolean(mUuid + ".vibrate", mNotificationSetting.shouldVibrate());
|
||||||
editor.putInt(mUuid + ".vibratePattern", mNotificationSetting.getVibratePattern());
|
editor.putInt(mUuid + ".vibratePattern", mNotificationSetting.getVibratePattern());
|
||||||
@ -1623,4 +1628,12 @@ public class Account implements BaseAccount {
|
|||||||
public synchronized void setMarkMessageAsReadOnView(boolean value) {
|
public synchronized void setMarkMessageAsReadOnView(boolean value) {
|
||||||
mMarkMessageAsReadOnView = value;
|
mMarkMessageAsReadOnView = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean isAlwaysShowCcBcc() {
|
||||||
|
return mAlwaysShowCcBcc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void setAlwaysShowCcBcc(boolean show) {
|
||||||
|
mAlwaysShowCcBcc = show;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -508,6 +508,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
mCcWrapper = (LinearLayout) findViewById(R.id.cc_wrapper);
|
mCcWrapper = (LinearLayout) findViewById(R.id.cc_wrapper);
|
||||||
mBccWrapper = (LinearLayout) findViewById(R.id.bcc_wrapper);
|
mBccWrapper = (LinearLayout) findViewById(R.id.bcc_wrapper);
|
||||||
|
|
||||||
|
if (mAccount.isAlwaysShowCcBcc()) {
|
||||||
|
onAddCcBcc();
|
||||||
|
}
|
||||||
|
|
||||||
EditText upperSignature = (EditText)findViewById(R.id.upper_signature);
|
EditText upperSignature = (EditText)findViewById(R.id.upper_signature);
|
||||||
EditText lowerSignature = (EditText)findViewById(R.id.lower_signature);
|
EditText lowerSignature = (EditText)findViewById(R.id.lower_signature);
|
||||||
|
|
||||||
@ -2017,6 +2021,15 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
} else {
|
} else {
|
||||||
mAccount = account;
|
mAccount = account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show CC/BCC text input field when switching to an account that always wants them
|
||||||
|
// displayed.
|
||||||
|
// Please note that we're not hiding the fields if the user switches back to an account
|
||||||
|
// that doesn't have this setting checked.
|
||||||
|
if (mAccount.isAlwaysShowCcBcc()) {
|
||||||
|
onAddCcBcc();
|
||||||
|
}
|
||||||
|
|
||||||
// not sure how to handle mFolder, mSourceMessage?
|
// not sure how to handle mFolder, mSourceMessage?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ public class AccountSettings extends K9PreferenceActivity {
|
|||||||
private static final String PREFERENCE_SENT_FOLDER = "sent_folder";
|
private static final String PREFERENCE_SENT_FOLDER = "sent_folder";
|
||||||
private static final String PREFERENCE_SPAM_FOLDER = "spam_folder";
|
private static final String PREFERENCE_SPAM_FOLDER = "spam_folder";
|
||||||
private static final String PREFERENCE_TRASH_FOLDER = "trash_folder";
|
private static final String PREFERENCE_TRASH_FOLDER = "trash_folder";
|
||||||
|
private static final String PREFERENCE_ALWAYS_SHOW_CC_BCC = "always_show_cc_bcc";
|
||||||
|
|
||||||
|
|
||||||
private Account mAccount;
|
private Account mAccount;
|
||||||
@ -169,6 +169,7 @@ public class AccountSettings extends K9PreferenceActivity {
|
|||||||
private ListPreference mSentFolder;
|
private ListPreference mSentFolder;
|
||||||
private ListPreference mSpamFolder;
|
private ListPreference mSpamFolder;
|
||||||
private ListPreference mTrashFolder;
|
private ListPreference mTrashFolder;
|
||||||
|
private CheckBoxPreference mAlwaysShowCcBcc;
|
||||||
|
|
||||||
|
|
||||||
public static void actionSettings(Context context, Account account) {
|
public static void actionSettings(Context context, Account account) {
|
||||||
@ -223,6 +224,9 @@ public class AccountSettings extends K9PreferenceActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mAlwaysShowCcBcc = (CheckBoxPreference) findPreference(PREFERENCE_ALWAYS_SHOW_CC_BCC);
|
||||||
|
mAlwaysShowCcBcc.setChecked(mAccount.isAlwaysShowCcBcc());
|
||||||
|
|
||||||
mMessageReadReceipt = (CheckBoxPreference) findPreference(PREFERENCE_MESSAGE_READ_RECEIPT);
|
mMessageReadReceipt = (CheckBoxPreference) findPreference(PREFERENCE_MESSAGE_READ_RECEIPT);
|
||||||
mMessageReadReceipt.setChecked(mAccount.isMessageReadReceiptAlways());
|
mMessageReadReceipt.setChecked(mAccount.isMessageReadReceiptAlways());
|
||||||
|
|
||||||
@ -719,6 +723,7 @@ public class AccountSettings extends K9PreferenceActivity {
|
|||||||
mAccount.setSaveAllHeaders(mSaveAllHeaders.isChecked());
|
mAccount.setSaveAllHeaders(mSaveAllHeaders.isChecked());
|
||||||
mAccount.setSearchableFolders(Account.Searchable.valueOf(mSearchableFolders.getValue()));
|
mAccount.setSearchableFolders(Account.Searchable.valueOf(mSearchableFolders.getValue()));
|
||||||
mAccount.setMessageFormat(Account.MessageFormat.valueOf(mMessageFormat.getValue()));
|
mAccount.setMessageFormat(Account.MessageFormat.valueOf(mMessageFormat.getValue()));
|
||||||
|
mAccount.setAlwaysShowCcBcc(mAlwaysShowCcBcc.isChecked());
|
||||||
mAccount.setMessageReadReceipt(mMessageReadReceipt.isChecked());
|
mAccount.setMessageReadReceipt(mMessageReadReceipt.isChecked());
|
||||||
mAccount.setQuoteStyle(QuoteStyle.valueOf(mQuoteStyle.getValue()));
|
mAccount.setQuoteStyle(QuoteStyle.valueOf(mQuoteStyle.getValue()));
|
||||||
mAccount.setQuotePrefix(mAccountQuotePrefix.getText());
|
mAccount.setQuotePrefix(mAccountQuotePrefix.getText());
|
||||||
|
@ -33,6 +33,9 @@ public class AccountSettings {
|
|||||||
s.put("alwaysBcc", Settings.versions(
|
s.put("alwaysBcc", Settings.versions(
|
||||||
new V(11, new StringSetting(""))
|
new V(11, new StringSetting(""))
|
||||||
));
|
));
|
||||||
|
s.put("alwaysShowCcBcc", Settings.versions(
|
||||||
|
new V(13, new BooleanSetting(false))
|
||||||
|
));
|
||||||
s.put("archiveFolderName", Settings.versions(
|
s.put("archiveFolderName", Settings.versions(
|
||||||
new V(1, new StringSetting("Archive"))
|
new V(1, new StringSetting("Archive"))
|
||||||
));
|
));
|
||||||
|
@ -35,7 +35,7 @@ public class Settings {
|
|||||||
*
|
*
|
||||||
* @see SettingsExporter
|
* @see SettingsExporter
|
||||||
*/
|
*/
|
||||||
public static final int VERSION = 12;
|
public static final int VERSION = 13;
|
||||||
|
|
||||||
public static Map<String, Object> validate(int version, Map<String,
|
public static Map<String, Object> validate(int version, Map<String,
|
||||||
TreeMap<Integer, SettingsDescription>> settings,
|
TreeMap<Integer, SettingsDescription>> settings,
|
||||||
|
Loading…
Reference in New Issue
Block a user