diff --git a/k9mail/src/main/java/com/fsck/k9/FontSizes.java b/k9mail/src/main/java/com/fsck/k9/FontSizes.java index 810e8f30f..090949bce 100644 --- a/k9mail/src/main/java/com/fsck/k9/FontSizes.java +++ b/k9mail/src/main/java/com/fsck/k9/FontSizes.java @@ -24,6 +24,7 @@ public class FontSizes { private static final String MESSAGE_VIEW_SENDER = "fontSizeMessageViewSender"; private static final String MESSAGE_VIEW_TO = "fontSizeMessageViewTo"; private static final String MESSAGE_VIEW_CC = "fontSizeMessageViewCC"; + private static final String MESSAGE_VIEW_BCC = "fontSizeMessageViewBCC"; private static final String MESSAGE_VIEW_ADDITIONAL_HEADERS = "fontSizeMessageViewAdditionalHeaders"; private static final String MESSAGE_VIEW_SUBJECT = "fontSizeMessageViewSubject"; private static final String MESSAGE_VIEW_DATE = "fontSizeMessageViewDate"; @@ -53,6 +54,7 @@ public class FontSizes { private int messageViewSender; private int messageViewTo; private int messageViewCC; + private int messageViewBCC; private int messageViewAdditionalHeaders; private int messageViewSubject; private int messageViewDate; @@ -75,6 +77,7 @@ public class FontSizes { messageViewSender = FONT_DEFAULT; messageViewTo = FONT_DEFAULT; messageViewCC = FONT_DEFAULT; + messageViewBCC = FONT_DEFAULT; messageViewAdditionalHeaders = FONT_DEFAULT; messageViewSubject = FONT_DEFAULT; messageViewDate = FONT_DEFAULT; @@ -98,6 +101,7 @@ public class FontSizes { editor.putInt(MESSAGE_VIEW_SENDER, messageViewSender); editor.putInt(MESSAGE_VIEW_TO, messageViewTo); editor.putInt(MESSAGE_VIEW_CC, messageViewCC); + editor.putInt(MESSAGE_VIEW_BCC, messageViewBCC); editor.putInt(MESSAGE_VIEW_ADDITIONAL_HEADERS, messageViewAdditionalHeaders); editor.putInt(MESSAGE_VIEW_SUBJECT, messageViewSubject); editor.putInt(MESSAGE_VIEW_DATE, messageViewDate); @@ -121,6 +125,7 @@ public class FontSizes { messageViewSender = storage.getInt(MESSAGE_VIEW_SENDER, messageViewSender); messageViewTo = storage.getInt(MESSAGE_VIEW_TO, messageViewTo); messageViewCC = storage.getInt(MESSAGE_VIEW_CC, messageViewCC); + messageViewBCC = storage.getInt(MESSAGE_VIEW_BCC, messageViewBCC); messageViewAdditionalHeaders = storage.getInt(MESSAGE_VIEW_ADDITIONAL_HEADERS, messageViewAdditionalHeaders); messageViewSubject = storage.getInt(MESSAGE_VIEW_SUBJECT, messageViewSubject); messageViewDate = storage.getInt(MESSAGE_VIEW_DATE, messageViewDate); @@ -228,6 +233,14 @@ public class FontSizes { this.messageViewCC = messageViewCC; } + public int getMessageViewBCC() { + return messageViewBCC; + } + + public void setMessageViewBCC(int messageViewBCC) { + this.messageViewBCC = messageViewBCC; + } + public int getMessageViewAdditionalHeaders() { return messageViewAdditionalHeaders; } diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java index d5a77e925..c688b6bb1 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/FontSizeSettings.java @@ -31,6 +31,7 @@ public class FontSizeSettings extends K9PreferenceActivity { private static final String PREFERENCE_MESSAGE_VIEW_SENDER_FONT = "message_view_sender_font"; private static final String PREFERENCE_MESSAGE_VIEW_TO_FONT = "message_view_to_font"; private static final String PREFERENCE_MESSAGE_VIEW_CC_FONT = "message_view_cc_font"; + private static final String PREFERENCE_MESSAGE_VIEW_BCC_FONT = "message_view_bcc_font"; private static final String PREFERENCE_MESSAGE_VIEW_ADDITIONAL_HEADERS_FONT = "message_view_additional_headers_font"; private static final String PREFERENCE_MESSAGE_VIEW_SUBJECT_FONT = "message_view_subject_font"; private static final String PREFERENCE_MESSAGE_VIEW_DATE_FONT = "message_view_date_font"; @@ -48,6 +49,7 @@ public class FontSizeSettings extends K9PreferenceActivity { private ListPreference mMessageViewSender; private ListPreference mMessageViewTo; private ListPreference mMessageViewCC; + private ListPreference mMessageViewBCC; private ListPreference mMessageViewAdditionalHeaders; private ListPreference mMessageViewSubject; private ListPreference mMessageViewDate; @@ -110,6 +112,9 @@ public class FontSizeSettings extends K9PreferenceActivity { mMessageViewCC = setupListPreference( PREFERENCE_MESSAGE_VIEW_CC_FONT, Integer.toString(fontSizes.getMessageViewCC())); + mMessageViewBCC = setupListPreference( + PREFERENCE_MESSAGE_VIEW_BCC_FONT, + Integer.toString(fontSizes.getMessageViewBCC())); mMessageViewAdditionalHeaders = setupListPreference( PREFERENCE_MESSAGE_VIEW_ADDITIONAL_HEADERS_FONT, Integer.toString(fontSizes.getMessageViewAdditionalHeaders())); @@ -172,6 +177,7 @@ public class FontSizeSettings extends K9PreferenceActivity { fontSizes.setMessageViewSender(Integer.parseInt(mMessageViewSender.getValue())); fontSizes.setMessageViewTo(Integer.parseInt(mMessageViewTo.getValue())); fontSizes.setMessageViewCC(Integer.parseInt(mMessageViewCC.getValue())); + fontSizes.setMessageViewBCC(Integer.parseInt(mMessageViewBCC.getValue())); fontSizes.setMessageViewAdditionalHeaders(Integer.parseInt(mMessageViewAdditionalHeaders.getValue())); fontSizes.setMessageViewSubject(Integer.parseInt(mMessageViewSubject.getValue())); fontSizes.setMessageViewDate(Integer.parseInt(mMessageViewDate.getValue())); diff --git a/k9mail/src/main/java/com/fsck/k9/preferences/GlobalSettings.java b/k9mail/src/main/java/com/fsck/k9/preferences/GlobalSettings.java index f1a799ed9..9ce707859 100644 --- a/k9mail/src/main/java/com/fsck/k9/preferences/GlobalSettings.java +++ b/k9mail/src/main/java/com/fsck/k9/preferences/GlobalSettings.java @@ -291,6 +291,9 @@ public class GlobalSettings { s.put("openPgpSupportSignOnly", Settings.versions( new V(47, new BooleanSetting(false)) )); + s.put("fontSizeMessageViewBCC", Settings.versions( + new V(48, new FontSizeSetting(FontSizes.FONT_DEFAULT)) + )); SETTINGS = Collections.unmodifiableMap(s); diff --git a/k9mail/src/main/java/com/fsck/k9/preferences/Settings.java b/k9mail/src/main/java/com/fsck/k9/preferences/Settings.java index 383edaa22..79a809001 100644 --- a/k9mail/src/main/java/com/fsck/k9/preferences/Settings.java +++ b/k9mail/src/main/java/com/fsck/k9/preferences/Settings.java @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 47; + public static final int VERSION = 48; static Map validate(int version, Map> settings, Map importedSettings, boolean useDefaultValues) { diff --git a/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java b/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java index ce008876e..77d532918 100644 --- a/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java +++ b/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java @@ -55,6 +55,8 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo private TextView mToLabel; private TextView mCcView; private TextView mCcLabel; + private TextView mBccView; + private TextView mBccLabel; private TextView mSubjectView; private MessageCryptoStatusView mCryptoStatusIcon; @@ -109,6 +111,8 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo mToLabel = (TextView) findViewById(R.id.to_label); mCcView = (TextView) findViewById(R.id.cc); mCcLabel = (TextView) findViewById(R.id.cc_label); + mBccView = (TextView) findViewById(R.id.bcc); + mBccLabel = (TextView) findViewById(R.id.bcc_label); mContactBadge = (ContactBadge) findViewById(R.id.contact_badge); @@ -128,14 +132,18 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo mFontSizes.setViewTextSize(mToLabel, mFontSizes.getMessageViewTo()); mFontSizes.setViewTextSize(mCcView, mFontSizes.getMessageViewCC()); mFontSizes.setViewTextSize(mCcLabel, mFontSizes.getMessageViewCC()); + mFontSizes.setViewTextSize(mBccView, mFontSizes.getMessageViewBCC()); + mFontSizes.setViewTextSize(mBccLabel, mFontSizes.getMessageViewBCC()); mFromView.setOnClickListener(this); mToView.setOnClickListener(this); mCcView.setOnClickListener(this); + mBccView.setOnClickListener(this); mFromView.setOnLongClickListener(this); mToView.setOnLongClickListener(this); mCcView.setOnLongClickListener(this); + mBccView.setOnLongClickListener(this); mCryptoStatusIcon = (MessageCryptoStatusView) findViewById(R.id.crypto_status_icon); mCryptoStatusIcon.setOnClickListener(this); @@ -153,7 +161,8 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo break; } case R.id.to: - case R.id.cc: { + case R.id.cc: + case R.id.bcc: { expand((TextView)view, ((TextView)view).getEllipsize() != null); layoutChanged(); break; @@ -264,6 +273,7 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo final CharSequence from = MessageHelper.toFriendly(message.getFrom(), contacts); final CharSequence to = MessageHelper.toFriendly(message.getRecipients(Message.RecipientType.TO), contacts); final CharSequence cc = MessageHelper.toFriendly(message.getRecipients(Message.RecipientType.CC), contacts); + final CharSequence bcc = MessageHelper.toFriendly(message.getRecipients(Message.RecipientType.BCC), contacts); Address[] fromAddrs = message.getFrom(); Address[] toAddrs = message.getRecipients(Message.RecipientType.TO); @@ -336,6 +346,7 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo updateAddressField(mToView, to, mToLabel); updateAddressField(mCcView, cc, mCcLabel); + updateAddressField(mBccView, bcc, mBccLabel); mAnsweredIcon.setVisibility(message.isSet(Flag.ANSWERED) ? View.VISIBLE : View.GONE); mForwardedIcon.setVisibility(message.isSet(Flag.FORWARDED) ? View.VISIBLE : View.GONE); mFlagged.setChecked(message.isSet(Flag.FLAGGED)); diff --git a/k9mail/src/main/res/layout/message_view_header.xml b/k9mail/src/main/res/layout/message_view_header.xml index 8d28ff0cc..4446a0984 100644 --- a/k9mail/src/main/res/layout/message_view_header.xml +++ b/k9mail/src/main/res/layout/message_view_header.xml @@ -179,6 +179,33 @@ android:paddingTop="2dp" android:textColor="?android:attr/textColorSecondary" android:textAppearance="@android:style/TextAppearance.Medium" /> + + + + + From: %s <%s> To: Cc: + Bcc: Open Save Unable to save attachment to SD card. @@ -902,6 +903,7 @@ Please submit bug reports, contribute new features and ask questions at Sender To Cc + Bcc Additional headers Subject Time and date diff --git a/k9mail/src/main/res/xml/font_preferences.xml b/k9mail/src/main/res/xml/font_preferences.xml index fd2c340b4..41f49eea0 100644 --- a/k9mail/src/main/res/xml/font_preferences.xml +++ b/k9mail/src/main/res/xml/font_preferences.xml @@ -121,6 +121,14 @@ android:entryValues="@array/font_values" android:dialogTitle="@string/font_size_message_view_cc" /> + +