class definition
added: #autoFetchSelectionLines
changed:
#editMenu
#itemFromClipboard
--- a/WorkspaceApplication.st Fri Feb 04 14:04:15 2011 +0100
+++ b/WorkspaceApplication.st Fri Feb 04 17:54:23 2011 +0100
@@ -14,7 +14,8 @@
MultiViewToolApplication subclass:#WorkspaceApplication
instanceVariableNames:'autoDefineVariables syntaxHolder poolsConsideredInDoIts
smalltalkMenuEnabledHolder clipBoardWatcherProcess
- cursorLineHolder cursorColHolder modeLabelHolder'
+ fetchClipboardLines cursorLineHolder cursorColHolder
+ modeLabelHolder'
classVariableNames:'LastFilterBlockString LastProcessingBlockString LastTeaWaitTime
DefaultToolBarVisible ClipBoardFetchingInstance LastLanguage'
poolDictionaries:''
@@ -670,6 +671,11 @@
indication: autoFetchSelection
)
(MenuItem
+ label: 'Autofetch Selection (Lines)'
+ translateLabel: true
+ indication: autoFetchSelectionLines
+ )
+ (MenuItem
label: '-'
isVisible: thisIsASmalltalkWorkspace
)
@@ -767,8 +773,6 @@
nil
nil
)
-
- "Modified: / 16-11-2010 / 15:28:37 / cg"
!
editModeInfoLabelMenu
@@ -1885,15 +1889,28 @@
"Created: / 16-11-2010 / 14:34:15 / cg"
!
+autoFetchSelectionLines
+ fetchClipboardLines isNil ifTrue:[
+ fetchClipboardLines := true asValue
+ ].
+ ^ fetchClipboardLines
+
+ "Created: / 04-02-2011 / 17:52:34 / cg"
+!
+
itemFromClipboard
|text|
text := self window getClipboardText.
(text notNil and:[text isString]) ifTrue:[
+ self autoFetchSelectionLines value ifTrue:[
+ text := text , Character cr
+ ].
self paste:text.
].
"Created: / 16-11-2010 / 14:44:26 / cg"
+ "Modified: / 04-02-2011 / 17:53:46 / cg"
!
startClipboardWatcher
@@ -3239,9 +3256,9 @@
!WorkspaceApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.198 2011-01-22 11:12:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.199 2011-02-04 16:54:23 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.198 2011-01-22 11:12:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.199 2011-02-04 16:54:23 cg Exp $'
! !