diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 0c6da49f5..47ef318ea 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -129,9 +129,9 @@ @string/account_settings_folder_display_mode_all - @string/account_settings_folder_display_mode_first_class - @string/account_settings_folder_display_mode_first_and_second_class - @string/account_settings_folder_display_mode_not_second_class + @string/account_settings_folder_display_mode_first_class + @string/account_settings_folder_display_mode_first_and_second_class + @string/account_settings_folder_display_mode_not_second_class @@ -143,8 +143,8 @@ @string/account_settings_hide_buttons_never - @string/account_settings_hide_buttons_keyboard_avail - @string/account_settings_hide_buttons_always + @string/account_settings_hide_buttons_keyboard_avail + @string/account_settings_hide_buttons_always @@ -155,8 +155,8 @@ @string/account_settings_hide_buttons_never - @string/account_settings_hide_buttons_keyboard_avail - @string/account_settings_hide_buttons_always + @string/account_settings_hide_buttons_keyboard_avail + @string/account_settings_hide_buttons_always @@ -165,10 +165,22 @@ ALWAYS + + @string/account_settings_show_pictures_never + @string/account_settings_show_pictures_only_from_contacts + @string/account_settings_show_pictures_always + + + + NEVER + ONLY_FROM_CONTACTS + ALWAYS + + @string/account_settings_searchable_all - @string/account_settings_searchable_displayable - @string/account_settings_searchable_none + @string/account_settings_searchable_displayable + @string/account_settings_searchable_none @@ -177,12 +189,12 @@ NONE - + @string/account_settings_folder_sync_mode_all - @string/account_settings_folder_sync_mode_first_class - @string/account_settings_folder_sync_mode_first_and_second_class - @string/account_settings_folder_sync_mode_not_second_class - @string/account_settings_folder_sync_mode_none + @string/account_settings_folder_sync_mode_first_class + @string/account_settings_folder_sync_mode_first_and_second_class + @string/account_settings_folder_sync_mode_not_second_class + @string/account_settings_folder_sync_mode_none @@ -195,10 +207,10 @@ @string/account_settings_folder_push_mode_all - @string/account_settings_folder_push_mode_first_class - @string/account_settings_folder_push_mode_first_and_second_class - @string/account_settings_folder_push_mode_not_second_class - @string/account_settings_folder_push_mode_none + @string/account_settings_folder_push_mode_first_class + @string/account_settings_folder_push_mode_first_and_second_class + @string/account_settings_folder_push_mode_not_second_class + @string/account_settings_folder_push_mode_none @@ -210,13 +222,13 @@ - @string/account_setup_push_limit_10 - @string/account_setup_push_limit_25 - @string/account_setup_push_limit_50 - @string/account_setup_push_limit_100 - @string/account_setup_push_limit_250 - @string/account_setup_push_limit_500 - @string/account_setup_push_limit_1000 + @string/account_setup_push_limit_10 + @string/account_setup_push_limit_25 + @string/account_setup_push_limit_50 + @string/account_setup_push_limit_100 + @string/account_setup_push_limit_250 + @string/account_setup_push_limit_500 + @string/account_setup_push_limit_1000 @@ -231,9 +243,9 @@ @string/account_settings_folder_target_mode_all - @string/account_settings_folder_target_mode_first_class - @string/account_settings_folder_target_mode_first_and_second_class - @string/account_settings_folder_target_mode_not_second_class + @string/account_settings_folder_target_mode_first_class + @string/account_settings_folder_target_mode_first_and_second_class + @string/account_settings_folder_target_mode_not_second_class @@ -244,9 +256,9 @@ - @string/folder_settings_folder_display_mode_normal - @string/folder_settings_folder_display_mode_first_class - @string/folder_settings_folder_display_mode_second_class + @string/folder_settings_folder_display_mode_normal + @string/folder_settings_folder_display_mode_first_class + @string/folder_settings_folder_display_mode_second_class @@ -256,31 +268,31 @@ - @string/folder_settings_folder_sync_mode_normal - @string/folder_settings_folder_sync_mode_first_class - @string/folder_settings_folder_sync_mode_second_class - @string/folder_settings_folder_sync_mode_inherited + @string/folder_settings_folder_sync_mode_normal + @string/folder_settings_folder_sync_mode_first_class + @string/folder_settings_folder_sync_mode_second_class + @string/folder_settings_folder_sync_mode_inherited - NO_CLASS - FIRST_CLASS - SECOND_CLASS - INHERITED + NO_CLASS + FIRST_CLASS + SECOND_CLASS + INHERITED - @string/folder_settings_folder_push_mode_normal - @string/folder_settings_folder_push_mode_first_class - @string/folder_settings_folder_push_mode_second_class - @string/folder_settings_folder_push_mode_inherited + @string/folder_settings_folder_push_mode_normal + @string/folder_settings_folder_push_mode_first_class + @string/folder_settings_folder_push_mode_second_class + @string/folder_settings_folder_push_mode_inherited - NO_CLASS - FIRST_CLASS - SECOND_CLASS - INHERITED + NO_CLASS + FIRST_CLASS + SECOND_CLASS + INHERITED @@ -296,15 +308,15 @@ - @string/account_setup_expunge_policy_immediately - @string/account_setup_expunge_policy_on_poll - @string/account_setup_expunge_policy_manual + @string/account_setup_expunge_policy_immediately + @string/account_setup_expunge_policy_on_poll + @string/account_setup_expunge_policy_manual - - EXPUNGE_IMMEDIATELY - EXPUNGE_ON_POLL - EXPUNGE_MANUALLY + + EXPUNGE_IMMEDIATELY + EXPUNGE_ON_POLL + EXPUNGE_MANUALLY @@ -493,20 +505,19 @@ - WHEN_CHECKED - WHEN_CHECKED_AUTO_SYNC - ALWAYS - NEVER + WHEN_CHECKED + WHEN_CHECKED_AUTO_SYNC + ALWAYS + NEVER - @string/date_format_short - @string/date_format_medium - @string/date_format_common - @string/date_format_iso8601 + @string/date_format_short + @string/date_format_medium + @string/date_format_common + @string/date_format_iso8601 - @string/font_size_tiniest @string/font_size_tiny @@ -548,15 +559,15 @@ - @string/idle_refresh_period_1min - @string/idle_refresh_period_2min - @string/idle_refresh_period_3min - @string/idle_refresh_period_6min - @string/idle_refresh_period_12min - @string/idle_refresh_period_24min - @string/idle_refresh_period_36min - @string/idle_refresh_period_48min - @string/idle_refresh_period_60min + @string/idle_refresh_period_1min + @string/idle_refresh_period_2min + @string/idle_refresh_period_3min + @string/idle_refresh_period_6min + @string/idle_refresh_period_12min + @string/idle_refresh_period_24min + @string/idle_refresh_period_36min + @string/idle_refresh_period_48min + @string/idle_refresh_period_60min diff --git a/res/values/strings.xml b/res/values/strings.xml index c4ae1779a..4b254f25c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -505,6 +505,11 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin Show the Archive, Move, and Spam buttons. Scroll move buttons + Show pictures automatically + Never + Only from contacts + Always + Writing messages Syncing folders Folders diff --git a/res/xml/account_settings_preferences.xml b/res/xml/account_settings_preferences.xml index a48b89b48..e3e6d87c0 100644 --- a/res/xml/account_settings_preferences.xml +++ b/res/xml/account_settings_preferences.xml @@ -30,9 +30,10 @@ android:key="account_default" android:title="@string/account_settings_default_label" android:summary="@string/account_settings_default_summary" /> - - + + + + android:summary="@string/account_settings_color_summary" /> + + android:summary="@string/account_settings_led_color_summary" /> + @@ -78,9 +79,17 @@ android:entryValues="@array/account_settings_hide_move_buttons_values" android:dialogTitle="@string/account_settings_hide_move_buttons_label" /> + + + - + + android:summary="@string/account_settings_incoming_summary" /> @@ -150,8 +158,8 @@ android:key="account_setup_auto_expand_folder" android:singleLine="true" android:title="@string/account_setup_auto_expand_folder" - android:summary="" - /> + android:summary="" /> + + android:title="@string/account_settings_composition_label" /> + android:summary="@string/account_settings_identities_summary" /> + android:summary="@string/account_settings_outgoing_summary" /> + @@ -253,6 +257,7 @@ android:defaultValue="false" android:title="@string/account_settings_vibrate_enable" android:summary="@string/account_settings_vibrate_summary" /> + + - - 0)) + { + forceShowPictures = true; + } + } + + if (forceShowPictures) + { + onShowPictures(); + } + else + { + mHandler.showShowPictures(true); + } } } else diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index dbd7530e5..9f78719ef 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -44,6 +44,7 @@ public class AccountSettings extends K9PreferenceActivity private static final String PREFERENCE_DEFAULT = "account_default"; private static final String PREFERENCE_HIDE_BUTTONS = "hide_buttons_enum"; private static final String PREFERENCE_HIDE_MOVE_BUTTONS = "hide_move_buttons_enum"; + private static final String PREFERENCE_SHOW_PICTURES = "show_pictures_enum"; private static final String PREFERENCE_ENABLE_MOVE_BUTTONS = "enable_move_buttons"; private static final String PREFERENCE_NOTIFY = "account_notify"; private static final String PREFERENCE_NOTIFY_SELF = "account_notify_self"; @@ -84,6 +85,7 @@ public class AccountSettings extends K9PreferenceActivity private CheckBoxPreference mAccountNotifySelf; private ListPreference mAccountHideButtons; private ListPreference mAccountHideMoveButtons; + private ListPreference mAccountShowPictures; private CheckBoxPreference mAccountEnableMoveButtons; private CheckBoxPreference mAccountNotifySync; private CheckBoxPreference mAccountVibrate; @@ -124,10 +126,9 @@ public class AccountSettings extends K9PreferenceActivity boolean isPushCapable = false; boolean isExpungeCapable = false; - Store store = null; try { - store = mAccount.getRemoteStore(); + final Store store = mAccount.getRemoteStore(); isPushCapable = store.isPushCapable(); isExpungeCapable = store.isExpungeCapable(); } @@ -383,6 +384,21 @@ public class AccountSettings extends K9PreferenceActivity } }); + mAccountShowPictures = (ListPreference) findPreference(PREFERENCE_SHOW_PICTURES); + mAccountShowPictures.setValue("" + mAccount.getShowPictures()); + mAccountShowPictures.setSummary(mAccountShowPictures.getEntry()); + mAccountShowPictures.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() + { + public boolean onPreferenceChange(Preference preference, Object newValue) + { + final String summary = newValue.toString(); + int index = mAccountShowPictures.findIndexOfValue(summary); + mAccountShowPictures.setSummary(mAccountShowPictures.getEntries()[index]); + mAccountShowPictures.setValue(summary); + return false; + } + }); + mAccountNotify = (CheckBoxPreference) findPreference(PREFERENCE_NOTIFY); mAccountNotify.setChecked(mAccount.isNotifyNewMail()); @@ -633,6 +649,7 @@ public class AccountSettings extends K9PreferenceActivity mAccount.setHideMessageViewButtons(Account.HideButtons.valueOf(mAccountHideButtons.getValue())); mAccount.setHideMessageViewMoveButtons(Account.HideButtons.valueOf(mAccountHideMoveButtons.getValue())); + mAccount.setShowPictures(Account.ShowPictures.valueOf(mAccountShowPictures.getValue())); mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked()); mAccount.setAutoExpandFolderName(reverseTranslateFolder(mAutoExpandFolder.getSummary().toString())); mAccount.save(Preferences.getPreferences(this));