ProjectView.st
changeset 45 950b84ba89e6
parent 40 a9ae39be7004
child 52 7b48409ae088
--- a/ProjectView.st	Mon Oct 10 04:15:21 1994 +0100
+++ b/ProjectView.st	Mon Oct 10 04:16:24 1994 +0100
@@ -2,7 +2,7 @@
 
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -13,10 +13,10 @@
 "
 
 StandardSystemView subclass:#ProjectView
-         instanceVariableNames:'myProject toggle'
-         classVariableNames:'ActiveProjectView'
-         poolDictionaries:''
-         category:'Interface-Smalltalk'
+	 instanceVariableNames:'myProject toggle'
+	 classVariableNames:'ActiveProjectView'
+	 poolDictionaries:''
+	 category:'Interface-Smalltalk'
 !
 
 !ProjectView class methodsFor:'instance creation'!
@@ -44,15 +44,15 @@
     myProject := aProject.
     e := (toggle width @ toggle height).
     drawableId isNil ifTrue:[
-        self minExtent:e.
-        self maxExtent:e.
-        self open
+	self minExtent:e.
+	self maxExtent:e.
+	self open
     ] ifFalse:[
-        self unrealize.
-        self minExtent:e.
-        self maxExtent:e.
-        self extent:e.
-        self rerealize
+	self unrealize.
+	self minExtent:e.
+	self maxExtent:e.
+	self extent:e.
+	self rerealize
     ]
 ! !
 
@@ -65,38 +65,38 @@
     toggle pressAction:[self showProject].
     toggle releaseAction:[self hideProject].
     toggle middleButtonMenu:(
-        PopUpMenu
-                labels:(resources array:
-                           #('rename'
-                             'changes'
-                             'directory'
-                             'properties'
-                             '-'
+	PopUpMenu
+		labels:(resources array:
+			   #('rename'
+			     'changes'
+			     'directory'
+			     'properties'
+			     '-'
 "
-                             'build'
-                             '-'
+			     'build'
+			     '-'
 "
-                             'show'
-                             'hide'
-                             '-'
-                             'destroy'
-                            )
-                        )
-             selectors:#(renameProject
-                         browseChanges
-                         projectDirectory
-                         browseProps
-                         nil
+			     'show'
+			     'hide'
+			     '-'
+			     'destroy'
+			    )
+			)
+	     selectors:#(renameProject
+			 browseChanges
+			 projectDirectory
+			 browseProps
+			 nil
 "
-                         buildProject
-                         nil
+			 buildProject
+			 nil
 "
-                         showProject
-                         hideProject
-                         nil
-                         destroy
-                        )
-              receiver:self
+			 showProject
+			 hideProject
+			 nil
+			 destroy
+			)
+	      receiver:self
     )
 !
 
@@ -111,37 +111,37 @@
 projectDirectory
     |box|
 
-    box := EnterBox new.
+    box := FilenameEnterBox new.
     box title:'Directory of project:'.
     myProject directory notNil ifTrue:[
-        box initialText:myProject directory
+	box initialText:myProject directory
     ].
     box action:[:dirName |
-        (OperatingSystem isDirectory:dirName) ifFalse:[
-            (OperatingSystem isValidPath:dirName) ifTrue:[
-                self warn:(resources string:'%1 is not a valid directory' with:dirName).
-                ^ self
-            ].
-            (self confirm:(resources string:'%1 does not exist\\create ?' with:dirName) withCRs) ifTrue:[
-                (OperatingSystem recursiveCreateDirectory:dirName) ifFalse:[
-                    self warn:(resources string:'cannot create %1' with:dirName)
-                ]
-            ].
-        ].
-        "did it work ?"
-        (OperatingSystem isDirectory:dirName) ifTrue:[
-            myProject directory:dirName
-        ].
+	(OperatingSystem isDirectory:dirName) ifFalse:[
+	    (OperatingSystem isValidPath:dirName) ifTrue:[
+		self warn:(resources string:'%1 is not a valid directory' with:dirName).
+		^ self
+	    ].
+	    (self confirm:(resources string:'%1 does not exist\\create ?' with:dirName) withCRs) ifTrue:[
+		(OperatingSystem recursiveCreateDirectory:dirName) ifFalse:[
+		    self warn:(resources string:'cannot create %1' with:dirName)
+		]
+	    ].
+	].
+	"did it work ?"
+	(OperatingSystem isDirectory:dirName) ifTrue:[
+	    myProject directory:dirName
+	].
     ].
     box showAtPointer
 !
 
 buildProject
     (self confirm:'create files in: ' ,  myProject directory) ifTrue:[
-        myProject createProjectFiles.
-        (self confirm:'starting make in: ' ,  myProject directory) ifTrue:[
-            myProject buildProject.
-        ].
+	myProject createProjectFiles.
+	(self confirm:'starting make in: ' ,  myProject directory) ifTrue:[
+	    myProject buildProject.
+	].
     ].
 !
 
@@ -165,14 +165,14 @@
 Do you really want to do this ?'.
     box okText:'yes'.
     box yesAction:[
-        self doDestroyProject
+	self doDestroyProject
     ].
     box showAtPointer
 !
 
 showProject
     ActiveProjectView notNil ifTrue:[
-        ActiveProjectView hideProject
+	ActiveProjectView hideProject
     ].
     ActiveProjectView := self.
 
@@ -195,8 +195,8 @@
     box okText:'rename'.
     box initialText:(myProject name).
     box action:[:newName |
-        myProject name:newName.
-        self setProject:myProject
+	myProject name:newName.
+	self setProject:myProject
     ].
     box showAtPointer
 !
@@ -218,7 +218,7 @@
 Do you really want to do this ?'.
     box okText:'yes'.
     box yesAction:[
-        self doDestroy
+	self doDestroy
     ].
     box showAtPointer
 ! !