From 68f233aa7a7b684c6b0ecf8c4e999d290d4fc236 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 26 Sep 2015 14:18:48 +0000 Subject: [PATCH] Documentation: Option menu for opening only the tutorial. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 62afc37..406a1c5 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -238,6 +238,7 @@ GrafoscopioBrowser class >> startDockingBar [ helpMenu := MenuMorph new. helpMenu + add: 'Manual en grafoscopio' target: (GrafoscopioBrowser new) selector: #openTutorialInGrafoscopio; add: 'Manual en PDF' target: GrafoscopioBrowser selector: #openHelpInPdf; add: 'Manual en HTML' target: GrafoscopioBrowser selector: #openHelpInHtml; add: 'Manual en grafoscopio' target: (GrafoscopioBrowser new) selector: #openHelpInGrafoscopio; @@ -1176,6 +1177,22 @@ GrafoscopioBrowser >> openLast [ ] +{ #category : #persistence } +GrafoscopioBrowser >> openTutorialInGrafoscopio [ +"Opens the help tree from a file" + + | currentChildren | + GrafoscopioBrowser configureSettings. + workingFile := (FileSystem disk workingDirectory / 'Docs' / 'Es' / 'Tutoriales' / 'tutorial.ston') asFileReference. + currentChildren := (STON fromString: workingFile contents). + self buildBrowserNamed: workingFile basenameWithIndicator. + mainTree := GrafoscopioNode new + header: 'Arbol principal'; + level: 0. + mainTree children: currentChildren. + browser openOn: mainTree children. +] + { #category : #persistence } GrafoscopioBrowser >> openWorking [ "Opens a new browser with the last working tree"