NewLauncher.st
changeset 6515 5996d5550b60
parent 6439 24ead1e7859f
child 6522 271558921414
--- a/NewLauncher.st	Tue Jan 31 23:54:48 2006 +0100
+++ b/NewLauncher.st	Wed Feb 01 00:31:01 2006 +0100
@@ -15,7 +15,7 @@
 "{ Package: 'stx:libtool' }"
 
 AbstractLauncherApplication subclass:#NewLauncher
-	instanceVariableNames:'isMainLauncher helpIsOn'
+	instanceVariableNames:'isMainLauncher helpIsOn errorListCanvas'
 	classVariableNames:'UserAddedMenuItems UserAddedToolBarItems'
 	poolDictionaries:''
 	category:'Interface-Smalltalk'
@@ -678,6 +678,69 @@
 !NewLauncher class methodsFor:'interface specs'!
 
 windowSpec
+    ^ self windowSpec_old.
+    "/ ^ self windowSpec_new.
+!
+
+windowSpec_new
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
+
+    "
+     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec_new
+     NewLauncher new openInterface:#windowSpec_new
+    "
+
+    <resource: #canvas>
+
+    ^ 
+     #(FullSpec
+        name: #'windowSpec_new'
+        window: 
+       (WindowSpec
+          label: 'ST/X Launcher'
+          name: 'ST/X Launcher'
+          min: (Point 374 44)
+          bounds: (Rectangle 0 0 374 202)
+          menu: menu
+          icon: windowIcon
+        )
+        component: 
+       (SpecCollection
+          collection: (
+           (MenuPanelSpec
+              name: 'menuToolbarView'
+              layout: (LayoutFrame 0 0.0 0 0 0 1.0 40 0)
+              menu: menuToolbar
+            )
+           (NoteBookViewSpec
+              name: 'NoteBook1'
+              layout: (LayoutFrame 0 0.0 40 0.0 0 1.0 -26 1.0)
+              level: 0
+              model: selectedTabHolder
+              menu: tabList
+              direction: bottom
+              useIndex: true
+              translateLabel: true
+              canvas: noteBookCanvasHolder
+              keepCanvasAlive: true
+            )
+           (UISubSpecification
+              name: 'infoBarSubSpec'
+              layout: (LayoutFrame 0 0.0 -26 1 0 1.0 0 1.0)
+              majorKey: ToolApplicationModel
+              minorKey: windowSpecForInfoBarWithClock
+            )
+           )
+         
+        )
+      )
+!
+
+windowSpec_old
     "This resource specification was automatically generated
      by the UIPainter of ST/X."
 
@@ -2913,6 +2976,13 @@
 
 !NewLauncher methodsFor:'accessing'!
 
+errorListCanvas
+    errorListCanvas isNil ifTrue:[
+        errorListCanvas := DataSetView new.
+    ].
+    ^ errorListCanvas
+!
+
 examples
 "
     reopening a standard launcher (without any added tools)
@@ -2978,6 +3048,17 @@
     menu findGuiResourcesIn:self.
 
     ^ menu
+!
+
+transcriptView
+    transcript isNil ifTrue:[
+        (self componentAt: #transcriptView) notNil ifTrue:[
+            transcript := (self componentAt: #transcriptView) subViews first.
+        ] ifFalse:[
+            transcript := Workspace new.
+        ]
+    ].
+    ^ transcript
 ! !
 
 !NewLauncher methodsFor:'aspects'!
@@ -3064,10 +3145,30 @@
     "Created: / 20.6.1998 / 16:54:31 / cg"
 !
 
+noteBookCanvasHolder
+    |holder|
+
+    (holder := builder bindingAt:#noteBookCanvasHolder) isNil ifTrue:[
+        builder aspectAt:#noteBookCanvasHolder put:(holder := nil asValue).
+        holder value:self transcriptView.
+    ].
+    ^ holder
+!
+
 packageDialogVisible
     ^ false
 !
 
+selectedTabHolder
+    |holder|
+
+    (holder := builder bindingAt:#selectedTabHolder) isNil ifTrue:[
+        builder aspectAt:#selectedTabHolder put:(holder := 1 asValue).
+        holder addDependent:self.
+    ].
+    ^ holder
+!
+
 showActiveHelpMenuItem
     ^ false
 !
@@ -3085,6 +3186,10 @@
             put:(holder := UserPreferences current useNewSystemBrowser not asValue).
     ].
     ^ holder
+!
+
+tabList
+    ^ resources array:#('Transcript' 'Errors').
 ! !
 
 !NewLauncher methodsFor:'change & update'!
@@ -3093,6 +3198,16 @@
     "care for project changes & update my infoView"
 
     ((something == #currentProject) or:[changedObject == Project]) ifTrue: [self updateInfo].
+    changedObject == self selectedTabHolder ifTrue: [
+        changedObject value == 1 ifTrue:[
+            self noteBookCanvasHolder value:self transcriptView.
+            ^ self.
+        ].
+        changedObject value == 2 ifTrue:[
+            self noteBookCanvasHolder value:self errorListCanvas.
+            ^ self.
+        ].
+    ].
     super update:something with:aParameter from:changedObject.
 !
 
@@ -3797,7 +3912,7 @@
         ]
     ].
 
-    transcript := (self componentAt: #transcriptView) subViews first.
+    transcript := self transcriptView. "/ (self componentAt: #transcriptView) subViews first.
 
     isMainLauncher ifTrue:[
         transcript beTranscript.
@@ -4058,5 +4173,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.332 2005-12-16 13:40:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.333 2006-01-31 23:31:01 cg Exp $'
 ! !