From 782186f5b1fc40f60e8da73f219c7cda6a58b8d6 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Mon, 10 Jun 2013 14:21:24 +0200 Subject: [PATCH] Removed 'download' and 'open with' options from contextual menu in list of files --- .../owncloud/android/ui/fragment/OCFileListFragment.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index 996efccd..35b37749 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -187,26 +187,25 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName } else { // contextual menu for regular files + + // new design: 'download' and 'open with' won't be available anymore in context menu + toHide.add(R.id.action_download_file); + toHide.add(R.id.action_open_file_with); + if (targetFile.isDown()) { toHide.add(R.id.action_cancel_download); toHide.add(R.id.action_cancel_upload); - toHide.add(R.id.action_download_file); } else { - toHide.add(R.id.action_open_file_with); toHide.add(R.id.action_sync_file); } if ( mContainerActivity.getFileDownloaderBinder().isDownloading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) { - toHide.add(R.id.action_download_file); toHide.add(R.id.action_cancel_upload); - toDisable.add(R.id.action_open_file_with); toDisable.add(R.id.action_rename_file); toDisable.add(R.id.action_remove_file); } else if ( mContainerActivity.getFileUploaderBinder().isUploading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) { - toHide.add(R.id.action_download_file); toHide.add(R.id.action_cancel_download); - toDisable.add(R.id.action_open_file_with); toDisable.add(R.id.action_rename_file); toDisable.add(R.id.action_remove_file); @@ -271,11 +270,6 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName confDialog.show(getFragmentManager(), FileDetailFragment.FTAG_CONFIRMATION); return true; } - case R.id.action_open_file_with: { - mContainerActivity.openFile(mTargetFile); - return true; - } - case R.id.action_download_file: case R.id.action_sync_file: { Account account = AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity()); RemoteOperation operation = new SynchronizeFileOperation(mTargetFile, null, mContainerActivity.getStorageManager(), account, true, false, getSherlockActivity()); -- 2.11.0