From 301d83fecdc613585cac83c24ee5915a4720285d Mon Sep 17 00:00:00 2001 From: Kris <1611248+Rinzwind@users.noreply.github.com> Date: Sun, 25 Aug 2024 23:16:37 +0200 Subject: [PATCH] =?UTF-8?q?Added=20=E2=80=98fileService=E2=80=99=20for=20P?= =?UTF-8?q?haroLauncherApplication=20allowing=20=E2=80=98.image=E2=80=99?= =?UTF-8?q?=20files=20to=20be=20opened=20through=20PhLLaunchImageFromDiskC?= =?UTF-8?q?ommand.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PharoLauncherApplication.class.st | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/PharoLauncher-Spec2/PharoLauncherApplication.class.st b/src/PharoLauncher-Spec2/PharoLauncherApplication.class.st index 4c660908..00997130 100644 --- a/src/PharoLauncher-Spec2/PharoLauncherApplication.class.st +++ b/src/PharoLauncher-Spec2/PharoLauncherApplication.class.st @@ -57,6 +57,17 @@ PharoLauncherApplication class >> defaultInitializationScriptLocation [ ^ FileLocator launcherUserFilesLocation / 'scripts' ] +{ #category : #'file service' } +PharoLauncherApplication class >> fileReaderServicesForFile: fullName suffix: suffix [ + + + + ^ suffix = 'image' + ifTrue: [ + { SimpleServiceEntry provider: self label: 'Launch image' selector: #launchImage: } ] + ifFalse: [ #() ] +] + { #category : #settings } PharoLauncherApplication class >> hardResetPersistanceState [ ^false @@ -116,6 +127,13 @@ PharoLauncherApplication class >> isDeployed [ ^ IsDeployed ifNil: [ IsDeployed := false ] ] +{ #category : #'file service' } +PharoLauncherApplication class >> launchImage: fullName [ + + (PhLLaunchImageFromDiskCommand forContext: self default mainPresenter) + launchImage: (PhLImage location: fullName asFileReference) +] + { #category : #'world menu' } PharoLauncherApplication class >> menuCommandOn: aBuilder [