New dockbar, moving messages from instance to the class side.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-03-09 17:48:28 +00:00
parent 3466488794
commit 2cdfabf061

View File

@ -20,19 +20,42 @@ Class {
'cacheNode', 'cacheNode',
'workingFile', 'workingFile',
'\r\t\t\t\t\t\t\t\t\tnonVar2', '\r\t\t\t\t\t\t\t\t\tnonVar2',
'fossil',
'localRepository', 'localRepository',
'remoteRepository', 'remoteRepository',
'repositoryUser', 'repositoryUser',
'repositoryPassword', 'repositoryPassword'
'pandoc'
], ],
#classVars : [ #classVars : [
'DefaultUbakyeBrowser' 'DefaultUbakyeBrowser',
'fossil',
'pandoc'
], ],
#category : #'Grafoscopio-UI' #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' } { #category : #'as yet unclassified' }
GrafoscopioBrowser class >> launchHelpInPdf [ GrafoscopioBrowser class >> launchHelpInPdf [
"Launches the help manual in PDF format in an external viewer." "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 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" related with help, external tools and grafoscopio updates and about"
| dockingBar launchMenu helpMenu | | dockingBar launchMenu helpMenu updateMenu |
"World deleteDockingBars." "World deleteDockingBars."
launchMenu := MenuMorph new. launchMenu := MenuMorph new.
launchMenu add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open. launchMenu
launchMenu add: 'Documentos interactivos recientes' target: GrafoscopioBrowser action: #messageNotImplementedYet. add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open;
launchMenu add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser action: #messageNotImplementedYet. 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 := MenuMorph new.
helpMenu add: 'Abrir ayuda en PDF' target: GrafoscopioBrowser action: #launchHelpInPdf. helpMenu
helpMenu add: 'Abrir ayuda en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet. add: 'Abrir ayuda en PDF' target: GrafoscopioBrowser action: #launchHelpInPdf;
helpMenu add: 'Abrir ayuda en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet. add: 'Abrir ayuda en HTML' target: GrafoscopioBrowser action: #messageNotImplementedYet;
helpMenu add: 'Ir a la documentación en línea' target: GrafoscopioBrowser action: #messageNotImplementedYet. add: 'Abrir ayuda en grafoscopio' target: GrafoscopioBrowser action: #messageNotImplementedYet;
helpMenu add: 'Acerca de Grafoscopio' target: GrafoscopioBrowser action: #messageAbout. 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 := DockingBarMorph new.
dockingBar add: 'Lanzar' subMenu: launchMenu. dockingBar
dockingBar add: 'Ayuda' subMenu: helpMenu. add: 'Lanzar' subMenu: launchMenu;
add: 'Actualizar' subMenu: updateMenu;
add: 'Ayuda' subMenu: helpMenu.
dockingBar dockingBar
adhereToTop; adhereToTop;
openInWorld. 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 } { #category : #persistence }
GrafoscopioBrowser >> addFileToRepository [ GrafoscopioBrowser >> addFileToRepository [
"Adds a selected file to a defined repository." "Adds a selected file to a defined repository."
@ -399,20 +463,6 @@ browser
transformed: [:node :text | node header: text asString] 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' } { #category : #'system-support' }
GrafoscopioBrowser >> configureInitialTags [ GrafoscopioBrowser >> configureInitialTags [
"Configures a list of predefined tags available to use. More tags should be added from a repository. "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'. 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' } { #category : #'system-support' }
GrafoscopioBrowser >> configureSettings [ GrafoscopioBrowser >> configureSettings [
"Stablish several 'global' settings according to the operative system" "Stablish several 'global' settings according to the operative system"
@ -528,7 +564,7 @@ GrafoscopioBrowser >> exportAsHtml [
self inform: pandoc]. self inform: pandoc].
Smalltalk platform name = 'Win32' Smalltalk platform name = 'Win32'
ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' --standalone -o ' , htmlFileLocation ]] ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' --standalone -o ' , htmlFileLocation ]]
ifFalse: [self configurePandoc ]. ifFalse: [GrafoscopioBrowser configurePandoc ].
self customKeys. self customKeys.
@ -557,7 +593,7 @@ GrafoscopioBrowser >> exportAsPdf [
self inform: 'Archivo exportado como pdf en: ', pdfFileLocation.]. self inform: 'Archivo exportado como pdf en: ', pdfFileLocation.].
Smalltalk platform name = 'Win32' Smalltalk platform name = 'Win32'
ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' -o ' , pdfFileLocation ]] ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' -o ' , pdfFileLocation ]]
ifFalse: [self configurePandoc ]. ifFalse: [GrafoscopioBrowser configurePandoc ].
self customKeys. self customKeys.
@ -1019,8 +1055,10 @@ GrafoscopioBrowser >> treeOn: constructor [
act: [GrafoscopioBrowser open] entitled: 'Nuevo ...' categorized: 'Arbol'; act: [GrafoscopioBrowser open] entitled: 'Nuevo ...' categorized: 'Arbol';
act: [GrafoscopioBrowser new openFromFileSelector] entitled: 'Abrir/Cargar ...' categorized: 'Arbol'; act: [GrafoscopioBrowser new openFromFileSelector] entitled: 'Abrir/Cargar ...' categorized: 'Arbol';
act: [self saveToFile] entitled: 'Guardar como ...' categorized: 'Arbol'; act: [self saveToFile] entitled: 'Guardar como ...' categorized: 'Arbol';
act: [self exportAsHtml] entitled: 'Exportar como html' categorized: 'Arbol'; act: [self exportAsHtml] entitled: 'Exportar como HTML' categorized: 'Arbol';
act: [self exportAsPdf] entitled: 'Exportar como pdf' 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" "For nodes"
act: [:treePresentation | act: [:treePresentation |
@ -1052,43 +1090,7 @@ GrafoscopioBrowser >> treeOn: constructor [
act: [self messageNotImplementedYet "addFileToRepository"] entitled: 'Agregar archivo' categorized: 'Proyecto'; act: [self messageNotImplementedYet "addFileToRepository"] entitled: 'Agregar archivo' categorized: 'Proyecto';
act: [self messageNotImplementedYet] entitled: 'Eliminar 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 "repositoryCommit"] entitled: 'Enviar al histórico' categorized: 'Proyecto';
act: [self messageNotImplementedYet "repositoryCredentials"] entitled: 'Acreditarse' 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.
] ]
{ #category : #'system-support' } { #category : #'system-support' }