allow redefinition of the about-boxes image.
authorClaus Gittinger <cg@exept.de>
Mon, 27 Jul 1998 09:58:47 +0200
changeset 1006 786de97d72f9
parent 1005 44886142625a
child 1007 0b8d790b8e3b
allow redefinition of the about-boxes image.
ToolApplicationModel.st
--- a/ToolApplicationModel.st	Mon Jul 27 09:53:45 1998 +0200
+++ b/ToolApplicationModel.st	Mon Jul 27 09:58:47 1998 +0200
@@ -807,6 +807,17 @@
     self valueOfCanPaste value: anEditObject notNil
 ! !
 
+!ToolApplicationModel methodsFor:'defaults'!
+
+aboutImage
+    "the image to be displayed in my about-box;
+     If nil is returned, thhe ST/X default image is used."
+
+    ^ nil
+
+    "Created: / 25.7.1998 / 20:33:50 / cg"
+! !
+
 !ToolApplicationModel methodsFor:'help'!
 
 defaultInfoLabel
@@ -834,12 +845,13 @@
     box autoHideAfter:10 with:[].
     box showAtCenter
 
+    "Modified: / 25.7.1998 / 20:36:46 / cg"
 !
 
 openAboutThisApplication
     "opens an about this application box"
 
-    |rev box myClass clsRev|
+    |rev box myClass clsRev image|
 
     rev := ''.
     myClass := self class.
@@ -852,11 +864,15 @@
         , ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs
         , '\\' withCRs.
 
-     box   label:'About This Application'.
-     box   autoHideAfter:10 with:[].
-     box   showAtCenter.
+    image := self aboutImage.
+    image notNil ifTrue:[
+        box image:image
+    ].
+    box   label:'About This Application'.
+    box   autoHideAfter:10 with:[].
+    box   showAtCenter.
 
-    "Modified: / 21.5.1998 / 03:34:32 / cg"
+    "Modified: / 25.7.1998 / 20:37:18 / cg"
 !
 
 openHTMLDocument: aHTMLFilename
@@ -1195,5 +1211,5 @@
 !ToolApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.64 1998-07-22 11:16:57 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.65 1998-07-27 07:58:47 cg Exp $'
 ! !