--- a/EditTextView.st Thu Jun 21 18:40:23 2018 +0200
+++ b/EditTextView.st Thu Jun 21 18:41:38 2018 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -6816,10 +6814,15 @@
('Rot13' selectionRot13 )
).
+ toolItems := toolItems , #(
+ ('-' )
+ ('Open FileBrowser on It' openFileBrowserOnIt )
+ ('Open WebBrowser on It' openWebBrowserOnIt )
+ ).
+
Smalltalk isStandAloneApp ifFalse:[
toolItems := toolItems , #(
('-' )
- ('Open FileBrowser on It' openFileBrowserOnIt )
('Open Workspace with It' openWorkspaceWithIt )
('Inspect Selected String' inspectSelectedString )
).
@@ -6917,6 +6920,7 @@
].
self hasSelection ifFalse:[
m disableAll:#(cut googleSpellingSuggestion babelFishTranslateMenu openFileBrowserOnIt
+ openWebBrowserOnIt
openWorkspaceWithIt sortMenu indent splitLinesAtCharacterOrString inspectSelectedString
convertMenu).
] ifTrue:[
@@ -6928,6 +6932,15 @@
fn asFilename exists or:[ fn withoutSeparators withoutQuotes asFilename exists ]
]) ifFalse:[
m disableAll:#(openFileBrowserOnIt).
+ ].
+ (Error handle:[:ex |
+ ex return:false
+ ] do:[
+ |fn|
+ fn := self selectionAsString.
+ #('http' 'https' 'ftp') includes:fn asURL method
+ ]) ifFalse:[
+ m disableAll:#(openWebBrowserOnIt).
]
].
self hasUndoAction ifFalse:[
@@ -6954,6 +6967,7 @@
^ m.
"Modified: / 30-11-2017 / 15:06:03 / cg"
+ "Modified: / 21-06-2018 / 18:41:20 / Claus Gittinger"
!
getTextSelectionFromHistory