mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-08 02:50:12 -05:00
disable export if unsaved
This commit is contained in:
parent
cd2b493ea8
commit
b74ed46434
@ -332,8 +332,12 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
cancelClicked();
|
cancelClicked();
|
||||||
return true;
|
return true;
|
||||||
case R.id.menu_key_edit_export_file:
|
case R.id.menu_key_edit_export_file:
|
||||||
|
if (needsSaving()) {
|
||||||
|
Toast.makeText(this, R.string.error_save_first, Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
mExportHelper.showExportKeysDialog(mDataUri, Id.type.secret_key, Constants.path.APP_DIR
|
mExportHelper.showExportKeysDialog(mDataUri, Id.type.secret_key, Constants.path.APP_DIR
|
||||||
+ "/secexport.asc");
|
+ "/secexport.asc");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case R.id.menu_key_edit_delete: {
|
case R.id.menu_key_edit_delete: {
|
||||||
// Message is received after key is deleted
|
// Message is received after key is deleted
|
||||||
|
@ -286,6 +286,7 @@
|
|||||||
<string name="error_nfc_needed">NFC is not available on your device!</string>
|
<string name="error_nfc_needed">NFC is not available on your device!</string>
|
||||||
<string name="error_nothing_import">Nothing to import!</string>
|
<string name="error_nothing_import">Nothing to import!</string>
|
||||||
<string name="error_expiry_must_come_after_creation">expiry date must come after creation date</string>
|
<string name="error_expiry_must_come_after_creation">expiry date must come after creation date</string>
|
||||||
|
<string name="error_save_first">please save the keyring first</string>
|
||||||
|
|
||||||
<!-- progress dialogs, usually ending in '…' -->
|
<!-- progress dialogs, usually ending in '…' -->
|
||||||
<string name="progress_done">done.</string>
|
<string name="progress_done">done.</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user