Node links: Openning them in the browser. There is still variations to explore, if the link contains a file or a reference to an image.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2016-12-19 18:24:06 +00:00
parent 6259931a09
commit 08d48aed12
2 changed files with 18 additions and 0 deletions

View File

@ -696,6 +696,12 @@ GrafoscopioNode >> title [
^ header
]
{ #category : #operation }
GrafoscopioNode >> visitLastLink [
links ifNil: [ self inform: 'This node has no associated links to visit'. ^ self ].
[WebBrowser openOn: self lastLink] fork.
]
{ #category : #'add/remove nodes' }
GrafoscopioNode >> visitedGoTo: aCollection [
"Stores the current node in a collection and recursively stores its children"

View File

@ -289,6 +289,12 @@ GrafoscopioNotebook >> newWindowMainMenu [
description: 'Togle: code <--> text';
icon: MendaIcons new smalltalkCodeIcon;
action: [ self toggleCodeNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Visit link';
icon: Smalltalk ui icons glamorousRight;
action: [ self visitNodeLink ] ].
group addItem: [ :item |
item
name: nil;
@ -612,6 +618,12 @@ GrafoscopioNotebook >> updateForSpecialHeader [
self updateBodyFor: currentNode
]
{ #category : #'editing nodes' }
GrafoscopioNotebook >> visitNodeLink [
tree highlightedItem content visitLastLink.
]
{ #category : #accessing }
GrafoscopioNotebook >> windowMainMenu [
^ windowMainMenu