From 6bda053b312171e0da0c156a0593cf869c806054 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Thu, 4 May 2017 10:44:17 +0000 Subject: [PATCH] Open PDF's now relies on WebBrowser instead of OSProcess. This makes it more crossplatform and removes a depedency. OSSubProcess will be explored in the future for Pandoc/Fossil interaction. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 2 +- .../Grafoscopio/GrafoscopioDockingBar.class.st | 2 +- .../GrafoscopioDocumentation.class.st | 3 +-- repository/Grafoscopio/GrafoscopioNode.class.st | 2 +- .../Grafoscopio/GrafoscopioNotebook.class.st | 16 ++++++++-------- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 6b82125..ae1b7cc 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -36,7 +36,7 @@ GrafoscopioBrowser >> addTagTo: aNode [ tagsAvailable isNil ifFalse: [ - selection := UIManager default chooseFrom: tagsAvailable title: 'Elija una etiqueta'. + selection := UIManager default chooseFrom: tagsAvailable title: 'Choose a tag'. aNode tagAs: (tagsAvailable at: selection) ] ifTrue: [self messageNoTagsAvailable]. diff --git a/repository/Grafoscopio/GrafoscopioDockingBar.class.st b/repository/Grafoscopio/GrafoscopioDockingBar.class.st index 6f38807..eceeb6b 100644 --- a/repository/Grafoscopio/GrafoscopioDockingBar.class.st +++ b/repository/Grafoscopio/GrafoscopioDockingBar.class.st @@ -395,7 +395,7 @@ GrafoscopioDockingBar class >> openFromRecentlyUsed [ self recentNotebooks ifNotEmpty: [ - selection := UIManager default chooseFrom: recentNotebooks title: 'Elija una documento'. + selection := UIManager default chooseFrom: recentNotebooks title: 'Choose a notebook'. selection > 0 ifTrue: [ GrafoscopioNotebook new openFromFile: (recentNotebooks at: selection)] ifFalse: [ self inform: 'No notebook selected!' ] diff --git a/repository/Grafoscopio/GrafoscopioDocumentation.class.st b/repository/Grafoscopio/GrafoscopioDocumentation.class.st index 26b038b..73f7290 100644 --- a/repository/Grafoscopio/GrafoscopioDocumentation.class.st +++ b/repository/Grafoscopio/GrafoscopioDocumentation.class.st @@ -128,8 +128,7 @@ GrafoscopioDocumentation class >> openPDFManual [ to have truly multiplatform support" | pdfManual docs | docs := self current. - pdfManual := docs documents at: 4. - "UnixProcess command: 'xdg-open ', (docs localPlace / pdfManual) fullName." + pdfManual := docs documents at: 4. WebBrowser openOn: (docs localPlace / pdfManual) fullName. ] diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index 9162535..11db8e6 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -604,7 +604,7 @@ GrafoscopioNode >> localFilesLinks [ "I collect all the links that point to the local file system. Because is supposed that links contains only references to remote URL or local files, anything that is not a URL is treated as a loca file link." - ^ self links reject: [ :l | l asZnUrl host isNil ] + ^ self links collect: [ :l | l asZnUrl host isNil ] ] { #category : #exporting } diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index afc9bcf..9c0aedc 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -356,43 +356,43 @@ GrafoscopioNotebook >> notebookSubMenu [ group addItem: [ :item | item name: 'Save'; - icon: Smalltalk ui icons smallSaveIcon; + icon: (Smalltalk ui icons iconNamed: #smallSave); shortcut: $s command; action: [ self saveWorkingNotebook ] ]. group addItem: [ :item | item name: 'Save as...'; - icon: Smalltalk ui icons smallSaveAsIcon; + icon: (Smalltalk ui icons iconNamed: #smallSaveAs); action: [ self saveToFileUI ] ]. group addItem: [ :item | item name: 'Export as markdown'; - icon: Smalltalk ui icons smallSaveAsIcon; + icon: (Smalltalk ui icons iconNamed: #smallSaveAs); action: [ self exportAsMarkdown ] ]. group addItem: [ :item | item name: 'Export as html'; - icon: Smalltalk ui icons smallWindowIcon; + icon: (Smalltalk ui icons iconNamed: #smallWindow); action: [ self exportAsHTML ]]. group addItem: [ :item | item name: 'Export as LaTeX'; - icon: Smalltalk ui icons smallPrintIcon; + icon: (Smalltalk ui icons iconNamed: #smallPrint); action: [ self exportAsLaTeX ]]. group addItem: [ :item | item name: 'Export as pdf'; - icon: Smalltalk ui icons smallPrintIcon; + icon: (Smalltalk ui icons iconNamed: #smallPrint); action: [ self exportAsPDF ] ]. group addItem: [ :item | item name: 'See html'; - icon: Smalltalk ui icons smallInspectItIcon; + icon: (Smalltalk ui icons iconNamed: #smallInspectIt); action: [ self inform: 'To be implemented...']]. group addItem: [ :item | item name: 'See pdf'; - icon: Smalltalk ui icons smallInspectItIcon; + icon: (Smalltalk ui icons iconNamed: #smallInspectIt); action: [ self inform: 'To be implemented...' ]]. group addItem: [ :item | item