only show sourceCodeManager items, if its present
authorClaus Gittinger <cg@exept.de>
Sat, 07 Sep 1996 14:42:13 +0200
changeset 711 748349e59632
parent 710 fbf71e0089eb
child 712 72dd9d6a9ea3
only show sourceCodeManager items, if its present
Launcher.st
--- a/Launcher.st	Sat Sep 07 14:38:28 1996 +0200
+++ b/Launcher.st	Sat Sep 07 14:42:13 1996 +0200
@@ -1583,7 +1583,8 @@
 
 miscSettings
     |box check logDoits shadows updChanges changeFileName returnFocus
-     loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
+     loadBinaries compileLazy hostNameInLabel useManager hasManager 
+     localSourceFirst 
      showAccelerators sourceCacheDir cacheEntry
      component localCheck oldIndent nm fn|
 
@@ -1596,8 +1597,17 @@
     returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue.
     updChanges := Class updatingChanges asValue.
     changeFileName := ObjectMemory nameForChanges asValue.
-    useManager := (Smalltalk at:#SourceCodeManager) notNil asValue.
-    localSourceFirst := Class tryLocalSourceFirst asValue.
+
+    hasManager := AbstractSourceCodeManager notNil
+                  and:[AbstractSourceCodeManager isLoaded].
+
+    hasManager ifTrue:[
+        useManager := (Smalltalk at:#SourceCodeManager) notNil asValue.
+        localSourceFirst := Class tryLocalSourceFirst asValue.
+    ] ifFalse:[
+        useManager := false.
+        localSourceFirst := false
+    ].
     showAccelerators := MenuView showAcceleratorKeys asValue.
     sourceCacheDir := nil asValue.
 
@@ -1637,30 +1647,32 @@
         check disable
     ].
 
-    check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
-    oldIndent := box leftIndent.
-    box leftIndent:30.
-    localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
-    localCheck enableChannel:useManager.
-
-    cacheEntry := box 
-                    addLabelledInputField:(resources string:'source cache dir:')
-                    adjust:#right
-                    on:sourceCacheDir 
-                    tabable:true
-                    separateAtX:0.4.
-    cacheEntry immediateAccept:true; acceptOnLeave:false.
-    box leftIndent:oldIndent.
-    cacheEntry enableChannel:useManager.
-
-    (AbstractSourceCodeManager isNil 
-    or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
-        useManager value:false.
-        cacheEntry disable.
-        check disable.
-        localCheck enable.
-    ] ifFalse:[
-        sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+    hasManager ifTrue:[
+        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
+        oldIndent := box leftIndent.
+        box leftIndent:30.
+        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
+        localCheck enableChannel:useManager.
+
+        cacheEntry := box 
+                        addLabelledInputField:(resources string:'source cache dir:')
+                        adjust:#right
+                        on:sourceCacheDir 
+                        tabable:true
+                        separateAtX:0.4.
+        cacheEntry immediateAccept:true; acceptOnLeave:false.
+        box leftIndent:oldIndent.
+        cacheEntry enableChannel:useManager.
+
+        (AbstractSourceCodeManager isNil 
+        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
+            useManager value:false.
+            cacheEntry disable.
+            check disable.
+            localCheck enable.
+        ] ifFalse:[
+            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+        ].
     ].
 
     box addHorizontalLine.
@@ -1694,7 +1706,7 @@
         Dialog returnFocusWhenClosingModalBoxes:returnFocus value.
         MenuView showAcceleratorKeys:showAccelerators value.
 
-        useManager value ifTrue:[
+        (hasManager and:[useManager value]) ifTrue:[
             (Smalltalk at:#SourceCodeManager) isNil ifTrue:[
                 Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager)
             ].
@@ -1720,7 +1732,7 @@
     ].
     box destroy
 
-    "Modified: 29.5.1996 / 18:37:26 / cg"
+    "Modified: 7.9.1996 / 14:21:35 / cg"
 !
 
 printerSettings
@@ -3380,5 +3392,5 @@
 !NewLauncher  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.184 1996-09-07 11:34:33 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.185 1996-09-07 12:42:13 cg Exp $'
 ! !