diff options
author | Thialfihar <thialfihar@gmail.com> | 2010-06-17 13:23:07 +0000 |
---|---|---|
committer | Thialfihar <thialfihar@gmail.com> | 2010-06-17 13:23:07 +0000 |
commit | 1bad192a91364fe48ae38ddcf6fb436a40a82283 (patch) | |
tree | 1549299e50016a793bf6d57c5a21add8a3ee3869 /res | |
parent | 865c998abdf96f8b97e6bb444b732fa18fc02671 (diff) | |
download | open-keychain-1bad192a91364fe48ae38ddcf6fb436a40a82283.tar.gz open-keychain-1bad192a91364fe48ae38ddcf6fb436a40a82283.tar.bz2 open-keychain-1bad192a91364fe48ae38ddcf6fb436a40a82283.zip |
using proper PreferenceActivity now, tho the underlying storage of the values remained almost the same, some changes how the preferences are accessed and how the cache service is started
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/filter_info.xml | 15 | ||||
-rw-r--r-- | res/layout/general.xml | 15 | ||||
-rw-r--r-- | res/layout/info.xml | 15 | ||||
-rw-r--r-- | res/layout/pass_phrase.xml | 15 | ||||
-rw-r--r-- | res/layout/preferences.xml | 197 | ||||
-rw-r--r-- | res/values/arrays.xml | 35 | ||||
-rw-r--r-- | res/xml/apg_preferences.xml | 62 | ||||
-rw-r--r-- | res/xml/searchable_public_keys.xml | 15 | ||||
-rw-r--r-- | res/xml/searchable_secret_keys.xml | 15 |
9 files changed, 187 insertions, 197 deletions
diff --git a/res/layout/filter_info.xml b/res/layout/filter_info.xml index 8e07f2434..2270682f5 100644 --- a/res/layout/filter_info.xml +++ b/res/layout/filter_info.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
diff --git a/res/layout/general.xml b/res/layout/general.xml index afc776a33..c6702efac 100644 --- a/res/layout/general.xml +++ b/res/layout/general.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" diff --git a/res/layout/info.xml b/res/layout/info.xml index ab9e99a5b..2507029c4 100644 --- a/res/layout/info.xml +++ b/res/layout/info.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" diff --git a/res/layout/pass_phrase.xml b/res/layout/pass_phrase.xml index f377e5bf7..d66ffca07 100644 --- a/res/layout/pass_phrase.xml +++ b/res/layout/pass_phrase.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" diff --git a/res/layout/preferences.xml b/res/layout/preferences.xml deleted file mode 100644 index 1ff97a0e4..000000000 --- a/res/layout/preferences.xml +++ /dev/null @@ -1,197 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<ScrollView - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:fillViewport="true"> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:paddingTop="5dip" - android:layout_marginRight="?android:attr/scrollbarSize"> - - <TextView - android:id="@+id/section_general" - android:text="@string/section_general" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceLarge"/> - - <View - android:layout_width="fill_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" - android:layout_marginBottom="5dip"/> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_passPhraseCacheTtl" - android:text="@string/label_passPhraseCacheTtl" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:paddingRight="10dip"/> - - <Spinner - android:id="@+id/passPhraseCacheTtl" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - <TextView - android:id="@+id/section_defaults" - android:text="@string/section_defaults" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginTop="5dip" - android:textAppearance="?android:attr/textAppearanceLarge"/> - - <View - android:layout_width="fill_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" - android:layout_marginBottom="5dip"/> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_encryptionAlgorithm" - android:text="@string/label_encryptionAlgorithm" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:paddingRight="10dip"/> - - <Spinner - android:id="@+id/encryptionAlgorithm" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_hashAlgorithm" - android:text="@string/label_hashAlgorithm" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:paddingRight="10dip"/> - - <Spinner - android:id="@+id/hashAlgorithm" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_messageCompression" - android:text="@string/label_messageCompression" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:paddingRight="10dip"/> - - <Spinner - android:id="@+id/messageCompression" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_fileCompression" - android:text="@string/label_fileCompression" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:paddingRight="10dip"/> - - <Spinner - android:id="@+id/fileCompression" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <TextView - android:id="@+id/label_asciiArmour" - android:text="@string/label_asciiArmour" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_gravity="center_vertical" - android:paddingRight="10dip" - android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1"/> - - <CheckBox - android:id="@+id/asciiArmour" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_gravity="center_vertical"/> - - </LinearLayout> - - </LinearLayout> - -</ScrollView> diff --git a/res/values/arrays.xml b/res/values/arrays.xml new file mode 100644 index 000000000..db87d7c4a --- /dev/null +++ b/res/values/arrays.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + + <string-array name="pass_phrase_cache_ttl_entries"> + <item>@string/choice_15secs</item> + <item>@string/choice_1min</item> + <item>@string/choice_3mins</item> + <item>@string/choice_5mins</item> + <item>@string/choice_10mins</item> + </string-array> + + <string-array name="pass_phrase_cache_ttl_values"> + <item>15</item> + <item>60</item> + <item>180</item> + <item>300</item> + <item>600</item> + </string-array> + +</resources> diff --git a/res/xml/apg_preferences.xml b/res/xml/apg_preferences.xml new file mode 100644 index 000000000..7ce9b5344 --- /dev/null +++ b/res/xml/apg_preferences.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<PreferenceScreen + xmlns:android="http://schemas.android.com/apk/res/android"> + + <PreferenceCategory + android:title="@string/section_general"> + + <org.thialfihar.android.apg.IntegerListPreference + android:persistent="false" + android:key="passPhraseCacheTtl" + android:entries="@array/pass_phrase_cache_ttl_entries" + android:entryValues="@array/pass_phrase_cache_ttl_values" + android:title="@string/label_passPhraseCacheTtl" /> + + </PreferenceCategory> + + <PreferenceCategory + android:title="@string/section_defaults"> + + <org.thialfihar.android.apg.IntegerListPreference + android:persistent="false" + android:key="defaultEncryptionAlgorithm" + android:title="@string/label_encryptionAlgorithm" /> + + <org.thialfihar.android.apg.IntegerListPreference + android:persistent="false" + android:key="defaultHashAlgorithm" + android:title="@string/label_hashAlgorithm" /> + + <org.thialfihar.android.apg.IntegerListPreference + android:persistent="false" + android:key="defaultMessageCompression" + android:title="@string/label_messageCompression" /> + + <org.thialfihar.android.apg.IntegerListPreference + android:persistent="false" + android:key="defaultFileCompression" + android:title="@string/label_fileCompression" /> + + <CheckBoxPreference + android:persistent="false" + android:key="defaultAsciiArmour" + android:title="@string/label_asciiArmour" /> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/searchable_public_keys.xml b/res/xml/searchable_public_keys.xml index f8963e997..6bb934fec 100644 --- a/res/xml/searchable_public_keys.xml +++ b/res/xml/searchable_public_keys.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + <searchable xmlns:android="http://schemas.android.com/apk/res/android" android:label="@string/app_name" diff --git a/res/xml/searchable_secret_keys.xml b/res/xml/searchable_secret_keys.xml index 43328df82..e196b4664 100644 --- a/res/xml/searchable_secret_keys.xml +++ b/res/xml/searchable_secret_keys.xml @@ -1,4 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + <searchable xmlns:android="http://schemas.android.com/apk/res/android" android:label="@string/app_name" |