1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-30 14:50:14 -05:00
This commit is contained in:
Jesse Vincent 2010-10-11 00:08:54 +00:00
parent a683186f6e
commit 5fc78b4219
7 changed files with 45 additions and 40 deletions

View File

@ -154,7 +154,7 @@
android:key="incoming" android:key="incoming"
android:title="@string/account_settings_incoming_label" android:title="@string/account_settings_incoming_label"
android:summary="@string/account_settings_incoming_summary" /> android:summary="@string/account_settings_incoming_summary" />
<PreferenceScreen <PreferenceScreen
android:key="push_advanced" android:key="push_advanced"
android:title="@string/account_settings_push_advanced_title"> android:title="@string/account_settings_push_advanced_title">
<CheckBoxPreference <CheckBoxPreference

View File

@ -53,7 +53,7 @@ public class K9PreferenceActivity extends PreferenceActivity
* entry from entries is selected. * entry from entries is selected.
*/ */
protected void initListPreference(final ListPreference prefView, final String value, protected void initListPreference(final ListPreference prefView, final String value,
final CharSequence[] entries, final CharSequence[] entryValues) final CharSequence[] entries, final CharSequence[] entryValues)
{ {
prefView.setEntries(entries); prefView.setEntries(entries);
prefView.setEntryValues(entryValues); prefView.setEntryValues(entryValues);

View File

@ -141,6 +141,8 @@ public class AccountSettings extends K9PreferenceActivity
String accountUuid = getIntent().getStringExtra(EXTRA_ACCOUNT); String accountUuid = getIntent().getStringExtra(EXTRA_ACCOUNT);
mAccount = Preferences.getPreferences(this).getAccount(accountUuid); mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
boolean isPushCapable = false; boolean isPushCapable = false;
boolean isExpungeCapable = false; boolean isExpungeCapable = false;
try try
@ -621,6 +623,9 @@ public class AccountSettings extends K9PreferenceActivity
} }
}); });
mCryptoApp = (ListPreference) findPreference(PREFERENCE_CRYPTO_APP); mCryptoApp = (ListPreference) findPreference(PREFERENCE_CRYPTO_APP);
CharSequence cryptoAppEntries[] = mCryptoApp.getEntries(); CharSequence cryptoAppEntries[] = mCryptoApp.getEntries();
if (!new Apg().isAvailable(this)) if (!new Apg().isAvailable(this))

View File

