From 853f8523b5b5c96296af5ffcd20503dd031029c8 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 23 Jun 2015 19:23:22 +0000 Subject: [PATCH] Open files from web. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 270a95b..e5804f3 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -215,6 +215,7 @@ GrafoscopioBrowser class >> startDockingBar [ launchMenu add: 'Documento interactivo nuevo' target: GrafoscopioBrowser selector: #open; add: 'Documento interactivo desde archivo' target: (GrafoscopioBrowser new) selector: #openFromFileSelector; + add: 'Documento interactivo desde Internet' target: (GrafoscopioBrowser new) selector: #openFromUrlUi; add: 'Documentos interactivos recientes' target: GrafoscopioBrowser selector: #openFromRecentlyUsed; add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser selector: #messageNotImplementedYet; add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowser new) selector: #open; @@ -949,7 +950,7 @@ GrafoscopioBrowser >> openFromFileSelector [ self buildBrowserNamed: workingFile basenameWithIndicator. recentTrees isNil ifTrue:[recentTrees := OrderedCollection new]. - recentTrees add: workingFile. + recentTrees detect: workingFile ifFound: [recentTrees add: workingFile]. mainTree := GrafoscopioNode new header: 'Arbol principal'; level: 0. @@ -957,19 +958,6 @@ GrafoscopioBrowser >> openFromFileSelector [ browser openOn: mainTree children. ] -{ #category : #'as yet unclassified' } -GrafoscopioBrowser >> openFromURLUi [ - "This method generates the UI for the openFromUrl: method, it asks for a URL from the user" - - | fileUrl | - GrafoscopioBrowser configureSettings. - fileUrl := UIManager default - textEntry: 'Ingrese la URL' - title: 'Nuevo documento desde URL'. - fileUrl isNil ifTrue: [ ^nil ]. - GrafoscopioBrowser new openFromUrl: fileUrl -] - { #category : #persistence } GrafoscopioBrowser >> openFromUrl: anUrl [ "Opens a tree from a file named aFileName"