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) {
|
protected void valueChanged(boolean oldValue, boolean newValue) {
|
||||||
if (button.getGrayed())
|
// TODO: uncomment before M5
|
||||||
button.setGrayed(false);
|
//if (button.getGrayed())
|
||||||
|
// button.setGrayed(false);
|
||||||
super.valueChanged(!newValue, newValue);
|
super.valueChanged(!newValue, newValue);
|
||||||
}
|
}
|
||||||
protected void doLoad() {
|
protected void doLoad() {
|
||||||
|
@ -653,7 +654,8 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
if (vals[0] > 0)
|
if (vals[0] > 0)
|
||||||
gray = true;
|
gray = true;
|
||||||
}
|
}
|
||||||
button.setGrayed(gray);
|
// TODO: uncomment before M5
|
||||||
|
// button.setGrayed(gray);
|
||||||
button.setSelection(value);
|
button.setSelection(value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,16 +130,23 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
|
|
||||||
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
||||||
if (extStates == null) { // no extended states available
|
if (extStates == null) { // no extended states available
|
||||||
b_genMakefileAuto.setGrayed(false);
|
BuildBehaviourTab.setTriSelection(b_genMakefileAuto,
|
||||||
b_genMakefileAuto.setSelection(bldr.isManagedBuildOn());
|
bldr.isManagedBuildOn() ?
|
||||||
b_useDefault.setGrayed(false);
|
BuildBehaviourTab.TRI_YES :
|
||||||
b_useDefault.setSelection(bldr.isDefaultBuildCmd());
|
BuildBehaviourTab.TRI_NO);
|
||||||
b_expandVars.setGrayed(false);
|
BuildBehaviourTab.setTriSelection(b_useDefault,
|
||||||
|
bldr.isDefaultBuildCmd() ?
|
||||||
|
BuildBehaviourTab.TRI_YES :
|
||||||
|
BuildBehaviourTab.TRI_NO);
|
||||||
|
// b_expandVars.setGrayed(false);
|
||||||
if(!bldr.canKeepEnvironmentVariablesInBuildfile())
|
if(!bldr.canKeepEnvironmentVariablesInBuildfile())
|
||||||
b_expandVars.setEnabled(false);
|
b_expandVars.setEnabled(false);
|
||||||
else {
|
else {
|
||||||
b_expandVars.setEnabled(true);
|
b_expandVars.setEnabled(true);
|
||||||
b_expandVars.setSelection(!bldr.keepEnvironmentVariablesInBuildfile());
|
BuildBehaviourTab.setTriSelection(b_expandVars,
|
||||||
|
!bldr.keepEnvironmentVariablesInBuildfile() ?
|
||||||
|
BuildBehaviourTab.TRI_YES :
|
||||||
|
BuildBehaviourTab.TRI_NO);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BuildBehaviourTab.setTriSelection(b_genMakefileAuto, extStates[0]);
|
BuildBehaviourTab.setTriSelection(b_genMakefileAuto, extStates[0]);
|
||||||
|
|
|
@ -322,7 +322,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
setupControl(b, span, mode);
|
setupControl(b, span, mode);
|
||||||
b.addSelectionListener(new SelectionAdapter() {
|
b.addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent event) {
|
public void widgetSelected(SelectionEvent event) {
|
||||||
((Button)event.widget).setGrayed(false);
|
// TODO: uncomment before M5
|
||||||
|
//((Button)event.widget).setGrayed(false);
|
||||||
checkPressed(event);
|
checkPressed(event);
|
||||||
}});
|
}});
|
||||||
return b;
|
return b;
|
||||||
|
@ -534,17 +535,18 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
*/
|
*/
|
||||||
public static void setTriSelection(Button b, int state) {
|
public static void setTriSelection(Button b, int state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
// TODO: uncomment before M5
|
||||||
case TRI_NO:
|
case TRI_NO:
|
||||||
b.setGrayed(false);
|
// b.setGrayed(false);
|
||||||
b.setSelection(false);
|
b.setSelection(false);
|
||||||
break;
|
break;
|
||||||
case TRI_YES:
|
case TRI_YES:
|
||||||
b.setGrayed(false);
|
// b.setGrayed(false);
|
||||||
b.setSelection(true);
|
b.setSelection(true);
|
||||||
break;
|
break;
|
||||||
case TRI_UNKNOWN:
|
case TRI_UNKNOWN:
|
||||||
b.setSelection(true);
|
b.setSelection(true);
|
||||||
b.setGrayed(true);
|
// b.setGrayed(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue