*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 24 Nov 2005 17:14:08 +0100
changeset 6421 38dc014c8ab6
parent 6420 166117658726
child 6422 f2ea10f82210
*** empty log message ***
WorkspaceApplication.st
--- a/WorkspaceApplication.st	Tue Nov 22 16:52:08 2005 +0100
+++ b/WorkspaceApplication.st	Thu Nov 24 17:14:08 2005 +0100
@@ -188,6 +188,11 @@
                   translateLabel: true
                 )
                (MenuItem
+                  label: 'Add Tea Timer (3Min)'
+                  itemValue: addTeaTimer
+                  translateLabel: true
+                )
+               (MenuItem
                   label: 'Rename...'
                   itemValue: renameWorkspace
                   translateLabel: true
@@ -863,6 +868,31 @@
     ^ view
 !
 
+addTeaTimer
+    |l dt tEnd|
+
+    dt := 3"*60".
+
+    tEnd := AbsoluteTime now addSeconds:dt.
+    l := Label new.
+    l sizeFixed:true.
+    l label:'Waiting ... [',dt printString,' sec]'.
+    l viewBackground:Color red.
+    self addWindow:l named:'TeaTimer%1'.
+
+    [
+        |remaining|
+
+        [AbsoluteTime now < tEnd ] whileTrue:[
+            remaining := tEnd - AbsoluteTime now.
+            l label:'Waiting ... [',remaining printString,' sec]'.
+            Delay waitForSeconds:1.
+        ].
+        l label:'TEA is ready !!'.
+        l viewBackground:Color green.
+    ] fork.
+!
+
 addWorkspace
     self addWindow:(self createWorkspace) named:'Workspace%1'
 !
@@ -1435,12 +1465,15 @@
 
     super workspaceSelectionChanged.
     selectedWorkspace := self selectedWorkspace.
-    compilerClass := selectedWorkspace isNil ifTrue:[Compiler] ifFalse:[selectedWorkspace compilerClass].
+
+    compilerClass := (selectedWorkspace or:[(selectedWorkspace isKindOf:Workspace) not])
+                        ifTrue:[Compiler] 
+                        ifFalse:[selectedWorkspace compilerClass].
     self syntaxHolder setValue:(self syntaxNameForCompilerClass:compilerClass).
 ! !
 
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.103 2005-10-19 12:39:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.104 2005-11-24 16:14:08 cg Exp $'
 ! !