equal
deleted
inserted
replaced
3232 #SelectLineFromBeginning |
3232 #SelectLineFromBeginning |
3233 #LearnKeyboardMacro #ExecuteKeyboardMacro |
3233 #LearnKeyboardMacro #ExecuteKeyboardMacro |
3234 #'F*' #'f*')> |
3234 #'F*' #'f*')> |
3235 |
3235 |
3236 |sensor n fKeyMacros shifted i |
3236 |sensor n fKeyMacros shifted i |
3237 selStartLine selEndLine selStartCol selEndCol sel event| |
3237 selStartLine selEndLine selStartCol selEndCol sel event cmdMacro| |
3238 |
3238 |
3239 event := WindowGroup lastEventQuerySignal query. |
3239 event := WindowGroup lastEventQuerySignal query. |
3240 shifted := event hasShift. |
3240 shifted := event hasShift. |
|
3241 |
|
3242 cmdMacro := UserPreferences current functionKeySequences at:key ifAbsent:nil. |
|
3243 cmdMacro notNil ifTrue:[ |
|
3244 AbortSignal handle:[:ex | |
|
3245 self warn:'error occurred in keyboard macro'. |
|
3246 ex return. |
|
3247 ] do:[ |
|
3248 Parser |
|
3249 evaluate:cmdMacro asString |
|
3250 receiver:self |
|
3251 notifying:nil |
|
3252 compile:false. |
|
3253 ]. |
|
3254 ^ self |
|
3255 ]. |
3241 |
3256 |
3242 (key == #BackSpace |
3257 (key == #BackSpace |
3243 or:[key == #BasicBackspace]) ifTrue:[ |
3258 or:[key == #BasicBackspace]) ifTrue:[ |
3244 selectionStartLine notNil ifTrue:[ |
3259 selectionStartLine notNil ifTrue:[ |
3245 (key == #BasicBackspace) ifTrue:[ |
3260 (key == #BasicBackspace) ifTrue:[ |
4011 ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[ |
4026 ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[ |
4012 items := #( |
4027 items := #( |
4013 ('Again (for all)' multipleAgain) |
4028 ('Again (for all)' multipleAgain) |
4014 ). |
4029 ). |
4015 ] ifFalse:[ |
4030 ] ifFalse:[ |
4016 undoAction notNil ifTrue:[ |
|
4017 ]. |
|
4018 |
|
4019 items := #( |
4031 items := #( |
|
4032 ('Undo' undo ) |
4020 ('Again' again Again ) |
4033 ('Again' again Again ) |
4021 ('-' ) |
4034 ('-' ) |
4022 ('Copy' copySelection Copy ) |
4035 ('Copy' copySelection Copy ) |
4023 ('Cut' cut Cut ) |
4036 ('Cut' cut Cut ) |
4024 ('Paste' pasteOrReplace Paste ) |
4037 ('Paste' pasteOrReplace Paste ) |
4025 ('-' ) |
4038 ('-' ) |
4026 ('Accept' accept Accept ) |
4039 ('Accept' accept Accept ) |
4027 ('=' ) |
4040 ('=' ) |
4028 ('Others' others ) |
4041 ('Others' others ) |
4029 ). |
4042 ). |
4030 undoAction notNil ifTrue:[ |
|
4031 items := #( |
|
4032 ('Undo' undo ) |
|
4033 ) , items |
|
4034 ]. |
|
4035 |
|
4036 ]. |
4043 ]. |
4037 |
4044 |
4038 m := PopUpMenu itemList:items resources:resources. |
4045 m := PopUpMenu itemList:items resources:resources. |
4039 |
4046 |
4040 items := #( |
4047 items := #( |
4061 m disableAll:#(paste pasteOrReplace cut indent autoIndent: insertMode:) |
4068 m disableAll:#(paste pasteOrReplace cut indent autoIndent: insertMode:) |
4062 ]. |
4069 ]. |
4063 self hasSelectionForCopy not ifTrue:[ |
4070 self hasSelectionForCopy not ifTrue:[ |
4064 m disable:#copySelection. |
4071 m disable:#copySelection. |
4065 ]. |
4072 ]. |
4066 self hasSelection not ifTrue:[ |
4073 self hasSelection ifFalse:[ |
4067 m disable:#cut. |
4074 m disable:#cut. |
4068 ]. |
4075 ]. |
4069 (undoAction isNil) ifTrue:[ |
4076 (undoAction isNil) ifTrue:[ |
4070 m disable:#undo. |
4077 m disable:#undo. |
4071 ]. |
4078 ]. |
4965 ! ! |
4972 ! ! |
4966 |
4973 |
4967 !EditTextView class methodsFor:'documentation'! |
4974 !EditTextView class methodsFor:'documentation'! |
4968 |
4975 |
4969 version |
4976 version |
4970 ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.253 2001-09-24 08:04:22 cg Exp $' |
4977 ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.254 2001-10-02 16:30:08 cg Exp $' |
4971 ! ! |
4978 ! ! |