From 02bb6c72a4a2a944daec9a2e3d56a963b300c606 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 6 Feb 2015 11:14:29 +0000 Subject: [PATCH] Solved main but when selecting empty parts of the main tree... finaly! an old bug has being hunted :-) --- .../Grafoscopio/GrafoscopioBrowser.class.st | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index a0abd5a..fd44f36 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -122,9 +122,11 @@ GrafoscopioBrowser >> bodyForCodeOn: constructor [ GrafoscopioBrowser >> bodyForTransmediaIn: constructor for: aNode [ "Shows the body of a transmedia type of nodes, which are tagged as 'original' and 'transmediado'" - aNode tags = 'original' - ifFalse: [^self ] - ifTrue: [constructor custom: (self panelTransmediaFor: aNode)] + aNode tags notNil + ifTrue: [aNode tags = 'original' + ifFalse: [^self ] + ifTrue: [constructor custom: (self panelTransmediaFor: aNode)]] + ] @@ -154,7 +156,6 @@ GrafoscopioBrowser >> bodyIn: constructor for: aNode [ aNode tags isNil ifFalse: [^self ]. - (constructor text) title: 'Texto '; format:[ @@ -247,16 +248,17 @@ browser andShow: [:a | self treeOn: a]. "Creating a self updatable body pane" (browser transmit) - from: #tree; + from: #tree port: #selection; to: #nodeBody; andShow: [ :a :node | self bodyIn: a for: node. self bodyForCodeIn: a for: node. - self bodyForTransmediaIn: a for: node ]. + self bodyForTransmediaIn: a for: node ]; + when: [:selection | selection notNil]. (browser transmit ) from: #tree port: #selection; from: #nodeBody port: #text; - when: [:node :text | text notNil]; + when: [:node :text | text notNil & node notNil]; to: #nodeBody port: #neverland; transformed: [:node :text | node body: text asString]. (browser transmit) @@ -266,7 +268,7 @@ browser (browser transmit ) from: #tree port: #selection; from: #nodeHeader port: #text; - when: [:node :text | text notNil]; + when: [:node :text | text notNil & node notNil]; to: #nodeHeader port: #neverland1; transformed: [:node :text | node header: text asString] ] @@ -960,24 +962,25 @@ GrafoscopioBrowser >> treeOn: constructor [ act: [self addToTagsAvailable] entitled: 'Agregar a disponibles' categorized: 'Etiquetas'; "For projects" - act: [self enableRepository] entitled: 'Activar proyecto local' categorized: 'Proyecto'; - act: [self messageNotImplementedYet] entitled: 'Activar proyecto remoto' categorized: 'Proyecto'; + act: [self enableRepository] entitled: 'Activar' categorized: 'Proyecto'; act: [self addFileToRepository] entitled: 'Agregar archivo' categorized: 'Proyecto'; act: [self messageNotImplementedYet] entitled: 'Eliminar archivo' categorized: 'Proyecto'; act: [self repositoryCommit] entitled: 'Enviar al histórico' categorized: 'Proyecto'; act: [self repositoryCredentials] entitled: 'Acreditarse' categorized: 'Proyecto'; - act: [self repositoryCredentials] entitled: 'Sincronizar local y remoto' categorized: 'Proyecto'; - + + "For modes" + act: [GrafoscopioBrowser new openFromFile: workingFile fullName asFileReference] entitled: 'Predeterminado' categorized: 'Modos'; + act: [self buildBrowserNamed: workingFile inMode: 'transmedia'] entitled: 'Transmedia' categorized: 'Modos'; + "For help" act: [self messageNotImplementedYet] entitled: 'Ver como html en línea' categorized: 'Ayuda'; act: [self messageNotImplementedYet] entitled: 'Ver como html fuera línea' categorized: 'Ayuda'; act: [self messageNotImplementedYet] entitled: 'Ver como árbol en grafoscopio' categorized: 'Ayuda'; "For external tools" - act: [self messageNotImplementedYet] entitled: 'Instalar' categorized: 'Herramientas externas'; act: [self messageNotImplementedYet] entitled: 'Actualizar' categorized: 'Herramientas externas'; act: [self configurePandoc] entitled: 'Definir ruta a pandoc' categorized: 'Herramientas externas'; - act: [self configureFossil] entitled: 'Definir ruta a fossil' categorized: 'Herramientas externas'; + act: [self messageNotImplementedYet] entitled: 'Definir ruta a fossil' categorized: 'Herramientas externas'; "For grafoscopio" act: [self updateGrafoscopio] entitled: 'Actualizar' categorized: 'Grafoscopio';