diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-20 22:29:18 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-20 22:29:18 +0200 |
commit | 675df57abdbf12fc12a5ef06bd727959680bfe38 (patch) | |
tree | 072c49d2f3e7f8a0a5dba17266e8e23e4badbe43 /OpenKeychain/src/main/java/org | |
parent | 2e8ae577b5357b388c7055946950cf90e206145c (diff) | |
download | open-keychain-675df57abdbf12fc12a5ef06bd727959680bfe38.tar.gz open-keychain-675df57abdbf12fc12a5ef06bd727959680bfe38.tar.bz2 open-keychain-675df57abdbf12fc12a5ef06bd727959680bfe38.zip |
don't show "delete original file" for non-file input uris
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java index dfe2d07aa..0c18835fd 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java @@ -446,11 +446,6 @@ public class DecryptListFragment } @Override - public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { - super.onCreateContextMenu(menu, v, menuInfo); - } - - @Override public boolean onMenuItemClick(MenuItem menuItem) { if (mAdapter.mMenuClickedModel == null || !mAdapter.mMenuClickedModel.hasResult()) { return false; @@ -589,7 +584,7 @@ public class DecryptListFragment KeyFormattingUtils.setStatus(mContext, holder, model.mResult); - OpenPgpMetadata metadata = model.mResult.getDecryptMetadata(); + final OpenPgpMetadata metadata = model.mResult.getDecryptMetadata(); String filename; if (metadata == null) { @@ -626,6 +621,9 @@ public class DecryptListFragment mMenuClickedModel = model; PopupMenu menu = new PopupMenu(mContext, view); menu.inflate(R.menu.decrypt_item_context_menu); + if (!"file".equals(model.mInputUri.getScheme())) { + menu.getMenu().findItem(R.id.decrypt_delete).setVisible(false); + } menu.setOnMenuItemClickListener(mMenuItemClickListener); menu.setOnDismissListener(new OnDismissListener() { @Override |