From 17e0405b11cdcd3aebcfce37730ccaef95497057 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 19 Jul 2016 13:56:25 +0000 Subject: [PATCH] From unnamed to named windows. --- .../Grafoscopio/GrafoscopioNotebook.class.st | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index c14ec5b..1930e2d 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -282,6 +282,19 @@ GrafoscopioNotebook >> notebookSubMenu [ action: [ self inform: 'To be implemented...' ] ] ] ] +{ #category : #persistence } +GrafoscopioNotebook >> openDefault [ +"I open a new default notebook" + + | nb | + nb := self class new. + nb + notebook: (GrafoscopioNode new becomeDefaultTree); + title: ' New | Grafoscopio notebook'; + notebookContent: nb notebook. + ^ nb openWithSpec. +] + { #category : #persistence } GrafoscopioNotebook >> openFromFile: aFileName [ "I open a notebook from a file named aFileName containing a grafoscopio tree" @@ -356,6 +369,7 @@ GrafoscopioNotebook >> saveToFile: aFileReference [ self workingFile ensureCreateFile. [ self exportAsSton: self notebook on: (self workingFile writeStream)] ensure: [ (self workingFile writeStream) ifNotNil: #close ]. + self title: self workingFile basenameWithIndicator, ' | Grafoscopio notebook'. self inform: ('File saved at: ', String cr, self workingFile fullName). GrafoscopioGUI updateRecentNotebooksWith: aFileReference.