From: David A. Velasco Date: Mon, 10 Jun 2013 12:21:24 +0000 (+0200) Subject: Removed 'download' and 'open with' options from contextual menu in list of files X-Git-Tag: oc-android-1.4.3~21^2~1 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/782186f5b1fc40f60e8da73f219c7cda6a58b8d6?ds=inline;hp=--cc Removed 'download' and 'open with' options from contextual menu in list of files --- 782186f5b1fc40f60e8da73f219c7cda6a58b8d6 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());