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.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-05-04 10:44:17 +00:00
parent 4d80e0cc09
commit 6bda053b31
5 changed files with 12 additions and 13 deletions

View File

@ -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].

View File

@ -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!' ]

View File

@ -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.
]

View File

@ -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 }

View File

@ -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