'From etoys3.0 of 24 February 2008 [latest update: #1985] on 23 April 2008 at 6:23:07 pm'! "Change Set: transTriggers2-KR Date: 23 April 2008 Author: Korakurider - fix typo 'keystroke' to 'keyStroke' brought by 1985transTriggers-KR-2 - translate helpStrinsg for event of Morphs. Those will be shown in #explainStatusAlternatives - translate balloonHelp for some preferences "! !ConnectorsInfo class methodsFor: 'installation' stamp: 'KR 4/23/2008 18:21'! postInstall self createConnectorsFlaps. Preferences addPreference: #useSmartLabels category: 'Connectors' default: false balloonHelp: 'if set, Connectors will use labels that try to re-position themselves to stay out of the way.' translatedNoop! ! !GeeMailMorph class methodsFor: '*customevents-class initialization' stamp: 'KR 4/23/2008 12:59'! initialize "AlansTextPlusMorph initialize" #('scrolledIntoView' 'scrolledOutOfView') translatedNoop. ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' translatedNoop targetMorphClass: self. ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' translatedNoop targetMorphClass: self. ! ! !InternetConfiguration class methodsFor: 'initialize-release' stamp: 'KR 4/23/2008 18:21'! initialize "self initialize" Preferences addPreference: #enableInternetConfig category: #general default: false balloonHelp: 'If true, set http proxy automatically on startUp. Only works on MacOS X for now' translatedNoop. Smalltalk addToStartUpList: self. Smalltalk addToShutDownList: self.! ! !NCAAConnectorMorph class methodsFor: 'class initialization' stamp: 'KR 4/23/2008 18:20'! initialize "NCAAConnectorMorph initialize" Preferences addPreference: #useSmartLabels category: 'connectors' default: false balloonHelp: 'if set, Connectors will use labels that try to re-position themselves to stay out of the way.' translatedNoop. Preferences addPreference: #alwaysShowConnectionVocabulary category: 'connectors' default: false balloonHelp: 'if set, viewers will display the ''connection'' vocabulary even for Morphs that aren''t connected to by Connectors.' translatedNoop. #('connectedTo' 'disconnectedFrom' 'sourceConnected' 'sourceDisconnecting' 'destinationConnected' 'destinationDisconnecting' 'attachmentOwnerChanged') translatedNoop. ScriptingSystem addCustomEventFor: self named: #connectedTo help: 'immediately after a connector has connected to me' translatedNoop targetMorphClass: Morph. ScriptingSystem addCustomEventFor: self named: #disconnectedFrom help: 'immediately before a connector is going to disconnect from me' translatedNoop targetMorphClass: Morph. ScriptingSystem addCustomEventFor: self named: #sourceConnected help: 'immediately after my first end has been connected' translatedNoop targetMorphClass: self. ScriptingSystem addCustomEventFor: self named: #sourceDisconnecting help: 'immediately before my first end is going to be disconnected' translatedNoop targetMorphClass: self. ScriptingSystem addCustomEventFor: self named: #destinationConnected help: 'immediately after my second end has been connected' translatedNoop targetMorphClass: self. ScriptingSystem addCustomEventFor: self named: #destinationDisconnecting help: 'immediately before my second end is going to be disconnected' translatedNoop targetMorphClass: self. ScriptingSystem addCustomEventFor: self named: #attachmentOwnerChanged help: 'when either of the morphs to which I''m connected have changed their owner or been grabbed or dropped with the hand.' translatedNoop targetMorphClass: self. Smalltalk addToStartUpList: self. self initializeArrowDictionary.! ! !NCTextMorph class methodsFor: 'class initialization' stamp: 'KR 4/23/2008 12:57'! initialize #('acceptedTextContents') translatedNoop. "NCTextMorph initialize" ScriptingSystem addCustomEventFor: self named: #acceptedTextContents help: 'when text is accepted into a text morph by hitting Enter or losing focus' translatedNoop targetMorphClass: self. ! ! !NCDisplayTextMorph class methodsFor: 'class initialization' stamp: 'KR 4/23/2008 12:58'! initialize "NCDisplayTextMorph initialize" #('acceptedTextContents') translatedNoop. ScriptingSystem addCustomEventFor: self named: #acceptedTextContents help: 'when text is accepted into a text morph by hitting Enter or losing focus' translatedNoop targetMorphClass: self. ! ! !PasteUpMorph class methodsFor: 'class initialization' stamp: 'KR 4/23/2008 12:57'! initialize "Initialize the class" #('keyStroke') translatedNoop. self registerInFlapsRegistry. ScriptingSystem addCustomEventFor: self named: #keyStroke help: 'when a keystroke happens and nobody heard it' translatedNoop targetMorphClass: PasteUpMorph.! ! !Preferences class methodsFor: 'get/set' stamp: 'KR 4/23/2008 18:22'! disable: aSymbol "Shorthand access to enabling a preference of the given name. If there is none in the image, conjure one up" | aPreference | aPreference _ self preferenceAt: aSymbol ifAbsent: [self addPreference: aSymbol category: 'unclassified' default: false balloonHelp: 'this preference was added idiosyncratically and has no help message.' translatedNoop. self preferenceAt: aSymbol]. aPreference preferenceValue: false! ! !Preferences class methodsFor: 'get/set' stamp: 'KR 4/23/2008 18:22'! enable: aSymbol "Shorthand access to enabling a preference of the given name. If there is none in the image, conjure one up" | aPreference | aPreference _ self preferenceAt: aSymbol ifAbsent: [self addPreference: aSymbol category: 'unclassified' default: true balloonHelp: 'this preference was added idiosyncratically and has no help message.' translatedNoop. self preferenceAt: aSymbol]. aPreference preferenceValue: true! ! !Preferences class methodsFor: 'initialization' stamp: 'KR 4/23/2008 18:21'! addPreferenceForCelesteShowingAttachmentsFlag "Assure the existence of a preference governing the showing of the celeste attachments flag" "Preferences addPreferenceForCelesteShowingAttachmentsFlag" self preferenceAt: #celesteShowsAttachmentsFlag ifAbsent: [self addPreference: #celesteShowsAttachmentsFlag category: #general default: false balloonHelp: 'If true, Celeste (e-mail reader) annotates messages in it''s list that have attachments. This is a performance hit and by default is off.' translatedNoop ]! ! !Preferences class methodsFor: 'initialization' stamp: 'KR 4/23/2008 18:21'! addPreferenceForOptionalCelesteStatusPane "Assure existence of a preference that governs the optional celeste status pane" "Preferences addPreferenceForOptionalCelesteStatusPane" self preferenceAt: #celesteHasStatusPane ifAbsent: [self addPreference: #celesteHasStatusPane category: #general default: false balloonHelp: 'If true, Celeste (e-mail reader) includes a status pane.' translatedNoop "Because Lex doesn't like it the default is false :)"]! ! !StandardScriptingSystem methodsFor: '*customevents-custom events' stamp: 'KR 4/23/2008 13:01'! customEventNamesAndHelpStringsFor: aPlayer | retval help helpStrings morph | morph := aPlayer costume renderedMorph. retval := SortedCollection sortBlock: [ :a :b | a first < b first ]. self customEventsRegistry keysAndValuesDo: [ :k :v | helpStrings := Array streamContents: [ :hsStream | v keysAndValuesDo: [ :registrant :array | (morph isKindOf: array second) ifTrue: [ help := String streamContents: [ :stream | v size > 1 ifTrue: [ stream nextPut: $(; nextPutAll: array second name translated; nextPut: $); space ]. stream nextPutAll: array first translated]. hsStream nextPut: help]]]. helpStrings isEmpty ifFalse: [retval add: { k. helpStrings } ]]. ^ retval! ! !StandardScriptingSystem methodsFor: '*customevents-help dictionary' stamp: 'KR 4/23/2008 17:58'! statusHelpStringFor: aPlayer | helps | helps := #(#('normal' 'run when called') #('paused' 'ready to run all the time') #('ticking' 'run all the time') #('mouseDown' 'run when mouse goes down on me') #('mouseStillDown' 'while mouse still down') #('mouseUp' 'when mouse comes back up') #('mouseEnter' 'when mouse enters my bounds, button up') #('mouseLeave' 'when mouse exits my bounds, button up') #('mouseEnterDragging' 'when mouse enters my bounds, button down') #('mouseLeaveDragging' 'when mouse exits my bounds, button down') #('opening' 'when I am being opened') #('closing' 'when I am being closed' )) translatedNoop. ^String streamContents: [ :stream | helps do: [:h | stream nextPutAll: h first translated; nextPutAll: ' -- '; nextPutAll: h second translated; cr]. "'normal -- run when called paused -- ready to run all the time ticking -- run all the time mouseDown -- run when mouse goes down on me mouseStillDown -- while mouse still down mouseUp -- when mouse comes back up mouseEnter -- when mouse enters my bounds, button up mouseLeave -- when mouse exits my bounds, button up mouseEnterDragging -- when mouse enters my bounds, button down mouseLeaveDragging -- when mouse exits my bounds, button down opening -- when I am being opened closing -- when I am being closed' translated." "'keyStroke -- run when user hits a key' " stream cr; cr; nextPutAll: 'More events:' translated; cr. (self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array | stream cr; nextPutAll: array first translated; nextPutAll: ' -- '. "now 'help' has been translated until returned from #customEventNamesAndHelpStringsFor: " array second do: [ :help | stream nextPutAll: help] separatedBy: [ stream nextPutAll: ' or ' translated ]]. (Preferences allowEtoyUserCustomEvents) ifTrue: [ self userCustomEventNames isEmpty ifFalse: [ stream cr; cr; nextPutAll: 'User custom events:' translated; cr. self currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value | stream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]! ! PasteUpMorph initialize! NCDisplayTextMorph initialize! NCTextMorph initialize! NCAAConnectorMorph initialize! InternetConfiguration initialize! GeeMailMorph initialize!