Skip to content

Commit

Permalink
It often happens to me or other people I know to edit the title of a …
Browse files Browse the repository at this point in the history
…window to copy it.

In this PR I propose to directly add a command to copy the title of a window via the little arrow at the top right of the window.
  • Loading branch information
jecisc committed Sep 24, 2019
1 parent 404c76e commit 07e79f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Morphic-Widgets-Windows/SystemWindow.class.st
Expand Up @@ -438,8 +438,10 @@ SystemWindow class >> windowMenuOn: aBuilder [
action: [ aBuilder model showAbout ];
iconName: #smallHelpIcon;
withSeparatorAfter.
(aBuilder item: #'Change title...')
action: [ aBuilder model relabel ];
(aBuilder item: #'Change title')
action: [ aBuilder model relabel ].
(aBuilder item: #'Copy title')
action: [ aBuilder model copyTitle ];
withSeparatorAfter.
(aBuilder item: #'Send to back')
action: [ aBuilder model sendToBack ].
Expand Down Expand Up @@ -788,6 +790,12 @@ SystemWindow >> colorForInsets [
^self paneColor colorForInsets
]

{ #category : #label }
SystemWindow >> copyTitle [
Clipboard clipboardText: self label.
self inform: 'Window title copied.'
]

{ #category : #initialization }
SystemWindow >> createBox [
"create a button with default to be used in the label area"
Expand Down

0 comments on commit 07e79f6

Please sign in to comment.