Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regroup preferences #1635

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
78f7f9c
refactor preferences into multiple PreferenceFragments
agrajaghh Nov 4, 2014
b81a468
change textcolors
agrajaghh Nov 6, 2014
9ecf01b
make "enter key sends" dependent on "enable enter key"
agrajaghh Nov 6, 2014
e81e503
improve push registration behaviour
agrajaghh Nov 7, 2014
0a78f58
staying in preferences after enabling passphrase protection
agrajaghh Nov 7, 2014
f5fc335
invert the passphrase setting
agrajaghh Nov 18, 2014
ee90b2d
"Incoming" with a capital I
agrajaghh Nov 21, 2014
eb07802
load MmsPreferencesFragment without an Activity, add Summary
agrajaghh Nov 21, 2014
d864d35
improve MMS settings strings
agrajaghh Nov 21, 2014
037c10c
use android.R.string.cancel
agrajaghh Dec 7, 2014
669653e
add color variables
agrajaghh Dec 7, 2014
d8cd9ef
use switch() and throw AssertionError
agrajaghh Dec 9, 2014
0c43074
fix "case" indent
agrajaghh Dec 9, 2014
4685e6e
dont use getString if not necessary
agrajaghh Dec 9, 2014
8031736
DisablePushMessagesTask should only accept CheckBoxPreference
agrajaghh Dec 9, 2014
28d9291
remove initializeEditTextSummary since its not used
agrajaghh Dec 9, 2014
a665052
replace nested if's with &&
agrajaghh Dec 9, 2014
43bf645
remove unnecessary spaces
agrajaghh Dec 9, 2014
2f3fa2e
use getBooleanExtra
agrajaghh Dec 9, 2014
2b10511
move PICK_IDENTITY_CONTACT into PreferenceFragmentAdvanced
agrajaghh Dec 9, 2014
b3f40cc
remove unused ENABLE_PASSPHRASE_ACTIVITY
agrajaghh Dec 9, 2014
eeea899
rename PreferenceFragment classes
agrajaghh Dec 9, 2014
499e5b5
use Arrays.asList for "findIndexOfValue"
agrajaghh Dec 9, 2014
7a8d775
fix linebreak
agrajaghh Dec 9, 2014
e3dd24f
use getString formatting options
agrajaghh Dec 9, 2014
dd6a5f6
remove unnecessary spaces
agrajaghh Dec 9, 2014
6e628f9
breaking up getSummary() into smaller methods
agrajaghh Dec 11, 2014
390d8d3
use ProgressDialogAsyncTask instead of AsyncTask
agrajaghh Dec 11, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions res/color/text_color_dark_theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_enabled="false" android:color="@color/gray50"/>
<item android:color="@color/gray5"/>
</selector>
5 changes: 5 additions & 0 deletions res/color/text_color_light_theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_enabled="false" android:color="@color/gray27"/>
<item android:color="@color/gray95"/>
</selector>
5 changes: 5 additions & 0 deletions res/color/text_color_secondary_dark_theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_enabled="false" android:color="@color/gray50"/>
<item android:color="@color/gray13"/>
</selector>
5 changes: 5 additions & 0 deletions res/color/text_color_secondary_light_theme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_enabled="false" android:color="@color/gray27"/>
<item android:color="@color/gray50"/>
</selector>
3 changes: 3 additions & 0 deletions res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<color name="black">#ff000000</color>
<color name="gray5">#ffeeeeee</color>
<color name="gray10">#ffdddddd</color>
<color name="gray13">#ffababab</color>
<color name="gray27">#ffbbbbbb</color>
<color name="gray50">#ff808080</color>
<color name="gray95">#ff111111</color>

<color name="gray95_transparent50">#7F111111</color>
Expand Down
30 changes: 21 additions & 9 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- ApplicationPreferencesActivity -->
<string name="ApplicationPreferencesActivity_currently_s">Currently: %s</string>
<string name="ApplicationPreferenceActivity_you_havent_set_a_passphrase_yet">You haven\'t set a passphrase yet!</string>
<string name="ApplicationPreferencesActivity_messages_per_conversation">messages per conversation</string>
<string name="ApplicationPreferencesActivity_messages_per_conversation">%s messages per conversation</string>
<string name="ApplicationPreferencesActivity_delete_all_old_messages_now">Delete all old messages now?</string>
<string name="ApplicationPreferencesActivity_are_you_sure_you_would_like_to_immediately_trim_all_conversation_threads_to_the_s_most_recent_messages">Are you sure you would like to immediately trim all conversation threads to the %s most recent messages?</string>
<string name="ApplicationPreferencesActivity_delete">Delete</string>
Expand All @@ -31,6 +31,15 @@
<string name="ApplicationPreferencesActivity_touch_to_change_your_default_sms_app">Touch to change your default SMS app</string>
<string name="ApplicationPreferencesActivity_sms_disabled">Incoming SMS Disabled</string>
<string name="ApplicationPreferencesActivity_touch_to_make_textsecure_your_default_sms_app">Touch to make TextSecure your default SMS app</string>
<string name="ApplicationPreferencesActivity_on">on</string>
<string name="ApplicationPreferencesActivity_On">On</string>
<string name="ApplicationPreferencesActivity_off">off</string>
<string name="ApplicationPreferencesActivity_Off">Off</string>
<string name="ApplicationPreferencesActivity_partial">partial</string>
<string name="ApplicationPreferencesActivity_sms">SMS</string>
<string name="ApplicationPreferencesActivity_mms">MMS</string>
<string name="ApplicationPreferencesActivity_incoming_sms">Incoming SMS</string>
<string name="ApplicationPreferencesActivity_outgoing_sms">outgoing SMS</string>

