Fixing Open from the Internet menu and functionality.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-09-25 09:34:16 +00:00
parent fe07118f84
commit d781ecd873
3 changed files with 8 additions and 5 deletions

View File

@ -400,7 +400,7 @@ GrafoscopioDockingBar class >> showSettings [
Transcript show: pandoc Transcript show: pandoc
] ]
{ #category : #'graphical interface' } { #category : #accessing }
GrafoscopioDockingBar class >> start [ GrafoscopioDockingBar class >> start [
"Creates a custom docking bar for grafoscopio on top, for shorcuts to the most used actions, "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" and as a fixed place for asking for help, external tools and grafoscopio updates and about"
@ -411,7 +411,7 @@ GrafoscopioDockingBar class >> start [
launchMenu launchMenu
add: 'New notebook' target: (GrafoscopioNotebook new) selector: #openDefault; add: 'New notebook' target: (GrafoscopioNotebook new) selector: #openDefault;
add: 'Notebook from file...' target: (GrafoscopioNotebook new) selector: #openFromFileSelector; 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: 'Recent notebooks...' target: self selector: #openFromRecentlyUsed;
add: 'Example notebooks...' target: self selector: #messageNotImplementedYet; add: 'Example notebooks...' target: self selector: #messageNotImplementedYet;
add: 'Roassal visualizations gallery' target: (RTExampleBrowser new) selector: #open; add: 'Roassal visualizations gallery' target: (RTExampleBrowser new) selector: #open;

View File

@ -269,8 +269,9 @@ GrafoscopioNotebook >> findAndReplace [
currentNode := tree highlightedItem content. currentNode := tree highlightedItem content.
replaceGUI := GrafoscopioReplace new. replaceGUI := GrafoscopioReplace new.
replaceGUI openWithSpec. replaceGUI openWithSpec.
replaceGUI ok state replaceGUI ok
whenChangedDo: [ on: [ ]
do: [
findString := replaceGUI returnValues at: 'find'. findString := replaceGUI returnValues at: 'find'.
replaceString := replaceGUI returnValues at: 'replace'. replaceString := replaceGUI returnValues at: 'replace'.
currentNode find: findString andReplaceWith: replaceString. ] currentNode find: findString andReplaceWith: replaceString. ]

View File

@ -49,7 +49,8 @@ GrafoscopioReplace >> find: anObject [
GrafoscopioReplace >> initializePresenter [ GrafoscopioReplace >> initializePresenter [
"Here we need to deal with changes in the OK button to send messages about the "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." 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. autoAccept: true.
ok := self newButton ok := self newButton
label: 'OK'; label: 'OK';
state: false;
action: [ action: [
ok state: true. ok state: true.
self window close. ] . self window close. ] .