From d781ecd8730ef7986d20e7322908736f06a250bb Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Mon, 25 Sep 2017 09:34:16 +0000 Subject: [PATCH] Fixing Open from the Internet menu and functionality. --- repository/Grafoscopio/GrafoscopioDockingBar.class.st | 4 ++-- repository/Grafoscopio/GrafoscopioNotebook.class.st | 5 +++-- repository/Grafoscopio/GrafoscopioReplace.class.st | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioDockingBar.class.st b/repository/Grafoscopio/GrafoscopioDockingBar.class.st index e5eddc5..1f616b6 100644 --- a/repository/Grafoscopio/GrafoscopioDockingBar.class.st +++ b/repository/Grafoscopio/GrafoscopioDockingBar.class.st @@ -400,7 +400,7 @@ GrafoscopioDockingBar class >> showSettings [ Transcript show: pandoc ] -{ #category : #'graphical interface' } +{ #category : #accessing } GrafoscopioDockingBar class >> start [ "Creates a custom docking bar for grafoscopio on top, for shorcuts to the most used actions, and as a fixed place for asking for help, external tools and grafoscopio updates and about" @@ -411,7 +411,7 @@ GrafoscopioDockingBar class >> start [ 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: 'Notebook from the 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; diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index c9a80a4..7c2927c 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -269,8 +269,9 @@ GrafoscopioNotebook >> findAndReplace [ currentNode := tree highlightedItem content. replaceGUI := GrafoscopioReplace new. replaceGUI openWithSpec. - replaceGUI ok state - whenChangedDo: [ + replaceGUI ok + on: [ ] + do: [ findString := replaceGUI returnValues at: 'find'. replaceString := replaceGUI returnValues at: 'replace'. currentNode find: findString andReplaceWith: replaceString. ] diff --git a/repository/Grafoscopio/GrafoscopioReplace.class.st b/repository/Grafoscopio/GrafoscopioReplace.class.st index f16256c..4c23603 100644 --- a/repository/Grafoscopio/GrafoscopioReplace.class.st +++ b/repository/Grafoscopio/GrafoscopioReplace.class.st @@ -49,7 +49,8 @@ GrafoscopioReplace >> find: anObject [ GrafoscopioReplace >> initializePresenter [ "Here we need to deal with changes in the OK button to send messages about the state of the 'find' and 'replace' variables or do nothing if 'Cancel' is pressed." - self shouldBeImplemented + ok whenStateChangedDo: [ + Transcript show: 'OK Clicked!' ] ] @@ -63,6 +64,7 @@ GrafoscopioReplace >> initializeWidgets [ autoAccept: true. ok := self newButton label: 'OK'; + state: false; action: [ ok state: true. self window close. ] .