From 16f8a2543937d78c4d8c3c18cf5ea9429524b505 Mon Sep 17 00:00:00 2001 From: Ivan Pulido Date: Sat, 7 Mar 2015 18:16:45 +0000 Subject: [PATCH] Adding message to GrafoscopioBrowser class to launch help in PDF format in an external viewer. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 76 +++++++++++-------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index b722f5c..6feff9f 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -33,6 +33,22 @@ Class { #category : #'Grafoscopio-UI' } +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> launchHelpInPdf [ + "Launches the help manual in PDF format in an external viewer." + + | pdfHelpFileLocation | + pdfHelpFileLocation := (FileSystem disk workingDirectory parent / 'Docs/Es/Manual/manual-grafoscopio.pdf') fullName. + Smalltalk platform name = 'unix' + ifTrue: [ + OSProcess command: 'xdg-open ', pdfHelpFileLocation. + ]. + Smalltalk platform name = 'Win32' + ifTrue: [ + OSProcess command: 'explorer ', pdfHelpFileLocation. + ]. +] + { #category : #'as yet unclassified' } GrafoscopioBrowser class >> messageNotImplementedYet [ "Shows that a feature is not implemeted and point to further documentation on the web" @@ -54,36 +70,6 @@ GrafoscopioBrowser class >> open [ ^ self new open ] -{ #category : #'as yet unclassified' } -GrafoscopioBrowser class >> startDockingBar [ - "Creates a custom docking bar for grafoscopio on top, with shorcuts for most used actions, and a fixed place for asking for help. - Some of the functionalities implemented now in the grafoscopio interface for document trees should be moved here, like the ones - related with help, external tools and grafoscopio updates and about" - - | dockingBar launchMenu helpMenu | - "World deleteDockingBars." - - launchMenu := MenuMorph new. - launchMenu add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open. - launchMenu add: 'Documentos interactivos recientes' target: GrafoscopioBrowser action: #messageNotImplementedYet. - launchMenu add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser action: #messageNotImplementedYet. - - helpMenu := MenuMorph new. - helpMenu add: 'Abrir ayuda local en HTML (recomendado)' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda remota en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda local en pdf (recomendado)' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda remota en pdf' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda local en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda remota en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. - - dockingBar := DockingBarMorph new. - dockingBar add: 'Lanzar' subMenu: launchMenu. - dockingBar add: 'Ayuda' subMenu: helpMenu. - dockingBar - adhereToTop; - openInWorld. -] - { #category : #persistence } GrafoscopioBrowser >> addFileToRepository [ "Adds a selected file to a defined repository." @@ -921,6 +907,36 @@ GrafoscopioBrowser >> showTagsAvailable [ ] +{ #category : #'graphical interface' } +GrafoscopioBrowser >> startDockingBar [ + "Creates a custom docking bar for grafoscopio on top, with shorcuts for most used actions, and a fixed place for asking for help. + Some of the functionalities implemented now in the grafoscopio interface for document trees should be moved here, like the ones + related with help, external tools and grafoscopio updates and about" + + | dockingBar launchMenu helpMenu | + "World deleteDockingBars." + + launchMenu := MenuMorph new. + launchMenu add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open. + launchMenu add: 'Documentos interactivos recientes' target: GrafoscopioBrowser action: #messageNotImplementedYet. + launchMenu add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser action: #messageNotImplementedYet. + + helpMenu := MenuMorph new. + helpMenu add: 'Abrir ayuda local en HTML (recomendado)' target: GrafoscopioBrowser action: #messageNotImplementedYet. + helpMenu add: 'Abrir ayuda remota en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet. + helpMenu add: 'Abrir ayuda local en pdf (recomendado)' target: GrafoscopioBrowser action: #messageNotImplementedYet. + helpMenu add: 'Abrir ayuda remota en pdf' target: GrafoscopioBrowser action: #messageNotImplementedYet. + helpMenu add: 'Abrir ayuda local en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. + helpMenu add: 'Abrir ayuda remota en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. + + dockingBar := DockingBarMorph new. + dockingBar add: 'Lanzar' subMenu: launchMenu. + dockingBar add: 'Ayuda' subMenu: helpMenu. + dockingBar + adhereToTop; + openInWorld. +] + { #category : #'graphical interface' } GrafoscopioBrowser >> treeOn: constructor [ "Shows the correspondent tree of a node"