SettingsDialog.st
changeset 7613 7b59de1f0350
parent 7609 f9ed6dd88645
child 7719 5ecbb0ae6799
equal deleted inserted replaced
7612:42b1c57c6cc7 7613:7b59de1f0350
  1069     self enableOK value:(changedObject value).
  1069     self enableOK value:(changedObject value).
  1070     self enableReload value:(changedObject value).
  1070     self enableReload value:(changedObject value).
  1071 !
  1071 !
  1072 
  1072 
  1073 selectionChanged
  1073 selectionChanged
  1074     | item oldAppl noApp lbl window app itemLabel|
  1074     |item oldAppl noApp lbl window app itemLabel|
  1075 
  1075 
  1076     self selectedItem value == lastSelection  ifTrue:[ ^ self].
  1076     self selectedItem value == lastSelection  ifTrue:[ ^ self].
  1077 
  1077 
  1078     oldAppl := self subCanvasApplicationHolder value.
  1078     oldAppl := self subCanvasApplicationHolder value.
  1079     oldAppl notNil ifTrue:[
  1079     oldAppl notNil ifTrue:[
  1108             ]
  1108             ]
  1109         ].
  1109         ].
  1110         window label:lbl.
  1110         window label:lbl.
  1111     ].
  1111     ].
  1112 
  1112 
  1113     builder notNil ifTrue:[
  1113     builder notNil ifTrue:[ |box|
  1114         (builder componentAt:#DisabledSettingsBox) beInvisible.
  1114         "hide the DisabledSettingsBox"
  1115         (builder componentAt:#DisabledSettingsBox) lower.
  1115         box := builder componentAt:#DisabledSettingsBox.
       
  1116         box notNil ifTrue:[
       
  1117             box beInvisible; lower.
       
  1118         ].
  1116     ].
  1119     ].
  1117 
  1120 
  1118     noApp ifTrue:[
  1121     noApp ifTrue:[
  1119         self subCanvasApplicationHolder value:nil.
  1122         self subCanvasApplicationHolder value:nil.
  1120         ^ self
  1123         ^ self
  1122 
  1125 
  1123     app := item application.
  1126     app := item application.
  1124     app isNil ifTrue:[
  1127     app isNil ifTrue:[
  1125         app := item applicationClass basicNew.
  1128         app := item applicationClass basicNew.
  1126         (app isEnabledInSettingsDialog:self) ifFalse:[
  1129         (app isEnabledInSettingsDialog:self) ifFalse:[
       
  1130             "raise the DisabledSettingsBox above the settings window"
  1127             self whyDisabledInfoHolder value:('These Settings are currently disabled, because\',app whyDisabledInSettingsDialogInfo) withCRs.
  1131             self whyDisabledInfoHolder value:('These Settings are currently disabled, because\',app whyDisabledInSettingsDialogInfo) withCRs.
  1128             builder notNil ifTrue:[
  1132             builder notNil ifTrue:[ |box|
  1129                 (builder componentAt:#DisabledSettingsBox) beVisible.
  1133                 box := builder componentAt:#DisabledSettingsBox.
  1130                 (builder componentAt:#DisabledSettingsBox) raise.
  1134                 box notNil ifTrue:[
       
  1135                     box beVisible; raise.
       
  1136                 ].
  1131             ].
  1137             ].
  1132             self subCanvasApplicationHolder value:nil.
  1138             self subCanvasApplicationHolder value:nil.
  1133             ^ self
  1139             ^ self
  1134         ].
  1140         ].
  1135 
  1141 
  1326 ! !
  1332 ! !
  1327 
  1333 
  1328 !SettingsDialog class methodsFor:'documentation'!
  1334 !SettingsDialog class methodsFor:'documentation'!
  1329 
  1335 
  1330 version
  1336 version
  1331     ^ '$Header: /cvs/stx/stx/libtool/SettingsDialog.st,v 1.70 2007-01-25 17:10:10 cg Exp $'
  1337     ^ '$Header: /cvs/stx/stx/libtool/SettingsDialog.st,v 1.71 2007-01-30 14:06:14 stefan Exp $'
  1332 ! !
  1338 ! !
  1333 
  1339 
  1334 SettingsDialog initialize!
  1340 SettingsDialog initialize!