Permalink
Browse files

Revert "Added a preference to always show the sender address on Messa…

…geCompose."

This reverts commit 43a5e5d.

Conflicts:

	src/com/fsck/k9/Account.java
	src/com/fsck/k9/activity/setup/AccountSettings.java
  • Loading branch information...
1 parent 30da832 commit a4ffbf0b9fa386198ec985f4761030da60684004 @jca02266 committed Mar 24, 2012
@@ -23,38 +23,14 @@
android:orientation="vertical"
android:background="#ededed" >
- <LinearLayout
- android:id="@+id/sender_layout"
+ <TextView
+ android:id="@+id/from"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingRight="6dip"
- android:paddingBottom="2dip"
- android:descendantFocusability="blocksDescendants"
- android:gravity="center_vertical"
- android:background="@android:color/transparent"
- android:visibility="gone">
-
- <View
- android:id="@+id/chip"
- android:layout_width="6dip"
- android:layout_height="fill_parent"
- android:layout_marginTop="2dip"
- android:layout_marginBottom="1dip"
- android:layout_centerVertical="true"
- android:layout_alignParentLeft="true"
- android:background="@android:color/transparent" />
-
- <TextView
- android:id="@+id/from"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="6dip"
- android:layout_marginRight="6dip"
- android:textColor="@android:color/primary_text_light"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
-
+ android:layout_marginLeft="6dip"
+ android:layout_marginRight="6dip"
+ android:textColor="@android:color/primary_text_light"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout
android:id="@+id/to_wrapper"
android:layout_height="wrap_content"
View
@@ -592,9 +592,6 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="account_settings_message_charset_label">Message Charset</string>
<string name="account_settings_message_charset_summary">select charset to send</string>
- <string name="account_settings_show_sender_label">Show sender address</string>
- <string name="account_settings_show_sender_summary">always show the address of sender</string>
-
<string name="account_settings_general_title">General settings</string>
<string name="account_settings_display_prefs_title">Display</string>
<string name="account_settings_sync">Fetching mail</string>
@@ -240,12 +240,6 @@
android:title="@string/account_settings_message_read_receipt_label"
android:summary="@string/account_settings_message_read_receipt_summary" />
- <CheckBoxPreference
- android:persistent="false"
- android:key="show_sender"
- android:title="@string/account_settings_show_sender_label"
- android:summary="@string/account_settings_show_sender_summary" />
-
<ListPreference
android:persistent="false"
android:key="quote_style"
@@ -154,7 +154,6 @@
private String mSecurityKey;
private boolean mCryptoAutoEncrypt;
private String mMessageCharset;
- private boolean mShowSender;
private boolean mMarkMessageAsReadOnView;
private CryptoProvider mCryptoProvider = null;
@@ -243,8 +242,6 @@ protected Account(Context context) {
mCryptoAutoSignature = false;
mCryptoAutoEncrypt = false;
mMessageCharset = DEFAULT_MESSAGE_CHARSET;
- mShowSender = false;
-
mEnabled = true;
mMarkMessageAsReadOnView = true;
@@ -402,8 +399,6 @@ private synchronized void loadAccount(Preferences preferences) {
mCryptoAutoSignature = prefs.getBoolean(mUuid + ".cryptoAutoSignature", false);
mCryptoAutoEncrypt = prefs.getBoolean(mUuid + ".cryptoAutoEncrypt", false);
mMessageCharset = prefs.getString(mUuid + ".messageCharset", "UTF-8");
- mShowSender = prefs.getBoolean(mUuid + ".showSender", false);
-
mEnabled = prefs.getBoolean(mUuid + ".enabled", true);
mMarkMessageAsReadOnView = prefs.getBoolean(mUuid + ".markMessageAsReadOnView", true);
mSyncKey = prefs.getString(mUuid + ".syncKey", "");
@@ -487,7 +482,6 @@ protected synchronized void delete(Preferences preferences) {
editor.remove(mUuid + ".cryptoApp");
editor.remove(mUuid + ".cryptoAutoSignature");
editor.remove(mUuid + ".cryptoAutoEncrypt");
- editor.remove(mUuid + ".showSender");
editor.remove(mUuid + ".enabled");
editor.remove(mUuid + ".enableMoveButtons");
editor.remove(mUuid + ".hideMoveButtonsEnum");
@@ -651,8 +645,6 @@ public synchronized void save(Preferences preferences) {
editor.putBoolean(mUuid + ".cryptoAutoSignature", mCryptoAutoSignature);
editor.putBoolean(mUuid + ".cryptoAutoEncrypt", mCryptoAutoEncrypt);
editor.putString(mUuid + ".messageCharset", mMessageCharset);
- editor.putBoolean(mUuid + ".showSender", mShowSender);
-
editor.putBoolean(mUuid + ".enabled", mEnabled);
editor.putBoolean(mUuid + ".markMessageAsReadOnView", mMarkMessageAsReadOnView);
editor.putString(mUuid + ".syncKey", mSyncKey);
@@ -1559,14 +1551,6 @@ public synchronized NotificationSetting getNotificationSetting() {
return mNotificationSetting;
}
- public boolean isShowSender() {
- return mShowSender;
- }
-
- public void setShowSender(boolean showSender) {
- mShowSender = showSender;
- }
-
/**
* @return <code>true</code> if our {@link StorageProvider} is ready. (e.g.
* card inserted)
@@ -553,6 +553,8 @@ public void afterTextChanged(android.text.Editable s) { /* do nothing */ }
mQuotedTextEdit.setOnClickListener(this);
mQuotedTextDelete.setOnClickListener(this);
+ mFromView.setVisibility(View.GONE);
+
mToView.setAdapter(mAddressAdapter);
mToView.setTokenizer(new Rfc822Tokenizer());
mToView.setValidator(mAddressValidator);
@@ -583,15 +585,6 @@ public void afterTextChanged(android.text.Editable s) { /* do nothing */ }
mIdentity = mAccount.getIdentity(0);
}
- if (mAccount.isShowSender()) {
- findViewById(R.id.sender_layout).setVisibility(View.VISIBLE);
- findViewById(R.id.chip).setBackgroundColor(mAccount.getChipColor());
- }
- else {
- findViewById(R.id.sender_layout).setVisibility(View.GONE);
- }
- mFromView.setText(getString(R.string.message_view_from_format, mIdentity.getName(), mIdentity.getEmail()));
-
if (mAccount.isSignatureBeforeQuotedText()) {
mSignatureView = upperSignature;
lowerSignature.setVisibility(View.GONE);
@@ -1941,8 +1934,7 @@ private void switchToIdentity(Identity identity) {
private void updateFrom() {
if (mIdentityChanged) {
- findViewById(R.id.sender_layout).setVisibility(View.VISIBLE);
- findViewById(R.id.chip).setBackgroundColor(mAccount.getChipColor());
+ mFromView.setVisibility(View.VISIBLE);
}
mFromView.setText(getString(R.string.message_view_from_format, mIdentity.getName(), mIdentity.getEmail()));
}
@@ -97,7 +97,6 @@
private static final String PREFERENCE_CRYPTO_AUTO_ENCRYPT = "crypto_auto_encrypt";
private static final String PREFERENCE_LOCAL_STORAGE_PROVIDER = "local_storage_provider";
private static final String PREFERENCE_MESSAGE_CHARSET = "message_charset";
- private static final String PREFERENCE_SHOW_SENDER = "show_sender";
private static final String PREFERENCE_CATEGORY_FOLDERS = "folders";
private static final String PREFERENCE_ARCHIVE_FOLDER = "archive_folder";
@@ -161,7 +160,6 @@
private CheckBoxPreference mCryptoAutoSignature;
private CheckBoxPreference mCryptoAutoEncrypt;
private ListPreference mMessageCharset;
- private CheckBoxPreference mShowSender;
private ListPreference mLocalStorageProvider;
private ListPreference mArchiveFolder;
@@ -673,9 +671,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
return false;
}
});
-
- mShowSender = (CheckBoxPreference)findPreference(PREFERENCE_SHOW_SENDER);
- mShowSender.setChecked(mAccount.isShowSender());
}
private void handleCryptoAppDependencies() {
@@ -730,8 +725,6 @@ private void saveSettings() {
mAccount.setLocalStorageProviderId(mLocalStorageProvider.getValue());
mAccount.setMessageCharset(mMessageCharset.getValue());
- mAccount.setShowSender(mShowSender.isChecked());
-
// In webdav account we use the exact folder name also for inbox,
// since it varies because of internationalization

0 comments on commit a4ffbf0

Please sign in to comment.