'From Squeak3.1alpha [latest update: #''Squeak3.1alpha'' of 28 February 2001 update 3939] on 20 April 2001 at 9:58:34 pm'! "Change Set: miscChgs-sw Date: 20 April 2001 Author: Scott Wallace ¥ Honor cmd-f in the message-list pane of Lexicons, to take you to the 'find' feature, as it always has from the category-list pane. ¥ Gets the right selector established for reacting to change in #useGlobalFlaps setting. ¥ Three fixes relating to the auto-select feature in Lexicons. This is still not 100% right, but a noticeable improvement. ¥ Fixes the abilitiy of individual morphs to override what happens when asked to add Genie menu items to the halo menu, by moving the addition of the extra before the Genie items are added to the method that adds the Genie items. ¥ The flap-tab menu is an early beneficiary of the preceding change -- it avoids both the extra line and the items that otherwise would be inserted by Genie."! !Lexicon methodsFor: 'search' stamp: 'sw 4/12/2001 00:42'! lastSearchString: aString "Make a note of the last string searched for in the receiver" currentQueryParameter _ aString asString. currentQuery _ #selectorName. autoSelectString _ aString. self setMethodListFromSearchString. ^ true! ! !Lexicon methodsFor: 'search' stamp: 'sw 4/12/2001 00:46'! methodListFromSearchString: fragment "Answer a method list of methods whose selectors match the given fragment" | aList searchFor | currentQueryParameter _ fragment. currentQuery _ #selectorName. autoSelectString _ fragment. searchFor _ fragment asString asLowercase withBlanksTrimmed. aList _ targetClass allSelectorsUnderstood select: [:aSelector | currentVocabulary includesSelector: aSelector forInstance: self targetObject ofClass: targetClass limitClass: limitClass]. searchFor size > 0 ifTrue: [aList _ aList select: [:aSelector | aSelector includesSubstring: searchFor caseSensitive: false]]. ^ aList asSortedArray ! ! !Lexicon methodsFor: 'search' stamp: 'sw 4/12/2001 00:50'! obtainNewSearchString "Put up a box allowing the user to enter a fresh search string" | fragment | fragment _ FillInTheBlank request: 'type method name or fragment: ' initialAnswer: self currentQueryParameter. fragment ifNil: [^ self]. (fragment _ fragment copyWithout: $ ) size == 0 ifTrue: [^ self]. currentQueryParameter _ fragment. fragment _ fragment asLowercase. currentQuery _ #selectorName. self showQueryResultsCategory. self messageListIndex: 0! ! !Lexicon methodsFor: 'message list menu' stamp: 'sw 4/20/2001 20:54'! messageListKey: aChar from: view "Respond to a Command key" aChar == $f ifTrue: [^ self obtainNewSearchString]. ^ super messageListKey: aChar from: view! ! !Morph methodsFor: 'meta-actions' stamp: 'sw 4/19/2001 18:44'! buildHandleMenu: aHand "Build the morph menu for the given morph's halo's menu handle. This menu has two sections. The first section contains commands that are interpreted by the hand; the second contains commands provided by the target morph. This method allows the morph to decide which items should be included in the hand's section of the menu." | menu | menu _ MenuMorph new defaultTarget: self. menu addStayUpItem. self addAddHandMenuItemsForHalo: menu hand: aHand. menu defaultTarget: self. self addCustomHaloMenuItems: menu hand: aHand. menu addLine. self player ifNotNil: [self player addPlayerMenuItemsTo: menu hand: aHand]. self addGenieMenuItems: menu hand: aHand. menu defaultTarget: aHand. ^ menu ! ! !Morph methodsFor: 'genie-menu' stamp: 'sw 4/19/2001 18:44'! addGenieMenuItems: aMenu hand: aHandMorph "If the receiver wishes the Genie menu items, add a line to the menu and then those Genie items, else do nothing" aMenu addLine. aMenu add: 'change gesture dictionary' action: #changeGestureDictionary. self gestureDictionary ifNotNil: [aMenu add: 'inspect gesture dictionary' action: #inspectGestureDictionary. self hasNotExportedGestureDictionary ifFalse: [aMenu add: 'make own copy of gesture dictionary' action: #makeOwnCopyOfGestureDictionary. aMenu add: 'make own sub-gesture dictionary' action: #makeOwnSubGestureDictionary]].! ! !FlapTab methodsFor: 'menu' stamp: 'sw 4/19/2001 18:44'! addGenieMenuItems: aMenu hand: aHandMorph "If the receiver wishes the Genie menu items, add a line to the menu and then those Genie items, else do nothing"! ! !Preference methodsFor: 'change notification' stamp: 'sw 4/17/2001 00:22'! changeInformee "Answer the receiver's changeInformee" ^ changeInformee! ! !Preferences class methodsFor: 'reacting to change' stamp: 'sw 4/17/2001 00:26'! setNotificationParametersForStandardPreferences "Set up the notification parameters for the standard preferences that require it. Others obtain them via the code that creates them." "Preferences setNotificationParametersForStandardPreferences" | aPreference | #( (annotationPanes annotationPanesChanged) (eToyFriendly eToyFriendlyChanged) (infiniteUndo infiniteUndoChanged) (largeTiles largeTilesSettingToggled) (optionalButtons optionalButtonsChanged) (roundedWindowCorners roundedWindowCornersChanged) (showProjectNavigator showProjectNavigatorChanged) (smartUpdating smartUpdatingChanged) (universalTiles universalTilesSettingToggled) (useGlobalFlaps globalFlapsSettingChanged)) do: [:pair | aPreference _ self preferenceAt: pair first. aPreference changeInformee: self changeSelector: pair second]! ! Preferences class removeSelector: #noteThatFlag:justChangedTo:! "Postscript:" Preferences setNotificationParametersForStandardPreferences. !