Hide syntax highlighting checkbox in unified view
We force it disabled, to ensure the add/remove colors come through. Don't show the checkbox for the user to try twiddling. Change-Id: Ia8f96bcce1c31acd147ec77520d69ac9d4839e2b Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -45,6 +45,7 @@ import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
|||||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||||
import com.google.gwt.event.shared.HandlerRegistration;
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
|
import com.google.gwt.user.client.DOM;
|
||||||
import com.google.gwt.user.client.DeferredCommand;
|
import com.google.gwt.user.client.DeferredCommand;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.DisclosurePanel;
|
import com.google.gwt.user.client.ui.DisclosurePanel;
|
||||||
@@ -84,6 +85,9 @@ public abstract class PatchScreen extends Screen {
|
|||||||
public Unified(final Patch.Key id, final int patchIndex,
|
public Unified(final Patch.Key id, final int patchIndex,
|
||||||
final PatchTable patchTable) {
|
final PatchTable patchTable) {
|
||||||
super(id, patchIndex, patchTable);
|
super(id, patchIndex, patchTable);
|
||||||
|
DOM.setStyleAttribute(settingsPanel.getSyntaxHighlightingCheckBox()
|
||||||
|
.getElement(), "visibility", "hidden");
|
||||||
|
|
||||||
final PatchScriptSettings s = settingsPanel.getValue();
|
final PatchScriptSettings s = settingsPanel.getValue();
|
||||||
s.getPrettySettings().setSyntaxHighlighting(false);
|
s.getPrettySettings().setSyntaxHighlighting(false);
|
||||||
settingsPanel.setValue(s);
|
settingsPanel.setValue(s);
|
||||||
|
|||||||
@@ -128,6 +128,10 @@ public class PatchScriptSettingsPanel extends Composite implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CheckBox getSyntaxHighlightingCheckBox() {
|
||||||
|
return syntaxHighlighting;
|
||||||
|
}
|
||||||
|
|
||||||
public CheckBox getReviewedCheckBox() {
|
public CheckBox getReviewedCheckBox() {
|
||||||
return reviewed;
|
return reviewed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user