<!-- AttchmentManager -->
<string name="AttachmentManager_cant_open_media_selection">Can\'t find an app to select media.</string>
Expand Down Expand Up @@ -463,8 +472,10 @@
<string name="import_fragment__import_a_plaintext_backup_file">
Import a plaintext backup file. Compatible with \'SMSBackup And Restore.\'</string>

<!-- mms_preferences_activity -->
<string name="mms_preferences_activity__manual_mms_settings_are_required">Manual MMS settings are required for your phone.</string>
<!-- MmsPreferencesFragment -->
<string name="MmsPreferencesFragment__manual_mms_settings_are_required">Manual MMS settings are required for your phone.</string>
<string name="MmsPreferencesFragment__enabled">Enabled</string>
<string name="MmsPreferencesFragment__disabled">Disabled</string>

<!-- prompt_passphrase_activity -->
<string name="prompt_passphrase_activity__unlock">Unlock</string>
Expand Down Expand Up @@ -583,6 +594,8 @@
<string name="arrays__my_identity_key">My identity key</string>

<!-- preferences.xml -->
<string name="preferences__general">General</string>
<string name="preferences__sms_mms">SMS and MMS</string>
<string name="preferences__push_sms_category">Push and SMS</string>
<string name="preferences__pref_all_sms_title">Receive all SMS</string>
<string name="preferences__pref_all_mms_title">Receive all MMS</string>
Expand All @@ -599,8 +612,8 @@
<string name="preferences__change_passphrase">Change passphrase</string>
<string name="preferences__change_my_passphrase">Change my passphrase</string>
<string name="preferences__complete_key_exchanges">Complete key exchanges</string>
<string name="preferences__disable_passphrase">Disable passphrase</string>
<string name="preferences__disable_local_encryption_of_messages_and_keys">Disable local encryption of messages and keys</string>
<string name="preferences__enable_passphrase">Enable passphrase</string>
<string name="preferences__enable_local_encryption_of_messages_and_keys">Enable local encryption of messages and keys</string>
<string name="preferences__screen_security">Screen security</string>
<string name="preferences__automatically_complete_key_exchanges_for_new_sessions_or_for_existing_sessions_with_the_same_identity_key">Automatically complete key exchanges for new sessions or for existing sessions with the same identity key</string>
<string name="preferences__disable_screen_security_to_allow_screen_shots">Block screenshots in the recents list and inside the app</string>
Expand Down Expand Up @@ -638,9 +651,9 @@
<string name="preferences__slow">Slow</string>
<string name="preferences__custom">Custom</string>
<string name="preferences__advanced">Advanced</string>
<string name="preferences__passphrase">Passphrase</string>
<string name="preferences__advanced_mms_access_point_names">MMS preferences</string>
<string name="preferences__enable_manual_mms">Enable manual MMS</string>
<string name="preferences__app_protection">App protection</string>
<string name="preferences__advanced_mms_access_point_names">Manual MMS settings</string>
<string name="preferences__enable_manual_mms">Use manual MMS settings</string>
<string name="preferences__override_system_mms_settings">Override system MMS settings with the information below.</string>
<string name="preferences__mmsc_url_required">MMSC URL (Required)</string>
<string name="preferences__mms_proxy_host_optional">MMS Proxy Host (Optional)</string>
Expand All @@ -651,7 +664,6 @@
<string name="preferences__request_a_delivery_report_for_each_sms_message_you_send">Request a delivery report for each SMS message you send</string>
<string name="preferences__automatically_delete_older_messages_once_a_conversation_thread_exceeds_a_specified_length">Automatically delete older messages once a conversation thread exceeds a specified length</string>
<string name="preferences__delete_old_messages">Delete old messages</string>
<string name="preferences__storage">Storage</string>
<string name="preferences__conversation_length_limit">Conversation length limit</string>
<string name="preferences__trim_all_threads_now">Trim all threads now</string>
<string name="preferences__scan_through_all_conversation_threads_and_enforce_conversation_length_limits">Scan through all conversation threads and enforce conversation length limits</string>
Expand Down
4 changes: 4 additions & 0 deletions res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<item name="android:logo">@drawable/actionbar_icon_holo_light</item>
<item name="android:actionBarStyle">@style/TextSecure.LightActionBar</item>
<item name="actionBarStyle">@style/TextSecure.LightActionBar</item>
<item name="android:textColor">@color/text_color_light_theme</item>
<item name="android:textColorSecondary">@color/text_color_secondary_light_theme</item>
<item name="conversation_list_item_background_read">@drawable/conversation_list_item_background_read_light</item>
<item name="conversation_list_item_background_unread">@drawable/conversation_list_item_background_unread_light</item>
<item name="conversation_list_item_background_selected">@drawable/list_selected_holo_light</item>
Expand Down Expand Up @@ -88,6 +90,8 @@

<item name="android:actionBarStyle">@style/TextSecure.DarkActionBar</item>
<item name="actionBarStyle">@style/TextSecure.DarkActionBar</item>
<item name="android:textColor">@color/text_color_dark_theme</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark_theme</item>
<item name="conversation_list_item_background_read">@drawable/conversation_list_item_background_read_dark</item>
<item name="conversation_list_item_background_unread">@drawable/conversation_list_item_background_unread_dark</item>
<item name="conversation_list_item_background_selected">@drawable/list_selected_holo_dark</item>
Expand Down
Loading