diff options
Diffstat (limited to 'OpenKeychain')
3 files changed, 13 insertions, 17 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java index 879e3f6da..07462b4ff 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java @@ -62,12 +62,9 @@ public class DeleteFileDialogFragment extends DialogFragment { CustomAlertDialogBuilder alert = new CustomAlertDialogBuilder(activity); - - alert.setIcon(R.drawable.ic_dialog_alert_holo_light); - alert.setTitle(R.string.warning); alert.setMessage(this.getString(R.string.file_delete_confirmation, deleteFilename)); - alert.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { + alert.setPositiveButton(R.string.btn_delete, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java index 802f0c11b..32789d53b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java @@ -83,8 +83,6 @@ public class DeleteKeyDialogFragment extends DialogFragment { mMainMessage = (TextView) mInflateView.findViewById(R.id.mainMessage); - builder.setTitle(R.string.warning); - final boolean hasSecret; // If only a single key has been selected @@ -110,12 +108,14 @@ public class DeleteKeyDialogFragment extends DialogFragment { } hasSecret = ((Long) data.get(KeyRings.HAS_ANY_SECRET)) == 1; - // Set message depending on which key it is. - mMainMessage.setText(getString( - hasSecret ? R.string.secret_key_deletion_confirmation - : R.string.public_key_deletetion_confirmation, - name - )); + if (hasSecret) { + // show title only for secret key deletions, + // see http://www.google.com/design/spec/components/dialogs.html#dialogs-behavior + builder.setTitle(getString(R.string.title_delete_secret_key, name)); + mMainMessage.setText(getString(R.string.secret_key_deletion_confirmation, name)); + } else { + mMainMessage.setText(getString(R.string.public_key_deletetion_confirmation, name)); + } } catch (ProviderHelper.NotFoundException e) { dismiss(); return null; @@ -125,7 +125,6 @@ public class DeleteKeyDialogFragment extends DialogFragment { hasSecret = false; } - builder.setIcon(R.drawable.ic_dialog_alert_holo_light); builder.setPositiveButton(R.string.btn_delete, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 29b955bb4..51574ded8 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -42,6 +42,7 @@ <string name="title_exchange_keys">"Exchange Keys"</string> <string name="title_advanced_key_info">"Advanced Key Info"</string> <string name="title_keys">"Keys"</string> + <string name="title_delete_secret_key">"Delete YOUR key \'%s\'?"</string> <!-- section --> <string name="section_user_ids">"Identities"</string> @@ -203,7 +204,6 @@ <string name="ecdh">"ECDH"</string> <string name="ecdsa">"ECDSA"</string> <string name="filemanager_title_open">"Open…"</string> - <string name="warning">"Warning"</string> <string name="error">"Error"</string> <string name="error_message">"Error: %s"</string> @@ -233,9 +233,9 @@ <string name="specify_file_to_encrypt_to">"Please specify which file to encrypt to.\nWARNING: File will be overwritten if it exists."</string> <string name="specify_file_to_decrypt_to">"Please specify which file to decrypt to.\nWARNING: File will be overwritten if it exists."</string> <string name="specify_file_to_export_to">"Please specify which file to export to.\nWARNING: File will be overwritten if it exists."</string> - <string name="key_deletion_confirmation_multi">"Do you really want to delete all selected public keys?\nYou can't undo this!"</string> - <string name="secret_key_deletion_confirmation">"Do you really want to delete the SECRET key '%s'?\nYou can't undo this!"</string> - <string name="public_key_deletetion_confirmation">"Do you really want to delete the public key '%s'?\nYou can't undo this!"</string> + <string name="key_deletion_confirmation_multi">"Do you really want to delete all selected keys?"</string> + <string name="secret_key_deletion_confirmation">"After deletion you will not be able to read messages encrypted with this key and loose all key verifications related to it!\nDo you really want to delete YOUR key '%s'?"</string> + <string name="public_key_deletetion_confirmation">"Delete key '%s'?"</string> <string name="also_export_secret_keys">"Also export secret keys"</string> <string name="reinstall_openkeychain">"You encountered a known bug with Android. Please reinstall OpenKeychain if you want to link your contacts with keys."</string> |