MultiViewToolApplication.st
changeset 6408 e0f701a20cae
parent 6354 08a483e3beda
child 6424 57dbbc6ff912
--- a/MultiViewToolApplication.st	Tue Oct 18 18:39:16 2005 +0200
+++ b/MultiViewToolApplication.st	Wed Oct 19 14:39:43 2005 +0200
@@ -204,9 +204,18 @@
 "/    workspaceHolder value:aWindow.
 !
 
+defaultFileNameForSave
+    ^ 'file.wsp'
+!
+
+defaultFileNameForSaveAll
+   ^ 'file.wsp'
+!
+
 menuSaveAllAs
     self 
         askForFile:'Save all Buffers into:' 
+        default:(self defaultFilenameForSaveAll)
         thenDo:[:file :doAppend |
             |ws append|
 
@@ -226,7 +235,8 @@
 
 menuSaveAs
     self 
-        askForFile:'Save Buffer into:' 
+        askForFile:'Save Buffer into:'
+        default:(self defaultFileNameForSave)
         thenDo:[:file :doAppend |
             |ws|
 
@@ -331,10 +341,10 @@
 
 !MultiViewToolApplication methodsFor:'private'!
 
-askForFile:question thenDo:aBlock
+askForFile:question default:defaultFilename thenDo:aBlock
     Dialog
         requestSaveFileName:(resources string:question) 
-        default:'file.wsp' 
+        default:defaultFilename 
         fromDirectory:nil 
         action:[:fileName | aBlock value:fileName value:false] 
         appendAction:[:fileName | aBlock value:fileName value:true]
@@ -356,6 +366,11 @@
 "/    ].
 !
 
+askForFile:question thenDo:aBlock
+    ^ self
+        askForFile:question default:'file.wsp' thenDo:aBlock
+!
+
 askIfAnyModified:arg1 yesButton:arg2 
     "raise an error: must be redefined in concrete subclass(es)"
 
@@ -434,5 +449,5 @@
 !MultiViewToolApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/MultiViewToolApplication.st,v 1.5 2005-07-13 15:45:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/MultiViewToolApplication.st,v 1.6 2005-10-19 12:39:39 cg Exp $'
 ! !