788 lines
25 KiB
Smalltalk
788 lines
25 KiB
Smalltalk
"
|
|
I'm the Graphical User Interface for Grafoscopio environment.
|
|
|
|
My main responsability is to provide grafoscopio with a docking bar
|
|
with menu options for open, browse notebooks, update the system
|
|
and its components and the help menu.
|
|
|
|
"
|
|
Class {
|
|
#name : #GrafoscopioGUI,
|
|
#superclass : #DynamicComposableModel,
|
|
#instVars : [
|
|
'windowMainMenu',
|
|
'tree',
|
|
'nodeHeader',
|
|
'nodeBody'
|
|
],
|
|
#classVars : [
|
|
'dockingBar',
|
|
'recentNotebooks'
|
|
],
|
|
#classInstVars : [
|
|
'dockingBar',
|
|
'recentNotebooks'
|
|
],
|
|
#category : #'Grafoscopio-UI'
|
|
}
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioGUI class >> defaultSpec [
|
|
<spec: #default>
|
|
|
|
^ SpecLayout composed
|
|
newColumn: [ :mainWindow |
|
|
mainWindow
|
|
newRow: [:menu |
|
|
menu add: #windowMainMenu
|
|
] height: 35;
|
|
newRow: [:outlineView |
|
|
outlineView
|
|
newColumn: [ :treePart |
|
|
treePart
|
|
newRow: [:tree | tree add: #tree];
|
|
addSplitter;
|
|
newRow: [:nodeHeader | nodeHeader add: #nodeHeader] height: 30
|
|
] right: 0.7;
|
|
addSplitter;
|
|
newColumn: [ :nodePart |
|
|
nodePart add: #nodeBody] left: 0.3.
|
|
].
|
|
];
|
|
yourself
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> docDataManual [
|
|
"I define some metadata associated to the manual document.
|
|
Language is provided according to the ISO 639-1 code convention."
|
|
|
|
| docData |
|
|
|
|
docData := Dictionary
|
|
with: 'type' -> 'manual'
|
|
with: 'languageCode' -> 'ES_CO'
|
|
with: 'remoteRepo' -> 'http://mutabit.com/repos.fossil/grafoscopio/'
|
|
with: 'relativePath' -> 'Docs/Es/Manual/'
|
|
with: 'filename' -> 'manual-grafoscopio.ston'.
|
|
^ docData
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> docDataTutorial [
|
|
"I define some metadata associated to the tutorial document.
|
|
Language is provided according to the ISO 639-1 code convention."
|
|
|
|
| docData |
|
|
|
|
docData := Dictionary
|
|
with: 'type' -> 'tutorial'
|
|
with: 'languageCode' -> 'ES_CO'
|
|
with: 'remoteRepo' -> 'http://mutabit.com/repos.fossil/grafoscopio/'
|
|
with: 'relativePath' -> 'Docs/Es/Tutoriales/'
|
|
with: 'filename' -> 'tutorial.ston'.
|
|
^ docData
|
|
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> docDownloadFor: aDocumentType [
|
|
"I download the interactive documentation in STON format, according to the document
|
|
type which can be: 'tutorial' or 'manual'.
|
|
If a the documentation is already present in the system I made a temporal backup and
|
|
download a new copy"
|
|
|
|
| docInfo rootFolder localDoc temporalBackup remoteDoc |
|
|
|
|
(aDocumentType = 'tutorial') ifTrue: [ docInfo := self docDataTutorial ].
|
|
(aDocumentType = 'manual') ifTrue: [ docInfo := self docDataManual ].
|
|
rootFolder := (FileLocator documents asFileReference / 'Grafoscopio').
|
|
rootFolder exists ifFalse: [
|
|
rootFolder ensureCreateDirectory.
|
|
OSProcess command: ('exec mkdir -p ', rootFolder fullName, '/', (docInfo at: 'relativePath'))
|
|
].
|
|
localDoc := rootFolder fullName, '/', (docInfo at: 'relativePath'), (docInfo at: 'filename').
|
|
temporalBackup := rootFolder fullName, '/', (docInfo at: 'relativePath'), aDocumentType, '.temp.ston'.
|
|
remoteDoc :=
|
|
(self docDataTutorial at: 'remoteRepo'), 'doc/tip/',
|
|
(self docDataTutorial at: 'relativePath'), (self docDataTutorial at: 'filename').
|
|
localDoc asFileReference exists
|
|
ifTrue: [
|
|
temporalBackup asFileReference exists ifTrue: [ temporalBackup asFileReference delete].
|
|
localDoc asFileReference renameTo: aDocumentType, '.temp.ston'
|
|
].
|
|
self
|
|
downloadingFrom: remoteDoc
|
|
withMessage: 'Actualizando el ', aDocumentType,'...'
|
|
into: (rootFolder fullName, '/', (docInfo at: 'relativePath')).
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioGUI class >> dockingBar [
|
|
^ dockingBar
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioGUI class >> dockingBar: anObject [
|
|
dockingBar := anObject
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> downloadingFrom: downloadUrl withMessage: aString into: location [
|
|
|
|
[: bar |
|
|
bar title: aString.
|
|
[ZnClient new
|
|
enforceHttpSuccess: true;
|
|
url: downloadUrl;
|
|
downloadTo: location;
|
|
signalProgress: true
|
|
]
|
|
on: HTTPProgress
|
|
do: [ :progress |
|
|
progress isEmpty ifFalse: [ bar current: progress percentage ].
|
|
progress resume ].
|
|
] asJob run.
|
|
]
|
|
|
|
{ #category : #examples }
|
|
GrafoscopioGUI class >> exampleBootstrapDynamicUI1 [
|
|
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
UI and get some ideas"
|
|
|
|
|notebook leftUpperPanel leftPanel treeBrowser |
|
|
|
|
"Creating a notebook-tree with dummy data"
|
|
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
|
|
"Defining the tree roots part"
|
|
leftUpperPanel := DynamicComposableModel new.
|
|
leftUpperPanel instantiateModels: #(tree TreeModel).
|
|
leftUpperPanel tree
|
|
roots: notebook children;
|
|
childrenBlock: [:node | node children ];
|
|
displayBlock: [:node | node title ].
|
|
leftUpperPanel layout: (SpecLayout composed
|
|
add: #tree;
|
|
yourself).
|
|
"to debug upto here uncomment the next line, and comment all other 'openWithSpec' ones"
|
|
"leftUpperPanel openWithSpec."
|
|
|
|
"Integrating the previous tree with the node header and creating the body according to
|
|
the tags on the node"
|
|
leftPanel := DynamicComposableModel new.
|
|
leftPanel assign: leftUpperPanel to: #roots.
|
|
leftPanel instantiateModels: #(header TextInputFieldModel).
|
|
treeBrowser := DynamicComposableModel new.
|
|
leftUpperPanel tree
|
|
whenSelectedItemChanged: [:node |
|
|
node
|
|
ifNil:[
|
|
leftPanel header text: ''.
|
|
treeBrowser instantiateModels: #(body TextModel).
|
|
Transcript show: 'Nada que mostrar', String cr]
|
|
ifNotNil: [
|
|
leftPanel header text: (leftUpperPanel tree selectedItem content header).
|
|
leftUpperPanel tree selectedItem content tags = 'código'
|
|
ifTrue: [
|
|
treeBrowser instantiateModels: #(body GlamourPresentationModel).
|
|
Transcript show: 'I am code', String cr.
|
|
Transcript show: treeBrowser body asString, String cr.
|
|
]
|
|
ifFalse: [
|
|
treeBrowser instantiateModels: #(body TextModel).
|
|
treeBrowser body text: (leftUpperPanel tree selectedItem content body).
|
|
Transcript show: 'I am NOT code', String cr.
|
|
Transcript show: treeBrowser body asString, String cr.
|
|
]
|
|
]
|
|
].
|
|
leftPanel layout:
|
|
(SpecLayout composed
|
|
newColumn: [:column |
|
|
column
|
|
add: #roots;
|
|
add: #header height: 35];
|
|
yourself).
|
|
|
|
"Integrating the previous tree with node body content"
|
|
treeBrowser assign: leftPanel to: #leftTree.
|
|
treeBrowser layout:
|
|
(SpecLayout composed
|
|
newRow: [:r | r add: #leftTree; add: #body ];
|
|
yourself
|
|
).
|
|
treeBrowser openWithSpec.
|
|
]
|
|
|
|
{ #category : #examples }
|
|
GrafoscopioGUI class >> exampleBootstrapDynamicUI2 [
|
|
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
UI and get some ideas"
|
|
|
|
|notebook leftUpperPanel leftPanel treeBrowser |
|
|
|
|
"Creating a notebook-tree with dummy data"
|
|
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
|
|
"Defining the tree roots part"
|
|
leftUpperPanel := DynamicComposableModel new.
|
|
leftUpperPanel instantiateModels: #(tree TreeModel).
|
|
leftUpperPanel tree
|
|
roots: notebook children;
|
|
childrenBlock: [:node | node children ];
|
|
displayBlock: [:node | node title ].
|
|
leftUpperPanel layout: (SpecLayout composed
|
|
add: #tree;
|
|
yourself).
|
|
"to debug upto here uncomment the next line, and comment all other 'openWithSpec' ones"
|
|
"leftUpperPanel openWithSpec."
|
|
|
|
"Integrating the previous tree with the node header and creating the body according to
|
|
the tags on the node"
|
|
leftPanel := DynamicComposableModel new.
|
|
leftPanel assign: leftUpperPanel to: #roots.
|
|
leftPanel instantiateModels: #(header TextInputFieldModel).
|
|
treeBrowser := DynamicComposableModel new.
|
|
leftUpperPanel tree
|
|
whenSelectedItemChanged: [:node |
|
|
node
|
|
ifNil:[
|
|
leftPanel header text: ''.
|
|
treeBrowser instantiateModels: #(body TextModel).
|
|
Transcript show: 'Nada que mostrar', String cr]
|
|
ifNotNil: [
|
|
leftPanel header text: (leftUpperPanel tree selectedItem content header).
|
|
leftUpperPanel tree selectedItem content tags = 'código'
|
|
ifTrue: [
|
|
treeBrowser instantiateModels: #(body GlamourPresentationModel).
|
|
treeBrowser assign: leftPanel to: #leftTree.
|
|
treeBrowser layout:
|
|
(SpecLayout composed
|
|
newRow: [:r | r add: #leftTree; add: #body ];
|
|
yourself
|
|
).
|
|
Transcript show: 'I am code', String cr.
|
|
Transcript show: treeBrowser body asString, String cr.
|
|
]
|
|
ifFalse: [
|
|
treeBrowser instantiateModels: #(body TextModel).
|
|
treeBrowser body text: (leftUpperPanel tree selectedItem content body).
|
|
treeBrowser assign: leftPanel to: #leftTree.
|
|
treeBrowser layout:
|
|
(SpecLayout composed
|
|
newRow: [:r | r add: #leftTree; add: #body ];
|
|
yourself
|
|
).
|
|
Transcript show: 'I am NOT code', String cr.
|
|
Transcript show: treeBrowser body asString, String cr.
|
|
]
|
|
]
|
|
].
|
|
leftPanel layout:
|
|
(SpecLayout composed
|
|
newColumn: [:column |
|
|
column
|
|
add: #roots;
|
|
add: #header height: 35];
|
|
yourself).
|
|
|
|
"Integrating the previous tree with node body content"
|
|
treeBrowser openWithSpec.
|
|
]
|
|
|
|
{ #category : #examples }
|
|
GrafoscopioGUI class >> exampleBootstrapUI [
|
|
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
UI and get some ideas"
|
|
|
|
|ui lay notebook |
|
|
|
|
ui := DynamicComposableModel new.
|
|
ui title: 'new | Grafoscopio'.
|
|
ui instantiateModels: #(
|
|
tree TreeModel
|
|
header TextInputFieldModel
|
|
bodyWhenMarkup TextModel
|
|
bodyWhenCode GlamourPresentationModel).
|
|
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
ui tree
|
|
roots: notebook children;
|
|
childrenBlock: [:node | node children];
|
|
displayBlock: [:node | node title ].
|
|
|
|
lay := SpecLayout composed
|
|
newRow: [:row |
|
|
row
|
|
newColumn: [:column |
|
|
column
|
|
newRow: #tree top: 0.2;
|
|
addHSplitter;
|
|
newRow: #header bottom: 0.8] right: 0.7;
|
|
addVSplitter;
|
|
newColumn: #bodyWhenCode];
|
|
yourself.
|
|
|
|
ui openWithSpecLayout: lay.
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioGUI class >> initialize [
|
|
self startDockingBar.
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> isDocUpdatedFor: aDocumentType [
|
|
"I compare the cryptografic signatures of the local copy of aDocumentType and the remote one to see if the're the same,
|
|
in which case I return True or False in any other cases.
|
|
aDocumentType is a string that can be 'tutorial' or 'manual' according to the type of document we're querying for.
|
|
Now documentation is mainly on Spanish. When support for multiple languages be enabled this method needs revision"
|
|
|
|
| folderLastContents lastRemoteTutorial localTutorial docInfo |
|
|
|
|
(aDocumentType = 'tutorial') ifTrue: [ docInfo := self docDataTutorial ].
|
|
(aDocumentType = 'manual') ifTrue: [ docInfo := self docDataManual ].
|
|
localTutorial := FileLocator documents / 'Grafoscopio', (docInfo at: 'relativePath'), (docInfo at: 'filename').
|
|
localTutorial exists
|
|
ifFalse: [
|
|
self docDownloadFor: 'tutorial'.
|
|
^ true.
|
|
]
|
|
ifTrue: [
|
|
folderLastContents := NeoJSONReader fromString:
|
|
(ZnEasy get: (docInfo at: 'remoteRepo'), 'json/dir?ci=tip&name=', (docInfo at: 'relativePath')) contents.
|
|
lastRemoteTutorial := ((folderLastContents at: 'payload') at: 'entries')
|
|
detect: [:entry | (entry at: 'name') = (docInfo at: 'filename') ].
|
|
^ (lastRemoteTutorial at: 'uuid') = (SHA1 new hashMessage: (localTutorial asFileReference contents)) hex]
|
|
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> messageAbout [
|
|
"Shows the author, license, sponsors and main contributors to the project and point to further documentation on the web"
|
|
|
|
LongMessageDialogWindow new
|
|
entryText:
|
|
'_.:| Grafoscopio |:._',
|
|
(String with: Character cr),
|
|
'(c) Copyright 2014-2016 by Offray Vladimir Luna Cárdenas',
|
|
(String with: Character cr),
|
|
'Covered under MIT license.',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'[ Sponsors ]',
|
|
(String with: Character cr),
|
|
'mutabiT | www.mutabit.com ',
|
|
(String with: Character cr),
|
|
'HiTec Lab, Fundación Universitaria Los Libertadores | www.ulibertadores.edu.co ',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'[ Thanks to ]',
|
|
(String with: Character cr),
|
|
'HackBo, Hackerspace Bogota | http://hackbo.co',
|
|
(String with: Character cr),
|
|
'// Regular workshops attendees \\
|
|
Rafael Medida, Iván Pulido, Camilo Hurtado',
|
|
(String with: Character cr),
|
|
'// Coffe talk (mostly about grafoscopio) \\
|
|
Yanneth Gil, Andrés Calderón, Luis Alejandro Bernal',
|
|
(String with: Character cr),
|
|
'// Pharo, Moose and Agile Visualization communities \\
|
|
Tudor Girba, Alexandre Bergel, Nicolai Hess, Peter Uhnák, Milton Mamani ',
|
|
(String with: Character cr),
|
|
'// Family support while writing, coding & travelling (among others!) \\
|
|
Divian Luna, Hilda Cárdenas',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'For further details and versions go to:',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'http://mutabit.com/grafoscopio';
|
|
title: 'About Grafoscopio';
|
|
open.
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> messageNoRecentDocuments [
|
|
"Shows that a feature is not implemeted and point to further documentation on the web"
|
|
|
|
UIManager default abort:
|
|
'No hay documentos recientes.',
|
|
(String with: Character cr),
|
|
'Abra un documento usando el menú:',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'"Lanzar > Documento interactivo desde archivo"',
|
|
(String with: Character cr),
|
|
(String with: Character cr)
|
|
title: 'No hay documentos recientes'.
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> messageNotImplementedYet [
|
|
"Shows that a feature is not implemeted and point to further documentation on the web"
|
|
|
|
UIManager default abort:
|
|
'Esta funcionalidad aún no está implementada!',
|
|
(String with: Character cr),
|
|
'Para información sobre futuras versiones, por favor visite: ',
|
|
(String with: Character cr),
|
|
(String with: Character cr),
|
|
'http://mutabit.com/grafoscopio',
|
|
(String with: Character cr),
|
|
(String with: Character cr)
|
|
title: 'No implementado aún'.
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> open [
|
|
^ self new open
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> openFromRecentlyUsed [
|
|
"Opens a recent notebooks list"
|
|
| selection |
|
|
|
|
self recentNotebooks
|
|
ifNotEmpty: [
|
|
selection := UIManager default chooseFrom: recentNotebooks title: 'Elija una documento'.
|
|
selection > 0
|
|
ifTrue: [ GrafoscopioNotebook new openFromFile: (recentNotebooks at: selection)]
|
|
ifFalse: [ self inform: 'No notebook selected!' ]
|
|
]
|
|
ifEmpty: [self messageNoRecentDocuments]
|
|
|
|
|
|
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> openHelpInHtml [
|
|
"Launches the help manual in PDF format in an external viewer."
|
|
|
|
| htmlHelpFileLocation |
|
|
htmlHelpFileLocation := (FileSystem disk workingDirectory parent / 'Docs' /'Es' / 'Manual' / 'manual-grafoscopio.html') fullName.
|
|
Smalltalk platform name = 'unix'
|
|
ifTrue: [OSProcess command: 'xdg-open ', htmlHelpFileLocation].
|
|
Smalltalk platform name = 'Win32'
|
|
ifTrue: [OSProcess command: 'explorer ', htmlHelpFileLocation].
|
|
Smalltalk platform name = 'Mac OS'
|
|
ifTrue: [OSProcess command: 'open ', htmlHelpFileLocation].
|
|
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI class >> openHelpInPdf [
|
|
"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].
|
|
Smalltalk platform name = 'Mac OS'
|
|
ifTrue: [OSProcess command: 'open ', pdfHelpFileLocation].
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioGUI class >> recentNotebooks [
|
|
^ recentNotebooks ifNil: [recentNotebooks := OrderedCollection new ]
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioGUI class >> recentNotebooks: anOrderedCollection [
|
|
recentNotebooks := anOrderedCollection
|
|
]
|
|
|
|
{ #category : #configuration }
|
|
GrafoscopioGUI class >> showSettings [
|
|
"Shows the settings in a Transcript. This should return a dictionary for better management of the settings. For the moment
|
|
is a quick a dirty hack"
|
|
|
|
Transcript show: fossil; cr.
|
|
Transcript show: pandoc
|
|
]
|
|
|
|
{ #category : #'graphical interface' }
|
|
GrafoscopioGUI 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, external tools and grafoscopio updates and about"
|
|
|
|
| launchMenu helpMenu updateMenu |
|
|
|
|
launchMenu := MenuMorph new.
|
|
launchMenu
|
|
add: 'New notebook' target: (GrafoscopioNotebook new) selector: #openDefault;
|
|
add: 'Notebook from file...' target: (GrafoscopioNotebook new) selector: #openFromFileSelector;
|
|
add: 'Notebook from Internet...' target: (GrafoscopioNotebook new) selector: #openFromUrlUI;
|
|
add: 'Recent notebooks...' target: self selector: #openFromRecentlyUsed;
|
|
add: 'Example notebooks...' target: self selector: #messageNotImplementedYet;
|
|
"add: 'Roassal visualizations gallery' target: (RTExampleBrowser new) selector: #open;"
|
|
add: 'Playground' target: (Smalltalk tools) selector: #openWorkspace;
|
|
add: 'Transcript' target: (Smalltalk tools) selector: #openTranscript.
|
|
|
|
updateMenu := MenuMorph new.
|
|
updateMenu
|
|
add: 'Grafoscopio' target: self selector: #updateGrafoscopioUI;
|
|
add: 'Documentation' target: self selector: #updateDocumentationUI;
|
|
add: 'DataViz package' target: self selector: #updateDatavizUI;
|
|
add: 'Database engine' target: ExternalApp selector: #installSQLite32BitsUI;
|
|
add: 'Pandoc path' target: ExternalApp selector: #configurePandoc;
|
|
add: 'Fossil path' target: ExternalApp selector: #configureFossil;
|
|
add: 'All the system' target: self selector: #updateSystem.
|
|
|
|
helpMenu := MenuMorph new.
|
|
helpMenu
|
|
add: 'Tutorial in Grafoscopio' target: (GrafoscopioNotebook new) selector: #openTutorial;
|
|
add: 'PDF Manual' target: self selector: #openHelpInPdf;
|
|
add: 'HTML Manual' target: self selector: #openHelpInHtml;
|
|
add: 'Manual in grafoscopio' target: (self new) selector: #openHelp;
|
|
add: 'About Grafoscopio' target: self selector: #messageAbout.
|
|
|
|
dockingBar := DockingBarMorph new.
|
|
dockingBar
|
|
add: 'Launch' subMenu: launchMenu;
|
|
add: 'Update' subMenu: updateMenu;
|
|
add: 'Help' subMenu: helpMenu.
|
|
dockingBar
|
|
adhereToTop;
|
|
openInWorld.
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateDataviz [
|
|
"I'm update the Dataviz package with new versions of itself take from the source code repository.
|
|
DataViz contains Data visualization helpers"
|
|
Gofer it
|
|
smalltalkhubUser: 'Offray' project: 'Dataviz';
|
|
configurationOf: 'Dataviz';
|
|
loadVersion: #development.
|
|
self inform: 'Actualización del paquete Dataviz terminada'
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateDatavizUI [
|
|
"I'm the User Interface for updating the Dataviz package with new versions of itself take from the source code repository"
|
|
| update |
|
|
|
|
update := (UIManager default
|
|
question: 'Dataviz es un paquete de visualización de datos'
|
|
title: 'Actualizar paquete Dataviz').
|
|
update ifNotNil: [
|
|
update
|
|
ifTrue: [self updateDataviz]
|
|
ifFalse: [self inform: 'Actualización del paquete dataviz no realizada']]
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateDocumentation [
|
|
"Updates documentation (manual, tutorials) from official repository"
|
|
|
|
| docs |
|
|
|
|
docs := #('tutorial' 'manual').
|
|
docs do: [ :eachDoc |
|
|
(self isDocUpdatedFor: eachDoc)
|
|
ifFalse: [ self docDownloadFor: eachDoc]
|
|
ifTrue: [
|
|
self inform:
|
|
'NADA QUE ACTUALIZAR!', String cr,
|
|
'El ', eachDoc,' ya se encuentra en su versión más reciente.'
|
|
]
|
|
]
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateDocumentationUI [
|
|
"Updates documentation (manual, tutorials) from official repository"
|
|
|
|
| update |
|
|
|
|
update := (UIManager default
|
|
confirm: '¿Desea actualizar la documentación?'
|
|
label: 'Actualizar documentación').
|
|
update ifTrue: [self updateDocumentation]
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateGrafoscopio [
|
|
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
|
the User Interface"
|
|
Gofer new
|
|
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
|
package: 'Grafoscopio';
|
|
load.
|
|
self updateUI.
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateGrafoscopioUI [
|
|
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
|
the User Interface"
|
|
| update |
|
|
|
|
update := (UIManager default
|
|
question: '¿Desea actualizar grafoscopio?'
|
|
title: 'Actualizar grafoscopio').
|
|
update ifNotNil: [
|
|
update
|
|
ifTrue: [
|
|
self updateGrafoscopio.
|
|
self inform: 'Actualización de grafoscopio terminada']
|
|
ifFalse: [self inform: 'Actualización de grafoscopio no realizada']]
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updatePrerrequisitesScript [
|
|
"Updates the system prerequisites with new versions of itself take from the source code repository"
|
|
|
|
"Visualization library (which also makes main menu loadable)"
|
|
Gofer it
|
|
smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
|
|
configurationOf: 'Roassal2';
|
|
loadStable.
|
|
|
|
"Support for the STON format used in file persistance for grafoscopio notebooks"
|
|
Gofer new
|
|
smalltalkhubUser: 'SvenVanCaekenberghe' project: 'STON';
|
|
configurationOf: 'Ston';
|
|
loadBleedingEdge.
|
|
|
|
"Moose and Roassal integration"
|
|
Gofer new
|
|
smalltalkhubUser: 'Moose' project: 'Glamour';
|
|
package: 'Glamour-Tools';
|
|
package: 'Glamour-Roassal2-Presentations';
|
|
load.
|
|
|
|
Gofer new
|
|
smalltalkhubUser: 'Moose' project: 'GToolkit';
|
|
package: 'GT-InspectorExtensions-CoreRoassal';
|
|
load.
|
|
|
|
"Fast Table support"
|
|
Gofer it
|
|
smalltalkhubUser: 'estebanlm' project: 'FastTable';
|
|
package: 'FastTable';
|
|
load.
|
|
|
|
"Integration with external tools"
|
|
Gofer new
|
|
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
|
package: 'Grafoscopio-ExternalTools';
|
|
load.
|
|
|
|
"HTML scrapping"
|
|
Gofer new
|
|
smalltalkhubUser: 'PharoExtras' project: 'Soup';
|
|
configurationOf: 'Soup';
|
|
loadStable.
|
|
|
|
"SQLite support"
|
|
Gofer new
|
|
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
|
package: 'NBSQLite3';
|
|
load.
|
|
|
|
Gofer new
|
|
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
|
package: 'NBSQLite3-Examples';
|
|
load.
|
|
|
|
"Support for Operative System integration"
|
|
Gofer new
|
|
squeaksource: 'OSProcess';
|
|
package: 'OSProcess';
|
|
load.
|
|
|
|
Gofer new
|
|
squeaksource: 'CommandShell';
|
|
package: 'CommandShell-Piping';
|
|
load.
|
|
|
|
"Bibliographic support"
|
|
Gofer new
|
|
squeaksource: 'Citezen';
|
|
package: 'ConfigurationOfCitezen';
|
|
load.
|
|
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateRecentNotebooksWith: aFileReference [
|
|
(self recentNotebooks includes: aFileReference)
|
|
ifFalse: [self recentNotebooks add: aFileReference].
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateSystem [
|
|
"Updates the system with new versions of itself take from the source code repository"
|
|
| update |
|
|
|
|
update := (UIManager default
|
|
question: '¿Desea actualizar grafoscopio?'
|
|
title: 'Actualizar grafoscopio').
|
|
update ifNotNil: [
|
|
update
|
|
ifFalse: [ self inform: 'Actualización de todo el sistema NO realizada.' ]
|
|
ifTrue: [
|
|
self
|
|
updateGrafoscopio;
|
|
updateDocumentation;
|
|
updateDataviz.
|
|
ExternalApp installSQLite32Bits.
|
|
self inform: 'Actualización de todo el sistema terminada.']
|
|
]
|
|
]
|
|
|
|
{ #category : #updating }
|
|
GrafoscopioGUI class >> updateUI [
|
|
"I update the User Interface (UI) with new versions of the docking bar or logos where available.
|
|
I'm helpful while testing new functionality that should be expossed to the user via the UI"
|
|
self startDockingBar.
|
|
(World submorphs select: [ :each | each class = DockingBarMorph ]) allButFirstDo: [ :bar | bar delete ].
|
|
|
|
]
|
|
|
|
{ #category : #'ui-building' }
|
|
GrafoscopioGUI >> proyectSubMenu [
|
|
"This should be integrated with the GrafoscopioNotebook same messages.
|
|
Was originally wrote in Spanish, and something is lost in translation, but Grafoscopio
|
|
should be available in several languages..."
|
|
^ MenuModel new
|
|
addGroup: [ :group |
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Activar repositorio remoto...';
|
|
icon: Smalltalk ui icons smallPushpinIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ].
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Activar repositorio local...';
|
|
icon: Smalltalk ui icons homeIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ].
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Agregar archivo...';
|
|
icon: Smalltalk ui icons newerPackagesAvailableIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ].
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Eliminar archivo...';
|
|
icon: Smalltalk ui icons packageDeleteIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ].
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Enviar al histórico';
|
|
icon: Smalltalk ui icons smallScreenshotIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ].
|
|
group addItem: [ :item |
|
|
item
|
|
name: 'Acreditarse';
|
|
icon: Smalltalk ui icons userIcon;
|
|
action: [ self inform: 'Por implementar ...' ] ] ]
|
|
|
|
]
|