+ case R.id.action_sync_account: {
+ startSynchronization();
+ break;
+ }
+ case R.id.action_upload: {
+ showDialog(DIALOG_CHOOSE_UPLOAD_SOURCE);
+ break;
+ }
+ case R.id.action_settings: {
+ Intent settingsIntent = new Intent(this, Preferences.class);
+ startActivity(settingsIntent);
+ break;
+ }
+ case R.id.action_logger: {
+ Intent loggerIntent = new Intent(getApplicationContext(), LogHistoryActivity.class);
+ startActivity(loggerIntent);
+ break;
+ }
+ case android.R.id.home: {
+ FileFragment second = getSecondFragment();
+ OCFile currentDir = getCurrentDir();
+ if ((currentDir != null && currentDir.getParentId() != 0) ||
+ (second != null && second.getFile() != null)) {
+ onBackPressed();
+
+ }
+ break;
+ }
+ default:
+ retval = super.onOptionsItemSelected(item);