'From etoys4.0 of 9 October 2008 [latest update: #2214] on 16 April 2009 at 4:51:49 pm'! "Change Set: InhibitBlinkparen-yo Date: 16 April 2009 Author: Yoshiki Ohshima When preference blinkParen is false, it doesn't try to highlight the matching opening paren for a type in." Preferences addBooleanPreference: #blinkParen categories: #('general') default: true balloonHelp: 'whether to highlight matching opening parenthesis when closing one is typed.' projectLocal: false changeInformee: nil changeSelector: nil! !ParagraphEditor methodsFor: 'parenblinking' stamp: 'yo 4/16/2009 16:44'! dispatchOnCharacter: char with: typeAheadStream "Carry out the action associated with this character, if any. Type-ahead is passed so some routines can flush or use it." | honorCommandKeys | self clearParens. char asciiValue = 13 ifTrue: [ ^ sensor controlKeyPressed ifTrue: [self crWithIndent: typeAheadStream] ifFalse: [self normalCharacter: typeAheadStream]]. ((honorCommandKeys _ Preferences cmdKeysInText) and: [char = Character enter]) ifTrue: [^ self dispatchOnEnterWith: typeAheadStream]. "Special keys overwrite crtl+key combinations - at least on Windows. To resolve this conflict, assume that keys other than cursor keys aren't used together with Crtl." ((self class specialShiftCmdKeys includes: char asciiValue) and: [char asciiValue < 27]) ifTrue: [^ sensor controlKeyPressed ifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream] ifFalse: [self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]]. "backspace, and escape keys (ascii 8 and 27) are command keys" ((honorCommandKeys and: [sensor commandKeyPressed]) or: [self class specialShiftCmdKeys includes: char asciiValue]) ifTrue: [^ sensor leftShiftDown ifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream] ifFalse: [self perform: (CmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream]]. "the control key can be used to invoke shift-cmd shortcuts" (honorCommandKeys and: [sensor controlKeyPressed]) ifTrue: [^ self perform: (ShiftCmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream]. Preferences blinkParen ifTrue: [ (')]}' includes: char) ifTrue: [self blinkPrevParen]]. ^ self perform: #normalCharacter: with: typeAheadStream! ! !Preferences class methodsFor: 'themes' stamp: 'yo 4/16/2009 16:50'! cambridge "A theme for OLPC project" "Preferences cambridge" "This method has three parts. Don't forget to look at the stuff at the bottom." self setPreferencesFrom: #( (allowCelesteTell false) (alternativeScrollbarLook true) (alternativeWindowLook true) (annotationPanes true) (automaticKeyGeneration true) (biggerHandles true) (blinkParen false) (browseWithDragNDrop true) (canRecordWhilePlaying true) (classicNavigatorEnabled false) (compactViewerFlaps true) (enableLocalSave false) (escapeKeyProducesMenu false) (eToyFriendly true) (eToyLoginEnabled true) (extraDebuggerButtons false) (gradientMenu false) (haloTransitions false) (honorDesktopCmdKeys true) (includeSoundControlInNavigator true) (magicHalos false) (menuAppearance3d false) (menuKeyboardControl false) (modalColorPickers true) (mouseOverHalos false) (mvcProjectsAllowed false) (preserveTrash true) (projectViewsInWindows false) (promptForUpdateServer false) (propertySheetFromHalo false) (roundedMenuCorners false) (roundedWindowCorners false) (securityChecksEnabled true) (showDirectionHandles false) (showDirectionForSketches true) (showProjectNavigator false) (showSecurityStatus false) (soundQuickStart true) (soundStopWhenDone true) (startInUntrustedDirectory true) (swapControlAndAltKeys true) (uniqueNamesInHalos true) (unlimitedPaintArea false) (useArtificialSweetenerBar false) (useBiggerPaintingBox true) (useFormsInPaintBox false) (useLocale true) (usePangoRenderer false) (usePopUpArrows true) (warnAboutInsecureContent false) "The following is to make sure the default is set properly." (abbreviatedBrowserButtons false) (allowEtoyUserCustomEvents false) (alphabeticalProjectMenu false) (alternativeBrowseIt false) (alternativeButtonsInScrollBars false) (alternativeWindowBoxesLook true) (alwaysHideHScrollbar false) (alwaysShowConnectionVocabulary false) (alwaysShowHScrollbar false) (alwaysShowVScrollbar true) (ansiAssignmentOperatorWhenPrettyPrinting true) (areaFillsAreTolerant false) (areaFillsAreVeryTolerant false) (autoAccessors false) (automaticFlapLayout true) (automaticPlatformSettings true) (automaticViewerPlacement true) (balloonHelpEnabled true) (balloonHelpInMessageLists false) (batchPenTrails false) (biggerCursors true) (browserNagIfNoClassComment true) (browserShowsPackagePane false) (browseWithPrettyPrint false) (capitalizedReferences true) (caseSensitiveFinds false) (cautionBeforeClosing false) (celesteHasStatusPane false) (celesteShowsAttachmentsFlag false) (changeSetVersionNumbers true) (checkForSlips true) (checkForUnsavedProjects true) (classicNewMorphMenu false) (clickOnLabelToEdit false) (cmdDotEnabled true) (collapseWindowsInPlace false) (colorWhenPrettyPrinting false) (compressFlashImages false) (confirmFirstUseOfStyle true) (conversionMethodsAtFileOut false) (cpuWatcherEnabled false) (debugHaloHandle false) (debugPrintSpaceLog false) (debugShowDamage false) (decorateBrowserButtons true) (defaultFileOutFormatMacRoman false) (diffsInChangeList true) (diffsWithPrettyPrint false) (dismissAllOnOptionClose false) (dismissEventTheatreUponPublish true) (dragNDropWithAnimation false) (dropProducesWatcher true) (duplicateControlAndAltKeys false) (easySelection false) (enableInternetConfig false) (enablePortraitMode false) (enableVirtualOLPCDisplay false) (expandedPublishing true) (extractFlashInHighestQuality false) (extractFlashInHighQuality true) (fastDragWindowForMorphic true) (fenceEnabled true) (fenceSoundEnabled false) (fullScreenLeavesDeskMargins true) (gradientScrollBars true) (haloEnclosesFullBounds false) (higherPerformance false) (ignoreStyleIfOnlyBold true) (implicitSelfInTiles false) (inboardScrollbars true) (infiniteUndo false) (keepTickingWhilePainting false) (logDebuggerStackToFile true) (menuButtonInToolPane false) (menuColorFromWorld false) (menuWithIcons true) (morphicProgressStyle true) (mouseOverForKeyboardFocus false) (navigatorOnLeftEdge true) (noviceMode false) (okToReinitializeFlaps true) (oliveHandleForScriptedObjects false) (optionalButtons true) (passwordsOnPublish false) (personalizedWorldMenu true) (postscriptStoredAsEPS false) (printAlternateSyntax false) (projectsSentToDisk false) (projectZoom true) (readDocumentAtStartup true) (restartAlsoProceeds false) (reverseWindowStagger true) (rotationAndScaleHandlesInPaintBox false) (scrollBarsNarrow false) (scrollBarsOnRight true) (scrollBarsWithoutMenuButton false) (selectionsMayShrink true) (selectiveHalos true) (showAdvancedNavigatorButtons false) (showBoundsInHalo false) (showDeprecationWarnings false) (showFlapsWhenPublishing false) (showLinesInHierarchyViews true) (showSharedFlaps true) (signProjectFiles true) (simpleMenus false) (slideDismissalsToTrash true) (smartUpdating true) (soundsEnabled true) (sugarNavigator true) (swapMouseButtons false) (systemWindowEmbedOK false) (tabAmongFields true) (testRunnerShowAbstractClasses false) (thoroughSenders true) (tileTranslucentDrag true) (timeStampsInMenuTitles true) (translationWithBabel false) (turnOffPowerManager false) (twentyFourHourFileStamps true) (twoSidedPoohTextures true) (typeCheckingInTileScripting true) (unifyNestedProgressBars true) (uniTilesClassic true) (universalTiles false) (updateFromServerAtStartup false) (updateSavesFile false) (useButtonProprtiesToFire false) (useFileList2 true) (useSmartLabels false) (useUndo true) (useVectorVocabulary false) (viewersInFlaps true) (warnIfNoChangesFile false) (warnIfNoSourcesFile false) (warningForMacOSFileNameLength false) (wordStyleCursorMovement true) ). Preferences setPreference: #haloTheme toValue: #iconicHaloSpecifications. ! !