@ -75,53 +75,53 @@ public class FontSizeSettings extends K9PreferenceActivity
addPreferencesFromResource(R.xml.font_preferences); addPreferencesFromResource(R.xml.font_preferences);
mAccountName = setupListPreference( mAccountName = setupListPreference(
PREFERENCE_ACCOUNT_NAME_FONT, PREFERENCE_ACCOUNT_NAME_FONT,
Integer.toString(fontSizes.getAccountName())); Integer.toString(fontSizes.getAccountName()));
mAccountDescription = setupListPreference( mAccountDescription = setupListPreference(
PREFERENCE_ACCOUNT_DESCRIPTION_FONT, PREFERENCE_ACCOUNT_DESCRIPTION_FONT,
Integer.toString(fontSizes.getAccountDescription())); Integer.toString(fontSizes.getAccountDescription()));
mFolderName = setupListPreference( mFolderName = setupListPreference(
PREFERENCE_FOLDER_NAME_FONT, PREFERENCE_FOLDER_NAME_FONT,
Integer.toString(fontSizes.getFolderName())); Integer.toString(fontSizes.getFolderName()));
mFolderStatus = setupListPreference( mFolderStatus = setupListPreference(
PREFERENCE_FOLDER_STATUS_FONT, PREFERENCE_FOLDER_STATUS_FONT,
Integer.toString(fontSizes.getFolderStatus())); Integer.toString(fontSizes.getFolderStatus()));
mMessageListSubject = setupListPreference( mMessageListSubject = setupListPreference(
PREFERENCE_MESSAGE_LIST_SUBJECT_FONT, PREFERENCE_MESSAGE_LIST_SUBJECT_FONT,
Integer.toString(fontSizes.getMessageListSubject())); Integer.toString(fontSizes.getMessageListSubject()));
mMessageListSender = setupListPreference( mMessageListSender = setupListPreference(
PREFERENCE_MESSAGE_LIST_SENDER_FONT, PREFERENCE_MESSAGE_LIST_SENDER_FONT,
Integer.toString(fontSizes.getMessageListSender())); Integer.toString(fontSizes.getMessageListSender()));
mMessageListDate = setupListPreference( mMessageListDate = setupListPreference(
PREFERENCE_MESSAGE_LIST_DATE_FONT, PREFERENCE_MESSAGE_LIST_DATE_FONT,
Integer.toString(fontSizes.getMessageListDate())); Integer.toString(fontSizes.getMessageListDate()));
mMessageViewSender = setupListPreference( mMessageViewSender = setupListPreference(
PREFERENCE_MESSAGE_VIEW_SENDER_FONT, PREFERENCE_MESSAGE_VIEW_SENDER_FONT,
Integer.toString(fontSizes.getMessageViewSender())); Integer.toString(fontSizes.getMessageViewSender()));
mMessageViewTo = setupListPreference( mMessageViewTo = setupListPreference(
PREFERENCE_MESSAGE_VIEW_TO_FONT, PREFERENCE_MESSAGE_VIEW_TO_FONT,
Integer.toString(fontSizes.getMessageViewTo())); Integer.toString(fontSizes.getMessageViewTo()));
mMessageViewCC = setupListPreference( mMessageViewCC = setupListPreference(
PREFERENCE_MESSAGE_VIEW_CC_FONT, PREFERENCE_MESSAGE_VIEW_CC_FONT,
Integer.toString(fontSizes.getMessageViewCC())); Integer.toString(fontSizes.getMessageViewCC()));
mMessageViewAdditionalHeaders = setupListPreference( mMessageViewAdditionalHeaders = setupListPreference(
PREFERENCE_MESSAGE_VIEW_ADDITIONAL_HEADERS_FONT, PREFERENCE_MESSAGE_VIEW_ADDITIONAL_HEADERS_FONT,
Integer.toString(fontSizes.getMessageViewAdditionalHeaders())); Integer.toString(fontSizes.getMessageViewAdditionalHeaders()));
mMessageViewSubject = setupListPreference( mMessageViewSubject = setupListPreference(
PREFERENCE_MESSAGE_VIEW_SUBJECT_FONT, PREFERENCE_MESSAGE_VIEW_SUBJECT_FONT,
Integer.toString(fontSizes.getMessageViewSubject())); Integer.toString(fontSizes.getMessageViewSubject()));
mMessageViewTime = setupListPreference( mMessageViewTime = setupListPreference(
PREFERENCE_MESSAGE_VIEW_TIME_FONT, PREFERENCE_MESSAGE_VIEW_TIME_FONT,
Integer.toString(fontSizes.getMessageViewTime())); Integer.toString(fontSizes.getMessageViewTime()));
mMessageViewDate = setupListPreference( mMessageViewDate = setupListPreference(
PREFERENCE_MESSAGE_VIEW_DATE_FONT, PREFERENCE_MESSAGE_VIEW_DATE_FONT,
Integer.toString(fontSizes.getMessageViewDate())); Integer.toString(fontSizes.getMessageViewDate()));
mMessageViewContent = setupListPreference( mMessageViewContent = setupListPreference(
PREFERENCE_MESSAGE_VIEW_CONTENT_FONT, PREFERENCE_MESSAGE_VIEW_CONTENT_FONT,
Integer.toString(fontSizes.getMessageViewContentAsInt())); Integer.toString(fontSizes.getMessageViewContentAsInt()));
} }
/** /**

View File

@ -114,8 +114,8 @@ public class Prefs extends K9PreferenceActivity
} }
} }
initListPreference(mLanguage, K9.getK9Language(), initListPreference(mLanguage, K9.getK9Language(),
entryVector.toArray(EMPTY_CHAR_SEQUENCE_ARRAY), entryVector.toArray(EMPTY_CHAR_SEQUENCE_ARRAY),
entryValueVector.toArray(EMPTY_CHAR_SEQUENCE_ARRAY)); entryValueVector.toArray(EMPTY_CHAR_SEQUENCE_ARRAY));
final String theme = (K9.getK9Theme() == android.R.style.Theme) ? "dark" : "light"; final String theme = (K9.getK9Theme() == android.R.style.Theme) ? "dark" : "light";
mTheme = setupListPreference(PREFERENCE_THEME, theme); mTheme = setupListPreference(PREFERENCE_THEME, theme);

View File

@ -279,10 +279,10 @@ public class Address
{ {
final SpannableString coloredName = new SpannableString(name); final SpannableString coloredName = new SpannableString(name);
coloredName.setSpan(new ForegroundColorSpan(K9.getContactNameColor()), coloredName.setSpan(new ForegroundColorSpan(K9.getContactNameColor()),
0, 0,
coloredName.length(), coloredName.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
); );
return coloredName; return coloredName;
} }
else else

View File

@ -183,8 +183,8 @@ public class MessageProvider extends ContentProvider
{ {
final Message message = source.message; final Message message = source.message;
return CONTENT_URI + "/delete_message/" return CONTENT_URI + "/delete_message/"
+ message.getFolder().getAccount().getAccountNumber() + "/" + message.getFolder().getAccount().getAccountNumber() + "/"
+ message.getFolder().getName() + "/" + message.getUid(); + message.getFolder().getName() + "/" + message.getUid();
} }
} }
public static class SenderExtractor implements FieldExtractor<MessageInfoHolder, CharSequence> public static class SenderExtractor implements FieldExtractor<MessageInfoHolder, CharSequence>