Launcher.st
changeset 304 49dc8c0e733e
parent 298 d1212fc486b9
child 319 a39350103cb2
--- a/Launcher.st	Fri Dec 15 13:13:22 1995 +0100
+++ b/Launcher.st	Fri Dec 15 14:33:31 1995 +0100
@@ -301,43 +301,43 @@
 
     moduleListUpdater := Plug new.
     moduleListUpdater 
-        respondTo:#getModules 
-        with:[
-            |l|
+	respondTo:#getModules 
+	with:[
+	    |l|
 
-            l := Array new.
-            (showModules value or:[showBuiltIn value]) ifTrue:[
-                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
-                (showBuiltIn value and:[showModules value]) ifFalse:[
-                    allModules := allModules select:[:i |
-                        |wantToSee|
+	    l := Array new.
+	    (showModules value or:[showBuiltIn value]) ifTrue:[
+		allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
+		(showBuiltIn value and:[showModules value]) ifFalse:[
+		    allModules := allModules select:[:i |
+			|wantToSee|
 
-                        wantToSee := (i at:#dynamic).
-                        showBuiltIn value ifTrue:[
-                            wantToSee := wantToSee not
-                        ].
-                        wantToSee
-                    ]
-                ].
-                "/ sorting by reverse id brings newest ones to the top (a side effect)
-                allModules sort:[:a :b | (a at:#id) > (b at:#id)].
-                moduleNames := allModules collect:[:entry | (entry at:#name)].
-                l := l , moduleNames.
-            ].
-            showMethods value ifTrue:[
-                allObjects := ObjectFileLoader loadedObjectHandles.
-                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
-                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
-                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
-                                                            ] ifFalse:[
-                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
-                                                            ].
-                                                     ].
-                l := l , methodNames.
-            ].
-            list1 list:l.
-            unloadButton disable.
-        ].
+			wantToSee := (i at:#dynamic).
+			showBuiltIn value ifTrue:[
+			    wantToSee := wantToSee not
+			].
+			wantToSee
+		    ]
+		].
+		"/ sorting by reverse id brings newest ones to the top (a side effect)
+		allModules sort:[:a :b | (a at:#id) > (b at:#id)].
+		moduleNames := allModules collect:[:entry | (entry at:#name)].
+		l := l , moduleNames.
+	    ].
+	    showMethods value ifTrue:[
+		allObjects := ObjectFileLoader loadedObjectHandles.
+		methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
+		methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
+								'compiled method - removed' , ' (in ' , mH pathName , ')'
+							    ] ifFalse:[
+								'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
+							    ].
+						     ].
+		l := l , methodNames.
+	    ].
+	    list1 list:l.
+	    unloadButton disable.
+	].
 
     list1 := SelectionInList new.
     list2 := SelectionInList new.
@@ -353,55 +353,55 @@
     listView1 model:list1.
     listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
     listView1 action:[:sel |
-        |info classNames tabs|
+	|info classNames tabs|
 
-        (showModules value or:[showBuiltIn value]) ifTrue:[
-            info := allModules at:sel ifAbsent:nil.
-        ].
-        info isNil ifTrue:[
-            "/ selected a method
-            list2 list:#().
-            unloadButton enable.
-        ] ifFalse:[
-            "/ selected a package
+	(showModules value or:[showBuiltIn value]) ifTrue:[
+	    info := allModules at:sel ifAbsent:nil.
+	].
+	info isNil ifTrue:[
+	    "/ selected a method
+	    list2 list:#().
+	    unloadButton enable.
+	] ifFalse:[
+	    "/ selected a package
 
-            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
+	    tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
 
-            "/ fill bottom list with class-info
+	    "/ fill bottom list with class-info
 
-            classNames := (info at:#classNames) asSortedCollection.
-            classNames := classNames collect:[:cName |
-                            |cls entry rev listEntry|
+	    classNames := (info at:#classNames) asSortedCollection.
+	    classNames := classNames collect:[:cName |
+			    |cls entry rev listEntry|
 
-                            listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
-                            listEntry colAt:1 put:cName.
+			    listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
+			    listEntry colAt:1 put:cName.
 
-                            cls := Smalltalk classNamed:cName.
-                            cls isNil ifTrue:[
-                                listEntry colAt:2 put:'(class removed)'.
-                            ] ifFalse:[
-                                rev := cls binaryRevision.
-                                rev notNil ifTrue:[
-                                    entry :='(bin: ' , rev.
-                                    cls revision ~= rev ifTrue:[
-                                        entry := entry , ' / src: ' , cls revision    
-                                    ].
-                                    listEntry colAt:2 put:entry , ')'
-                                ] ifFalse:[
-                                   cls revision notNil ifTrue:[
-                                        listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
-                                   ]
-                                ]
-                            ].
-                            listEntry
-                          ].
-            list2 list:classNames.
-            (info at:#dynamic) ifTrue:[
-                unloadButton enable.
-            ] ifFalse:[
-                unloadButton disable.
-            ].
-        ]
+			    cls := Smalltalk classNamed:cName.
+			    cls isNil ifTrue:[
+				listEntry colAt:2 put:'(class removed)'.
+			    ] ifFalse:[
+				rev := cls binaryRevision.
+				rev notNil ifTrue:[
+				    entry :='(bin: ' , rev.
+				    cls revision ~= rev ifTrue:[
+					entry := entry , ' / src: ' , cls revision    
+				    ].
+				    listEntry colAt:2 put:entry , ')'
+				] ifFalse:[
+				   cls revision notNil ifTrue:[
+					listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
+				   ]
+				]
+			    ].
+			    listEntry
+			  ].
+	    list2 list:classNames.
+	    (info at:#dynamic) ifTrue:[
+		unloadButton enable.
+	    ] ifFalse:[
+		unloadButton disable.
+	    ].
+	]
     ].
 
     panel := HorizontalPanelView new.
@@ -436,27 +436,27 @@
 
     unloadButton := Button label:(resources string:'unload').
     unloadButton action:[
-        self withWaitCursorDo:[
-            box withWaitCursorDo:[
-                |info idx pathName|
+	self withWaitCursorDo:[
+	    box withWaitCursorDo:[
+		|info idx pathName|
 
-                idx := list1 selectionIndex.
-                info := allModules at:idx ifAbsent:nil.
+		idx := list1 selectionIndex.
+		info := allModules at:idx ifAbsent:nil.
 
-                info isNil ifTrue:[
-                    "/ selected a method
-                    idx := idx - allModules size.
-                    pathName := (methodObjects at:idx) pathName.
+		info isNil ifTrue:[
+		    "/ selected a method
+		    idx := idx - allModules size.
+		    pathName := (methodObjects at:idx) pathName.
 
-                ] ifFalse:[
-                    "/ selected a package
-                    pathName := (info at:#pathName).
-                ].
-                ObjectFileLoader unloadObjectFile:pathName.
-                moduleListUpdater getModules.
-                unloadButton disable.
-            ]
-        ]
+		] ifFalse:[
+		    "/ selected a package
+		    pathName := (info at:#pathName).
+		].
+		ObjectFileLoader unloadObjectFile:pathName.
+		moduleListUpdater getModules.
+		unloadButton disable.
+	    ]
+	]
     ].
     moduleListUpdater getModules.
 
@@ -468,8 +468,8 @@
     listView2 bottomInset:(box preferredExtent y - y).
 
     box width:(350 min:(box device width * 2 // 3)); 
-        height:(450 min:(box device height - 50)); 
-        sizeFixed:true.
+	height:(450 min:(box device height - 50)); 
+	sizeFixed:true.
     box showAtPointer.
     box destroy.
 
@@ -752,7 +752,7 @@
 		  with:[
 			|raw|
 			raw := list1 selection.
-			list2 retractInterrestFor:selectionForwarder.
+			list2 retractInterestsFor:selectionForwarder.
 			list2 selection:(mappings at:raw asSymbol) asString.
 			list2 onChangeSend:#showRawKey to:selectionForwarder.
 		       ].
@@ -761,7 +761,7 @@
 			|f raw|
 
 			f := list2 selection.
-			list1 retractInterrestFor:selectionForwarder.
+			list1 retractInterestsFor:selectionForwarder.
 			raw := mappings keyAtValue:f asString.
 			raw isNil ifTrue:[
 			    raw := mappings keyAtValue:f first.
@@ -879,19 +879,19 @@
     box list:translatedLanguages.
     box initialText:(Language).
     box action:[:newLanguage |
-        self withWaitCursorDo:[
-            Transcript showCr:'change language to ' , newLanguage , ' ...'.
-            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
-            idx ~~ 0 ifTrue:[
-                language := listOfLanguages at:idx
-            ] ifFalse:[
-                language := newLanguage
-            ].
-            Smalltalk at:#Language put:language asSymbol.
-            Smalltalk changed:#Language.
-            ResourcePack flushCachedResourcePacks
-        ].
-        self reopenLauncher.
+	self withWaitCursorDo:[
+	    Transcript showCr:'change language to ' , newLanguage , ' ...'.
+	    idx := translatedLanguages indexOf:newLanguage withoutSeparators.
+	    idx ~~ 0 ifTrue:[
+		language := listOfLanguages at:idx
+	    ] ifFalse:[
+		language := newLanguage
+	    ].
+	    Smalltalk at:#Language put:language asSymbol.
+	    Smalltalk changed:#Language.
+	    ResourcePack flushCachedResourcePacks
+	].
+	self reopenLauncher.
     ].    
     box showAtPointer.
     box destroy
@@ -968,15 +968,15 @@
     box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
     check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries.
     ObjectFileLoader isNil ifTrue:[
-        loadBinaries value:false.
-        check disable
+	loadBinaries value:false.
+	check disable
     ].
 
     check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
     (AbstractSourceCodeManager isNil 
     or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
-        useManager value:false.
-        check disable
+	useManager value:false.
+	check disable
     ].
     box addHorizontalLine.
 
@@ -994,20 +994,20 @@
     "/ update system settings
     "/
     box accepted ifTrue:[
-        Smalltalk logDoits:logDoits value.
-        PopUpView shadows:shadows value.
-        Class updateChanges:updChanges value.
-        Autoload compileLazy:compileLazy value.
-        Smalltalk loadBinaries:loadBinaries value.
-        StandardSystemView includeHostNameInLabel:hostNameInLabel value.
-        ObjectMemory nameForChanges:changeFileName value.
-        useManager value ifTrue:[
-            (Smalltalk at:#SourceCodeManager) isNil ifTrue:[
-                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager)
-            ]
-        ] ifFalse:[
-            Smalltalk at:#SourceCodeManager put:nil
-        ]
+	Smalltalk logDoits:logDoits value.
+	PopUpView shadows:shadows value.
+	Class updateChanges:updChanges value.
+	Autoload compileLazy:compileLazy value.
+	Smalltalk loadBinaries:loadBinaries value.
+	StandardSystemView includeHostNameInLabel:hostNameInLabel value.
+	ObjectMemory nameForChanges:changeFileName value.
+	useManager value ifTrue:[
+	    (Smalltalk at:#SourceCodeManager) isNil ifTrue:[
+		Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager)
+	    ]
+	] ifFalse:[
+	    Smalltalk at:#SourceCodeManager put:nil
+	]
     ].
     box destroy
 
@@ -1171,15 +1171,15 @@
     id := device viewIdFromPoint:p.
     v := device viewFromId:id.
     v notNil ifTrue:[
-        v topView destroy.
-        ^ self
+	v topView destroy.
+	^ self
     ].
     id = device rootView id ifTrue:[
-        ^ self
+	^ self
     ].
     (Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs)
     ifTrue:[
-        device destroyView:nil withId:id
+	device destroyView:nil withId:id
     ].
 
     "Modified: 18.9.1995 / 23:13:32 / claus"
@@ -1962,5 +1962,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.68 1995-12-14 21:03:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.69 1995-12-15 13:33:31 cg Exp $'
 ! !