mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Temporary disabled Button.setGrayed/getGrayed
This commit is contained in:
parent
790670050d
commit
93b72e6097
3 changed files with 24 additions and 13 deletions
|
@ -627,8 +627,9 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
|
||||
}
|
||||
protected void valueChanged(boolean oldValue, boolean newValue) {
|
||||
if (button.getGrayed())
|
||||
button.setGrayed(false);
|
||||
// TODO: uncomment before M5
|
||||
//if (button.getGrayed())
|
||||
// button.setGrayed(false);
|
||||
super.valueChanged(!newValue, newValue);
|
||||
}
|
||||
protected void doLoad() {
|
||||
|
@ -653,7 +654,8 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
if (vals[0] > 0)
|
||||
gray = true;
|
||||
}
|
||||
button.setGrayed(gray);
|
||||
// TODO: uncomment before M5
|
||||
// button.setGrayed(gray);
|
||||
button.setSelection(value);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -130,16 +130,23 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
|
||||
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
||||
if (extStates == null) { // no extended states available
|
||||
b_genMakefileAuto.setGrayed(false);
|
||||
b_genMakefileAuto.setSelection(bldr.isManagedBuildOn());
|
||||
b_useDefault.setGrayed(false);
|
||||
b_useDefault.setSelection(bldr.isDefaultBuildCmd());
|
||||
b_expandVars.setGrayed(false);
|
||||
BuildBehaviourTab.setTriSelection(b_genMakefileAuto,
|
||||
bldr.isManagedBuildOn() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
BuildBehaviourTab.setTriSelection(b_useDefault,
|
||||
bldr.isDefaultBuildCmd() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
// b_expandVars.setGrayed(false);
|
||||
if(!bldr.canKeepEnvironmentVariablesInBuildfile())
|
||||
b_expandVars.setEnabled(false);
|
||||
else {
|
||||
b_expandVars.setEnabled(true);
|
||||
b_expandVars.setSelection(!bldr.keepEnvironmentVariablesInBuildfile());
|
||||
BuildBehaviourTab.setTriSelection(b_expandVars,
|
||||
!bldr.keepEnvironmentVariablesInBuildfile() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
}
|
||||
} else {
|
||||
BuildBehaviourTab.setTriSelection(b_genMakefileAuto, extStates[0]);
|
||||
|
|
|
@ -322,7 +322,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
setupControl(b, span, mode);
|
||||
b.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
((Button)event.widget).setGrayed(false);
|
||||
// TODO: uncomment before M5
|
||||
//((Button)event.widget).setGrayed(false);
|
||||
checkPressed(event);
|
||||
}});
|
||||
return b;
|
||||
|
@ -534,17 +535,18 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
*/
|
||||
public static void setTriSelection(Button b, int state) {
|
||||
switch (state) {
|
||||
// TODO: uncomment before M5
|
||||
case TRI_NO:
|
||||
b.setGrayed(false);
|
||||
// b.setGrayed(false);
|
||||
b.setSelection(false);
|
||||
break;
|
||||
case TRI_YES:
|
||||
b.setGrayed(false);
|
||||
// b.setGrayed(false);
|
||||
b.setSelection(true);
|
||||
break;
|
||||
case TRI_UNKNOWN:
|
||||
b.setSelection(true);
|
||||
b.setGrayed(true);
|
||||
// b.setGrayed(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue