|
@@ -24,6 +24,7 @@ import android.app.Activity;
|
|
|
import android.app.Dialog;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
+import android.graphics.Color;
|
|
|
import android.graphics.Typeface;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
@@ -298,6 +299,12 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment {
|
|
|
}
|
|
|
|
|
|
private void checkWritableFolder() {
|
|
|
+ if (!mSyncedFolder.isEnabled()) {
|
|
|
+ mView.findViewById(R.id.setting_instant_behaviour_container).setEnabled(false);
|
|
|
+ mView.findViewById(R.id.setting_instant_behaviour_container).setAlpha(alphaDisabled);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (mSyncedFolder.getLocalPath() != null && new File(mSyncedFolder.getLocalPath()).canWrite()) {
|
|
|
mView.findViewById(R.id.setting_instant_behaviour_container).setEnabled(true);
|
|
|
mView.findViewById(R.id.setting_instant_behaviour_container).setAlpha(alphaEnabled);
|
|
@@ -340,6 +347,22 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment {
|
|
|
view.findViewById(R.id.local_folder_container).setEnabled(enable);
|
|
|
view.findViewById(R.id.local_folder_container).setAlpha(alpha);
|
|
|
|
|
|
+ view.findViewById(R.id.setting_instant_name_collision_policy_container).setEnabled(enable);
|
|
|
+ view.findViewById(R.id.setting_instant_name_collision_policy_container).setAlpha(alpha);
|
|
|
+
|
|
|
+ if (enable) {
|
|
|
+ int accentColor = ThemeUtils.primaryAccentColor(getContext());
|
|
|
+ ThemeUtils.tintCheckbox(mUploadOnWifiCheckbox, accentColor);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadOnChargingCheckbox, accentColor);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadExistingCheckbox, accentColor);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadUseSubfoldersCheckbox, accentColor);
|
|
|
+ } else {
|
|
|
+ ThemeUtils.tintCheckbox(mUploadOnWifiCheckbox, Color.GRAY);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadOnChargingCheckbox, Color.GRAY);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadExistingCheckbox, Color.GRAY);
|
|
|
+ ThemeUtils.tintCheckbox(mUploadUseSubfoldersCheckbox, Color.GRAY);
|
|
|
+ }
|
|
|
+
|
|
|
checkWritableFolder();
|
|
|
}
|
|
|
|