|
@@ -187,26 +187,25 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// contextual menu for regular files
|
|
// 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()) {
|
|
if (targetFile.isDown()) {
|
|
toHide.add(R.id.action_cancel_download);
|
|
toHide.add(R.id.action_cancel_download);
|
|
toHide.add(R.id.action_cancel_upload);
|
|
toHide.add(R.id.action_cancel_upload);
|
|
- toHide.add(R.id.action_download_file);
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- toHide.add(R.id.action_open_file_with);
|
|
|
|
toHide.add(R.id.action_sync_file);
|
|
toHide.add(R.id.action_sync_file);
|
|
}
|
|
}
|
|
if ( mContainerActivity.getFileDownloaderBinder().isDownloading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) {
|
|
if ( mContainerActivity.getFileDownloaderBinder().isDownloading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) {
|
|
- toHide.add(R.id.action_download_file);
|
|
|
|
toHide.add(R.id.action_cancel_upload);
|
|
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_rename_file);
|
|
toDisable.add(R.id.action_remove_file);
|
|
toDisable.add(R.id.action_remove_file);
|
|
|
|
|
|
} else if ( mContainerActivity.getFileUploaderBinder().isUploading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) {
|
|
} else if ( mContainerActivity.getFileUploaderBinder().isUploading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)) {
|
|
- toHide.add(R.id.action_download_file);
|
|
|
|
toHide.add(R.id.action_cancel_download);
|
|
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_rename_file);
|
|
toDisable.add(R.id.action_remove_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);
|
|
confDialog.show(getFragmentManager(), FileDetailFragment.FTAG_CONFIRMATION);
|
|
return true;
|
|
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: {
|
|
case R.id.action_sync_file: {
|
|
Account account = AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity());
|
|
Account account = AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity());
|
|
RemoteOperation operation = new SynchronizeFileOperation(mTargetFile, null, mContainerActivity.getStorageManager(), account, true, false, getSherlockActivity());
|
|
RemoteOperation operation = new SynchronizeFileOperation(mTargetFile, null, mContainerActivity.getStorageManager(), account, true, false, getSherlockActivity());
|