-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
src/Squot.package/SquotAssetBrowser.class/instance/actionMove.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
actions | ||
actionMove | ||
| newPath | | ||
self selectedMapper ifNil: [^ self inform: 'Please select an asset first.']. | ||
newPath := (self activeWorkingCopy | ||
requestUnmappedPathWithTitle: | ||
('New path for asset ''{1}'':' format: {self selectedMapper printStringWithoutPath}) | ||
initialAnswer: (SquotPathUtilities asString: self selectedMapper path)) | ||
ifNil: [^ self]. | ||
self selectedMapper moveTo: newPath in: self activeWorkingCopy. | ||
self changed: #selectedAsset. "path changed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Squot.package/SquotAssetBrowser.class/instance/buildMoveButton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
toolbuilder | ||
buildMoveButton: builder | ||
^ builder pluggableActionButtonSpec new | ||
model: self; | ||
action: #actionMove; | ||
label: 'Move asset'; | ||
yourself |
3 changes: 1 addition & 2 deletions
3
src/Squot.package/SquotAssetBrowser.class/instance/chooseFromMappers.title..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
importing | ||
chooseFromMappers: aCollection title: aString | ||
^ UIManager default | ||
chooseFrom: (aCollection collect: [:each | | ||
String streamContents: [:stream | each printWithoutPathOn: stream]]) | ||
chooseFrom: (aCollection collect: #printStringWithoutPath) | ||
values: aCollection | ||
title: aString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotAssetMapper.class/instance/printStringWithoutPath.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
printing | ||
printStringWithoutPath | ||
^ String streamContents: [:stream | self printWithoutPathOn: stream] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters