From db72fe731cdda9cbc36806680a3507b18341b9a8 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 12 Apr 2016 10:47:06 +0000 Subject: [PATCH] About: New code for about. --- repository/Grafoscopio/DynamicDict.class.st | 20 ---- .../Grafoscopio/GrafoscopioBrowser.class.st | 92 +++++++++---------- .../Grafoscopio/GrafoscopioGUI.class.st | 33 +++++++ .../Grafoscopio/GrafoscopioNode.class.st | 11 ++- 4 files changed, 83 insertions(+), 73 deletions(-) diff --git a/repository/Grafoscopio/DynamicDict.class.st b/repository/Grafoscopio/DynamicDict.class.st index 6029d30..405b9d8 100644 --- a/repository/Grafoscopio/DynamicDict.class.st +++ b/repository/Grafoscopio/DynamicDict.class.st @@ -86,25 +86,6 @@ DynamicDict >> rebuildWithCodeLayoutFor: key [ yourself. self needRebuild: false. content needRebuild: true. - Transcript show: 'código + ', self content asString, String cr. - self buildWithSpecLayout: newLayout. -] - -{ #category : #'as yet unclassified' } -DynamicDict >> rebuildWithTextLayout [ - | newLayout | - - content := self newText. - newLayout := SpecLayout composed - newRow: [:row | - row - add: #list right: 0.7; - add: #content left: 0.3]; - yourself. - self needRebuild: false. - list needRebuild: false. - content needRebuild: true. - Transcript show: 'texto + ', self content asString, String cr.. self buildWithSpecLayout: newLayout. ] @@ -122,7 +103,6 @@ DynamicDict >> rebuildWithTextLayoutFor: key [ self needRebuild: false. list needRebuild: false. content needRebuild: true. - Transcript show: 'texto + ', self content asString, String cr.. self buildWithSpecLayout: newLayout. ] diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index e8c319d..cf5b29b 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -86,19 +86,10 @@ GrafoscopioBrowser class >> docDownloadFor: aDocumentType [ temporalBackup asFileReference exists ifTrue: [ temporalBackup asFileReference delete]. localDoc asFileReference renameTo: aDocumentType, '.temp.ston' ]. - [: bar | - bar title: 'Actualizando el ', aDocumentType,'...'. - [client := ZnClient new. - client - get: remoteDoc; - signalProgress: true; - downloadTo: (rootFolder fullName, '/', (docInfo at: 'relativePath')). ] - on: HTTPProgress - do: [ :progress | - progress isEmpty ifFalse: [ bar current: progress percentage ]. - progress resume ]. - - ] asJob run. + self + downloadingFrom: remoteDoc + withMessage: 'Actualizando el ', aDocumentType,'...' + into: (rootFolder fullName, '/', (docInfo at: 'relativePath')). ] { #category : #'graphical interface' } @@ -148,44 +139,45 @@ GrafoscopioBrowser class >> isDocUpdatedFor: aDocumentType [ GrafoscopioBrowser class >> messageAbout [ "Shows the author, license, sponsors and main contributors to the project and point to further documentation on the web" - UIManager default alert: - '_.:| 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!) \\ + 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'. + (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' } diff --git a/repository/Grafoscopio/GrafoscopioGUI.class.st b/repository/Grafoscopio/GrafoscopioGUI.class.st index b8c8519..46d9d20 100644 --- a/repository/Grafoscopio/GrafoscopioGUI.class.st +++ b/repository/Grafoscopio/GrafoscopioGUI.class.st @@ -239,6 +239,23 @@ GrafoscopioGUI >> initializePresenter [ ] ] +{ #category : #initialization } +GrafoscopioGUI >> initializePresenter2 [ + tree whenSelectedItemChanged: [:node | + node tag = 'código' + ifTrue: [ ] + ifFalse: [ ] + + ]. + nodeHeader acceptBlock: [ :text| + tree selectedItem + ifNotNil: [:x | + x content: text. + self updateTree + ] + ] +] + { #category : #initialization } GrafoscopioGUI >> initializeWidgets [ @@ -409,6 +426,22 @@ GrafoscopioGUI >> updateBody [ ] +] + +{ #category : #update } +GrafoscopioGUI >> updateBody2 [ + "update the displayed content associated to the body of a node" + + (tree selectedItem content tags = 'código') + ifTrue: [ + ^ nodeBody text: 'I should be playground because I am tagged as ', tree selectedItem content tags + ] + ifFalse: [ + "nodeBody := self newText." + ^ nodeBody text: tree selectedItem content body + ] + + ] { #category : #update } diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index cd06e76..5bef843 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -160,16 +160,21 @@ GrafoscopioNode >> asSton [ { #category : #initialization } GrafoscopioNode >> becomeDefaultTestTree [ - | node1 node2 | + | node1 node2 node3 | self level: 0. self header: 'Arbol principal'. node1 := GrafoscopioNode new header: 'Markup'; - body: 'I am just a node with markup'. + body: 'I am just a node with markup'; + level: 1. node2 := GrafoscopioNode new header: 'Code'; body: 'PharoTutorial openPharoZenWorkspace'; - tagAs: 'código'. + tagAs: 'código'. + node3 := GrafoscopioNode new + header: 'Child'; + body: 'Just testing'. + node1 addNode: node3. self addNode: node1; addNode: node2.