Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Playground shortcut #16422

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Deprecated12/ToolShortcutsCategory.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'ToolShortcutsCategory' }

{ #category : '*Deprecated12' }
ToolShortcutsCategory >> openWorkspace [

<shortcut>
^ KMKeymap shortcut: $o meta, $w meta action: [ self tools workspace open ]
]
4 changes: 2 additions & 2 deletions src/MenuRegistration/MenuRegistrationExample.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ MenuRegistrationExample class >> mostUsedToolsOn: aBuilder [
(aBuilder item: #'System browser')
selector: #openClassBrowser;
icon: (aBuilder iconNamed: Smalltalk tools browser taskbarIconName).
(aBuilder item: #Workspace)
selector: #openWorkspace;
(aBuilder item: #Playground)
selector: #openPlayground;
icon: (aBuilder iconNamed: Smalltalk tools workspace taskbarIconName).
]
]
Expand Down
14 changes: 7 additions & 7 deletions src/Morphic-Base/Object.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ Object >> taskbarIcon [
]

{ #category : '*Morphic-Base' }
Object >> taskbarIconName [
"Answer the icon for the receiver in a task bar
or nil for the default."
Object class >> taskbarIconName [
"Answer the icon for an instance of the receiver in a task bar"

^self class taskbarIconName
^#smallWindow
]

{ #category : '*Morphic-Base' }
Object class >> taskbarIconName [
"Answer the icon for an instance of the receiver in a task bar"
Object >> taskbarIconName [
"Answer the icon for the receiver in a task bar
or nil for the default."

^#smallWindow
^self class taskbarIconName
]

{ #category : '*Morphic-Base' }
Expand Down
2 changes: 1 addition & 1 deletion src/Morphic-Base/PluggableMenuSpec.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PluggableMenuSpec class >> exampleWithSubMenu [
i := s add: 'Tools'.
sub := (self withModel: nil ).
sub add: 'System browser' target: Smalltalk tools selector: #openClassBrowser argumentList: #().
sub add: 'Workspace' target: Smalltalk tools selector: #openWorkspace argumentList: #().
sub add: 'Playground' target: Smalltalk tools selector: #openPlayground argumentList: #().
i subMenu: sub.
s asMenuMorph popUpInWorld
]
Expand Down
2 changes: 1 addition & 1 deletion src/Tool-Base/PharoShortcuts.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ PharoShortcuts >> openFontMenuShortcut [

{ #category : 'keymaps - Tools' }
PharoShortcuts >> openPlaygroundShortcut [
^ $o meta, $w meta
^ $o meta, $p meta
]

{ #category : 'keymaps - Tools' }
Expand Down
16 changes: 7 additions & 9 deletions src/Tool-Base/ToolShortcutsCategory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ ToolShortcutsCategory class >> isGlobalCategory [
^ true
]

{ #category : 'keymaps' }
ToolShortcutsCategory >> openPlayground [

<shortcut>
^ KMKeymap shortcut: PharoShortcuts current openPlaygroundShortcut action: [ self tools workspace open ]
]

{ #category : 'keymaps' }
ToolShortcutsCategory >> openSettings [
<shortcut>
Expand Down Expand Up @@ -48,15 +55,6 @@ ToolShortcutsCategory >> openUnitTestRunner [
action: [ self tools openTestRunner ]
]

{ #category : 'keymaps' }
ToolShortcutsCategory >> openWorkspace [

<shortcut>
^ KMKeymap
shortcut: PharoShortcuts current openPlaygroundShortcut
action: [ self tools workspace open ]
]

{ #category : 'keymaps' }
ToolShortcutsCategory >> saveImage [
<shortcut>
Expand Down
2 changes: 1 addition & 1 deletion src/Tool-Registry/ToolRegistry.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ ToolRegistry >> menuItems [
^#(
('System Browser' #openClassBrowser)
-
('Playground' #openWorkspace)
('Playground' #openPlayground)
('Transcript' #openTranscript)
('File Browser' #openFileList)
-
Expand Down