mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-23 23:48:51 -05:00
change the text of encrypt buttons according to selected signature or keys, making sign-only less confusing
Update issue 39 New strings to give the encrypt buttons more meaningful and fitting texts: <string name="btn_signToClipboard">Sign To Clipboard</string> <string name="btn_signAndEmail">Sign And Email</string> <string name="btn_sign">Sign</string>
This commit is contained in:
parent
f65888046e
commit
46fb6fc613
@ -48,7 +48,7 @@
|
||||
|
||||
<!-- btn_lowerCase: capitalized words, no punctuation -->
|
||||
<string name="btn_encryptToClipboard">Kryptér Til Clipboard</string>
|
||||
<string name="btn_send">Kryptér Og Mail</string>
|
||||
<string name="btn_encryptAndEmail">Kryptér Og Mail</string>
|
||||
<string name="btn_encrypt">Kryptér</string>
|
||||
<string name="btn_decrypt">Afkryptér</string>
|
||||
<string name="btn_verify">Bekræft</string>
|
||||
|
@ -51,7 +51,7 @@
|
||||
<!-- btn_lowerCase: capitalized words, no punctuation -->
|
||||
|
||||
<string name="btn_encryptToClipboard">In die Zwischenablage verschlüsseln</string>
|
||||
<string name="btn_send">Verschlüsseln und per Mail senden</string>
|
||||
<string name="btn_encryptAndEmail">Verschlüsseln und per Mail senden</string>
|
||||
<string name="btn_encrypt">Verschlüsseln</string>
|
||||
<string name="btn_decrypt">Entschlüsseln</string>
|
||||
<string name="btn_verify">Verifizieren</string>
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<!-- btn_lowerCase: capitalized words, no punctuation -->
|
||||
<string name="btn_encryptToClipboard">Critta su Clipboard</string>
|
||||
<string name="btn_send">Critta ed invia per mail</string>
|
||||
<string name="btn_encryptAndEmail">Critta ed invia per mail</string>
|
||||
<string name="btn_encrypt">Critta</string>
|
||||
<string name="btn_decrypt">Decritta</string>
|
||||
<string name="btn_verify">Verifica</string>
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<!-- btn_lowerCase: capitalized words, no punctuation -->
|
||||
<string name="btn_encryptToClipboard">Šifriraj v odložišče</string>
|
||||
<string name="btn_send">Šifriraj in pošlji</string>
|
||||
<string name="btn_encryptAndEmail">Šifriraj in pošlji</string>
|
||||
<string name="btn_encrypt">Šifriraj</string>
|
||||
<string name="btn_decrypt">Dešifriraj</string>
|
||||
<string name="btn_verify">Overi</string>
|
||||
|
@ -48,9 +48,12 @@
|
||||
<string name="section_defaults">Defaults</string>
|
||||
|
||||
<!-- btn_lowerCase: capitalized words, no punctuation -->
|
||||
<string name="btn_signToClipboard">Sign To Clipboard</string>
|
||||
<string name="btn_encryptToClipboard">Encrypt To Clipboard</string>
|
||||
<string name="btn_send">Encrypt And Email</string>
|
||||
<string name="btn_encryptAndEmail">Encrypt And Email</string>
|
||||
<string name="btn_signAndEmail">Sign And Email</string>
|
||||
<string name="btn_encrypt">Encrypt</string>
|
||||
<string name="btn_sign">Sign</string>
|
||||
<string name="btn_decrypt">Decrypt</string>
|
||||
<string name="btn_verify">Verify</string>
|
||||
<string name="btn_selectEncryptKeys">Select Recipients</string>
|
||||
|
@ -376,12 +376,10 @@ public class EncryptActivity extends BaseActivity {
|
||||
|
||||
mSourceLabel.setClickable(false);
|
||||
mSourceLabel.setEnabled(false);
|
||||
|
||||
mEncryptToClipboardButton.setEnabled(false);
|
||||
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
}
|
||||
|
||||
updateButtons();
|
||||
|
||||
if (mReturnResult &&
|
||||
mMessage.getText().length() > 0 &&
|
||||
((mEncryptionKeyIds != null &&
|
||||
@ -419,17 +417,77 @@ public class EncryptActivity extends BaseActivity {
|
||||
switch (mSource.getCurrentView().getId()) {
|
||||
case R.id.sourceFile: {
|
||||
mSourceLabel.setText(R.string.label_file);
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
mEncryptToClipboardButton.setEnabled(false);
|
||||
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
|
||||
break;
|
||||
}
|
||||
|
||||
case R.id.sourceMessage: {
|
||||
mSourceLabel.setText(R.string.label_message);
|
||||
mEncryptButton.setText(R.string.btn_send);
|
||||
mEncryptToClipboardButton.setEnabled(true);
|
||||
mEncryptToClipboardButton.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
private void updateButtons() {
|
||||
switch (mSource.getCurrentView().getId()) {
|
||||
case R.id.sourceFile: {
|
||||
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
break;
|
||||
}
|
||||
|
||||
case R.id.sourceMessage: {
|
||||
mSourceLabel.setText(R.string.label_message);
|
||||
if (mReturnResult) {
|
||||
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
mEncryptToClipboardButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
|
||||
if (mReturnResult) {
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
} else {
|
||||
mEncryptButton.setText(R.string.btn_encryptAndEmail);
|
||||
}
|
||||
mEncryptButton.setEnabled(true);
|
||||
mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard);
|
||||
mEncryptToClipboardButton.setEnabled(true);
|
||||
} else {
|
||||
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
|
||||
if (getSecretKeyId() == 0) {
|
||||
if (mReturnResult) {
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
} else {
|
||||
mEncryptButton.setText(R.string.btn_encryptAndEmail);
|
||||
}
|
||||
mEncryptButton.setEnabled(false);
|
||||
mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard);
|
||||
mEncryptToClipboardButton.setEnabled(false);
|
||||
} else {
|
||||
if (mReturnResult) {
|
||||
mEncryptButton.setText(R.string.btn_sign);
|
||||
} else {
|
||||
mEncryptButton.setText(R.string.btn_signAndEmail);
|
||||
}
|
||||
mEncryptButton.setEnabled(true);
|
||||
mEncryptToClipboardButton.setText(R.string.btn_signToClipboard);
|
||||
mEncryptToClipboardButton.setEnabled(true);
|
||||
}
|
||||
} else {
|
||||
if (mReturnResult) {
|
||||
mEncryptButton.setText(R.string.btn_encrypt);
|
||||
} else {
|
||||
mEncryptButton.setText(R.string.btn_encryptAndEmail);
|
||||
}
|
||||
mEncryptButton.setEnabled(true);
|
||||
mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard);
|
||||
mEncryptToClipboardButton.setEnabled(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -455,6 +513,7 @@ public class EncryptActivity extends BaseActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
private void encryptToClipboardClicked() {
|
||||
@ -679,6 +738,8 @@ public class EncryptActivity extends BaseActivity {
|
||||
mMainUserIdRest.setText(uidExtra);
|
||||
mSign.setChecked(true);
|
||||
}
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
private void selectPublicKeys() {
|
||||
|
Loading…
Reference in New Issue
Block a user