mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Update issue 2144
Added option to show names from contacts to global preferences (value isn't used yet).
This commit is contained in:
parent
72cb0bf7ec
commit
23b53bd660
@ -314,6 +314,8 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
|||||||
<string name="global_settings_touchable_label">Message previews</string>
|
<string name="global_settings_touchable_label">Message previews</string>
|
||||||
<string name="global_settings_touchable_summary">Roomier list items with message previews</string>
|
<string name="global_settings_touchable_summary">Roomier list items with message previews</string>
|
||||||
|
|
||||||
|
<string name="global_settings_show_contact_name_label">Show names from Contacts</string>
|
||||||
|
<string name="global_settings_show_contact_name_summary">Show recipient names from Contacts if available</string>
|
||||||
<string name="global_settings_registered_name_color_label">Colorize contacts</string>
|
<string name="global_settings_registered_name_color_label">Colorize contacts</string>
|
||||||
<string name="global_settings_registered_name_color_default">Don\'t colorize names in your contact list</string>
|
<string name="global_settings_registered_name_color_default">Don\'t colorize names in your contact list</string>
|
||||||
<string name="global_settings_registered_name_color_changed">Colorize names in your contact list</string>
|
<string name="global_settings_registered_name_color_changed">Colorize names in your contact list</string>
|
||||||
|
@ -121,10 +121,16 @@
|
|||||||
android:title="@string/global_settings_checkbox_label"
|
android:title="@string/global_settings_checkbox_label"
|
||||||
android:summary="@string/global_settings_checkbox_summary" />
|
android:summary="@string/global_settings_checkbox_summary" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="messagelist_show_contact_name"
|
||||||
|
android:title="@string/global_settings_show_contact_name_label"
|
||||||
|
android:summary="@string/global_settings_show_contact_name_summary" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="change_registered_name_color"
|
android:key="change_registered_name_color"
|
||||||
android:title="@string/global_settings_registered_name_color_label"
|
android:title="@string/global_settings_registered_name_color_label"
|
||||||
android:summary="@string/global_settings_registered_name_color_default" />
|
android:summary="@string/global_settings_registered_name_color_default"
|
||||||
|
android:dependency="messagelist_show_contact_name" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ public class K9 extends Application
|
|||||||
private static boolean mMessageListCheckboxes = false;
|
private static boolean mMessageListCheckboxes = false;
|
||||||
private static boolean mMessageListTouchable = false;
|
private static boolean mMessageListTouchable = false;
|
||||||
|
|
||||||
|
private static boolean mShowContactName = false;
|
||||||
private static boolean mChangeRegisteredNameColor = false;
|
private static boolean mChangeRegisteredNameColor = false;
|
||||||
private static int mRegisteredNameColor = 0xff00008f;
|
private static int mRegisteredNameColor = 0xff00008f;
|
||||||
private static boolean mMessageViewFixedWidthFont = false;
|
private static boolean mMessageViewFixedWidthFont = false;
|
||||||
@ -380,7 +381,7 @@ public class K9 extends Application
|
|||||||
editor.putBoolean("messageListCheckboxes",mMessageListCheckboxes);
|
editor.putBoolean("messageListCheckboxes",mMessageListCheckboxes);
|
||||||
editor.putBoolean("messageListTouchable",mMessageListTouchable);
|
editor.putBoolean("messageListTouchable",mMessageListTouchable);
|
||||||
|
|
||||||
|
editor.putBoolean("showContactName",mShowContactName);
|
||||||
editor.putBoolean("changeRegisteredNameColor",mChangeRegisteredNameColor);
|
editor.putBoolean("changeRegisteredNameColor",mChangeRegisteredNameColor);
|
||||||
editor.putInt("registeredNameColor",mRegisteredNameColor);
|
editor.putInt("registeredNameColor",mRegisteredNameColor);
|
||||||
editor.putBoolean("messageViewFixedWidthFont",mMessageViewFixedWidthFont);
|
editor.putBoolean("messageViewFixedWidthFont",mMessageViewFixedWidthFont);
|
||||||
@ -421,6 +422,7 @@ public class K9 extends Application
|
|||||||
mMessageListCheckboxes = sprefs.getBoolean("messageListCheckboxes",false);
|
mMessageListCheckboxes = sprefs.getBoolean("messageListCheckboxes",false);
|
||||||
mMessageListTouchable = sprefs.getBoolean("messageListTouchable",false);
|
mMessageListTouchable = sprefs.getBoolean("messageListTouchable",false);
|
||||||
|
|
||||||
|
mShowContactName = sprefs.getBoolean("showContactName", false);
|
||||||
mChangeRegisteredNameColor = sprefs.getBoolean("changeRegisteredNameColor", false);
|
mChangeRegisteredNameColor = sprefs.getBoolean("changeRegisteredNameColor", false);
|
||||||
mRegisteredNameColor = sprefs.getInt("registeredNameColor", 0xff00008f);
|
mRegisteredNameColor = sprefs.getInt("registeredNameColor", 0xff00008f);
|
||||||
mMessageViewFixedWidthFont = sprefs.getBoolean("messageViewFixedWidthFont", false);
|
mMessageViewFixedWidthFont = sprefs.getBoolean("messageViewFixedWidthFont", false);
|
||||||
@ -689,6 +691,16 @@ public class K9 extends Application
|
|||||||
mMessageListCheckboxes = checkboxes;
|
mMessageListCheckboxes = checkboxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean showContactName()
|
||||||
|
{
|
||||||
|
return mShowContactName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setShowContactName(boolean showContactName)
|
||||||
|
{
|
||||||
|
mShowContactName = showContactName;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean changeRegisteredNameColor()
|
public static boolean changeRegisteredNameColor()
|
||||||
{
|
{
|
||||||
return mChangeRegisteredNameColor;
|
return mChangeRegisteredNameColor;
|
||||||
|
@ -49,7 +49,7 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
private static final String PREFERENCE_MESSAGELIST_STARS = "messagelist_stars";
|
private static final String PREFERENCE_MESSAGELIST_STARS = "messagelist_stars";
|
||||||
private static final String PREFERENCE_MESSAGELIST_CHECKBOXES = "messagelist_checkboxes";
|
private static final String PREFERENCE_MESSAGELIST_CHECKBOXES = "messagelist_checkboxes";
|
||||||
private static final String PREFERENCE_MESSAGELIST_TOUCHABLE = "messagelist_touchable";
|
private static final String PREFERENCE_MESSAGELIST_TOUCHABLE = "messagelist_touchable";
|
||||||
|
private static final String PREFERENCE_MESSAGELIST_SHOW_CONTACT_NAME = "messagelist_show_contact_name";
|
||||||
private static final String PREFERENCE_CHANGE_REGISTERED_NAME_COLOR = "change_registered_name_color";
|
private static final String PREFERENCE_CHANGE_REGISTERED_NAME_COLOR = "change_registered_name_color";
|
||||||
private static final String PREFERENCE_MESSAGEVIEW_FIXEDWIDTH = "messageview_fixedwidth_font";
|
private static final String PREFERENCE_MESSAGEVIEW_FIXEDWIDTH = "messageview_fixedwidth_font";
|
||||||
private static final String PREFERENCE_MESSAGEVIEW_RETURN_TO_LIST = "messageview_return_to_list";
|
private static final String PREFERENCE_MESSAGEVIEW_RETURN_TO_LIST = "messageview_return_to_list";
|
||||||
@ -76,7 +76,7 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
private CheckBoxPreference mStars;
|
private CheckBoxPreference mStars;
|
||||||
private CheckBoxPreference mCheckboxes;
|
private CheckBoxPreference mCheckboxes;
|
||||||
private CheckBoxPreference mTouchable;
|
private CheckBoxPreference mTouchable;
|
||||||
|
private CheckBoxPreference mShowContactName;
|
||||||
private CheckBoxPreference mChangeRegisteredNameColor;
|
private CheckBoxPreference mChangeRegisteredNameColor;
|
||||||
private CheckBoxPreference mFixedWidth;
|
private CheckBoxPreference mFixedWidth;
|
||||||
private CheckBoxPreference mReturnToList;
|
private CheckBoxPreference mReturnToList;
|
||||||
@ -233,6 +233,9 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
mTouchable = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_TOUCHABLE);
|
mTouchable = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_TOUCHABLE);
|
||||||
mTouchable.setChecked(K9.messageListTouchable());
|
mTouchable.setChecked(K9.messageListTouchable());
|
||||||
|
|
||||||
|
mShowContactName = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_SHOW_CONTACT_NAME);
|
||||||
|
mShowContactName.setChecked(K9.showContactName());
|
||||||
|
|
||||||
mChangeRegisteredNameColor = (CheckBoxPreference)findPreference(PREFERENCE_CHANGE_REGISTERED_NAME_COLOR);
|
mChangeRegisteredNameColor = (CheckBoxPreference)findPreference(PREFERENCE_CHANGE_REGISTERED_NAME_COLOR);
|
||||||
mChangeRegisteredNameColor.setChecked(K9.changeRegisteredNameColor());
|
mChangeRegisteredNameColor.setChecked(K9.changeRegisteredNameColor());
|
||||||
if (K9.changeRegisteredNameColor())
|
if (K9.changeRegisteredNameColor())
|
||||||
|
Loading…
Reference in New Issue
Block a user