diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 4c33fce..be58456 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -20,19 +20,42 @@ Class { 'cacheNode', 'workingFile', '\r\t\t\t\t\t\t\t\t\tnonVar2', - 'fossil', 'localRepository', 'remoteRepository', 'repositoryUser', - 'repositoryPassword', - 'pandoc' + 'repositoryPassword' ], #classVars : [ - 'DefaultUbakyeBrowser' + 'DefaultUbakyeBrowser', + 'fossil', + 'pandoc' ], #category : #'Grafoscopio-UI' } +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> configureFossil [ + "Stablish where is located fossil according to the operative system and the input of the user" + | fileStream | + fileStream := UITheme builder + fileOpen: 'Coloque la ruta de fossil'. + + fileStream isNil ifTrue: [ ^nil ]. + fossil := fileStream name asFileReference fullName. +] + +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> configurePandoc [ + "Stablish where is located pandoc according to the operative system and the input of the user" + | fileStream | + fileStream := UITheme builder + fileOpen: 'Coloque la ruta de pandoc'. + + fileStream isNil ifTrue: [ ^nil ]. + pandoc := fileStream name asFileReference fullName. + +] + { #category : #'as yet unclassified' } GrafoscopioBrowser class >> launchHelpInPdf [ "Launches the help manual in PDF format in an external viewer." @@ -103,29 +126,70 @@ GrafoscopioBrowser class >> startDockingBar [ 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 | + | dockingBar launchMenu helpMenu updateMenu | "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. + launchMenu + add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open; + add: 'Documentos interactivos recientes' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser action: #messageNotImplementedYet. + + updateMenu := MenuMorph new. + updateMenu + add: 'Documentación' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Grafoscopio' target: GrafoscopioBrowser action: #updateGrafoscopio; + add: 'Interface Gráfica' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Prerrequisitos' target: GrafoscopioBrowser action: #updatePrerrequisites; + add: 'Herramientas externas' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Ruta a pandoc' target: GrafoscopioBrowser action: #configurePandoc; + add: 'Ruta a fossil' target: GrafoscopioBrowser action: #configureFossil; + add: 'Todo el sistema' target: GrafoscopioBrowser action: #updateSystem. helpMenu := MenuMorph new. - helpMenu add: 'Abrir ayuda en PDF' target: GrafoscopioBrowser action: #launchHelpInPdf. - helpMenu add: 'Abrir ayuda en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Abrir ayuda en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Ir a la documentación en línea' target: GrafoscopioBrowser action: #messageNotImplementedYet. - helpMenu add: 'Acerca de Grafoscopio' target: GrafoscopioBrowser action: #messageAbout. - + helpMenu + add: 'Abrir ayuda en PDF' target: GrafoscopioBrowser action: #launchHelpInPdf; + add: 'Abrir ayuda en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Abrir ayuda en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Ir a la documentación en línea' target: GrafoscopioBrowser action: #messageNotImplementedYet; + add: 'Acerca de Grafoscopio' target: GrafoscopioBrowser action: #messageAbout. + dockingBar := DockingBarMorph new. - dockingBar add: 'Lanzar' subMenu: launchMenu. - dockingBar add: 'Ayuda' subMenu: helpMenu. + dockingBar + add: 'Lanzar' subMenu: launchMenu; + add: 'Actualizar' subMenu: updateMenu; + add: 'Ayuda' subMenu: helpMenu. dockingBar adhereToTop; openInWorld. ] +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> updateGrafoscopio [ + "Updates Grafoscopio with new versions of itself take from the source code repository" + + Gofer new + smalltalkhubUser: 'Offray' project: 'Grafoscopio'; + package: 'Grafoscopio'; + load. + +] + +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> updatePrerrequisites [ + "Updates the system with new versions of itself take from the source code repository" + Gofer new + smalltalkhubUser: 'SvenVanCaekenberghe' project: 'STON'; + package: 'STON-Core'; + load. + + Gofer new + squeaksource: 'Citezen'; + package: 'ConfigurationOfCitezen'; + load. + (ConfigurationOfCitezen project latestVersion: #development) load. +] + { #category : #persistence } GrafoscopioBrowser >> addFileToRepository [ "Adds a selected file to a defined repository." @@ -399,20 +463,6 @@ browser transformed: [:node :text | node header: text asString] ] -{ #category : #'system-support' } -GrafoscopioBrowser >> configureFossil [ - "Stablish where is located fossil according to the operative system and the input of the user" - | fileStream | - fileStream := UITheme builder - fileOpen: 'Coloque la ruta de fossil'. - - fileStream isNil ifTrue: [ ^nil ]. - fossil := fileStream name asFileReference fullName. - - - -] - { #category : #'system-support' } GrafoscopioBrowser >> configureInitialTags [ "Configures a list of predefined tags available to use. More tags should be added from a repository. @@ -428,20 +478,6 @@ GrafoscopioBrowser >> configureInitialTags [ add: 'transmediado'. ] -{ #category : #'system-support' } -GrafoscopioBrowser >> configurePandoc [ - "Stablish where is located pandoc according to the operative system and the input of the user" - | fileStream | - fileStream := UITheme builder - fileOpen: 'Coloque la ruta de pandoc'. - - fileStream isNil ifTrue: [ ^nil ]. - pandoc := fileStream name asFileReference fullName. - - - -] - { #category : #'system-support' } GrafoscopioBrowser >> configureSettings [ "Stablish several 'global' settings according to the operative system" @@ -528,7 +564,7 @@ GrafoscopioBrowser >> exportAsHtml [ self inform: pandoc]. Smalltalk platform name = 'Win32' ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' --standalone -o ' , htmlFileLocation ]] - ifFalse: [self configurePandoc ]. + ifFalse: [GrafoscopioBrowser configurePandoc ]. self customKeys. @@ -557,7 +593,7 @@ GrafoscopioBrowser >> exportAsPdf [ self inform: 'Archivo exportado como pdf en: ', pdfFileLocation.]. Smalltalk platform name = 'Win32' ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' -o ' , pdfFileLocation ]] - ifFalse: [self configurePandoc ]. + ifFalse: [GrafoscopioBrowser configurePandoc ]. self customKeys. @@ -1019,9 +1055,11 @@ GrafoscopioBrowser >> treeOn: constructor [ act: [GrafoscopioBrowser open] entitled: 'Nuevo ...' categorized: 'Arbol'; act: [GrafoscopioBrowser new openFromFileSelector] entitled: 'Abrir/Cargar ...' categorized: 'Arbol'; act: [self saveToFile] entitled: 'Guardar como ...' categorized: 'Arbol'; - act: [self exportAsHtml] entitled: 'Exportar como html' categorized: 'Arbol'; - act: [self exportAsPdf] entitled: 'Exportar como pdf' categorized: 'Arbol'; - + act: [self exportAsHtml] entitled: 'Exportar como HTML' categorized: 'Arbol'; + act: [self exportAsPdf] entitled: 'Exportar como PDF (requiere LaTeX)' categorized: 'Arbol'; + act: [self messageNotImplementedYet] entitled: 'Ver HTML' categorized: 'Arbol'; + act: [self messageNotImplementedYet] entitled: 'Ver PDF' categorized: 'Arbol'; + "For nodes" act: [:treePresentation | (treePresentation selection isNotNil) @@ -1052,43 +1090,7 @@ GrafoscopioBrowser >> treeOn: constructor [ act: [self messageNotImplementedYet "addFileToRepository"] entitled: 'Agregar archivo' categorized: 'Proyecto'; act: [self messageNotImplementedYet] entitled: 'Eliminar archivo' categorized: 'Proyecto'; act: [self messageNotImplementedYet "repositoryCommit"] entitled: 'Enviar al histórico' categorized: 'Proyecto'; - act: [self messageNotImplementedYet "repositoryCredentials"] entitled: 'Acreditarse' categorized: 'Proyecto'; - - "For external tools" - act: [self messageNotImplementedYet] entitled: 'Actualizar' categorized: 'Herramientas externas'; - act: [self configurePandoc] entitled: 'Definir ruta a pandoc' categorized: 'Herramientas externas'; - act: [self messageNotImplementedYet] entitled: 'Definir ruta a fossil' categorized: 'Herramientas externas'; - - "For grafoscopio" - act: [self updateGrafoscopio] entitled: 'Actualizar' categorized: 'Grafoscopio'; - act: [self updatePrerrequisites] entitled: 'Actualizar prerrequisitos' categorized: 'Grafoscopio'. -] - -{ #category : #'system-support' } -GrafoscopioBrowser >> updateGrafoscopio [ - "Updates Grafoscopio with new versions of itself take from the source code repository" - - Gofer new - smalltalkhubUser: 'Offray' project: 'Grafoscopio'; - package: 'Grafoscopio'; - load. - -] - -{ #category : #'system-support' } -GrafoscopioBrowser >> updatePrerrequisites [ - "Updates the system with new versions of itself take from the source code repository" - Gofer new - smalltalkhubUser: 'SvenVanCaekenberghe' project: 'STON'; - package: 'STON-Core'; - load. - - Gofer new squeaksource: 'Citezen'; - package: 'ConfigurationOfCitezen'; - load. - (ConfigurationOfCitezen project latestVersion: #development) load. - - + act: [self messageNotImplementedYet "repositoryCredentials"] entitled: 'Acreditarse' categorized: 'Proyecto'. ] { #category : #'system-support' }