class: FileApplicationNoteBook
changed: #openApplByFileItem:
fixed double click on a pdf or similar to open a system utility.
--- a/FileApplicationNoteBook.st Sat Jun 14 01:36:49 2014 +0200
+++ b/FileApplicationNoteBook.st Sat Jun 14 10:59:29 2014 +0200
@@ -526,8 +526,8 @@
self openAlwaysInTextEditor value ifFalse:[
applList := self applicationList.
applItem := applList
- detect:[: aApplItem|
- itemClass := self class classFor:aApplItem.
+ detect:[:eachApplItem|
+ itemClass := self class classFor:eachApplItem.
(itemClass canOpenItem:anItem).
] ifNone:[nil].
@@ -541,6 +541,13 @@
appl notNil ifTrue:[ ^ appl].
].
].
+ "/ fallback: open a system utility
+ OperatingSystem
+ openApplicationForDocument:anItem fileName
+ operation:#open
+ mimeType:nil
+ ifNone:[self openDefaultApplicationByItem:anItem].
+ ^ self.
].
^ self openDefaultApplicationByItem:anItem.
@@ -6856,8 +6863,8 @@
^
#(
- #(#'application/postscript' #gv )
- #(#'application/pdf' #acroread )
+ #(#'application/postscript' 'gv %1' )
+ #(#'application/pdf' 'acroread %1' )
)
!
@@ -6981,7 +6988,7 @@
(self mimeTypeUnixApplicationMapping contains:[ : el | (el at:1) == keySym ]) ifFalse:[^ false].
(OperatingSystem executeCommand:('which ', self unixVNCCommand)) ifFalse:[
- Dialog warn:'Cannot start a viewer for ' , anItem fileName baseName.
+ "/ Dialog warn:'Cannot start a viewer for ' , anItem fileName baseName.
^ false.
].
@@ -7334,10 +7341,10 @@
!FileApplicationNoteBook class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.294 2014-06-05 18:25:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.295 2014-06-14 08:59:29 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.294 2014-06-05 18:25:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.295 2014-06-14 08:59:29 cg Exp $'
! !