'From etoys3.0 of 24 February 2008 [latest update: #1969] on 17 April 2008 at 9:43:01 pm'! "Change Set: transMisc08APR15-KR Date: 17 April 2008 Author: Korakurider address missing translations pointed by Gerhard Steiner 2008/4/15 "! !BooleanPreferenceView methodsFor: 'user interface' stamp: 'KR 4/17/2008 21:18'! offerPreferenceNameMenu: aPanel with: ignored1 in: ignored2 "the user clicked on a preference name -- put up a menu" | aMenu | ActiveHand showTemporaryCursor: nil. aMenu := MenuMorph new defaultTarget: self preference. aMenu addTitle: self preference name. (Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue: [aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness. aMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project' translated]. aMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllCallsOn: argument: self preference name. aMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "' translated , self preference name, '".'. aMenu add: 'show category...' translated target: aPanel selector: #findCategoryFromPreference: argument: self preference name. aMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.' translated. Smalltalk isMorphic ifTrue: [aMenu add: 'hand me a button for this preference' translated target: self selector: #tearOffButton. aMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish' translated]. aMenu add: 'copy this name to clipboard' translated target: self preference selector: #copyName. aMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere' translated. aMenu popUpInWorld! ! !EventRollMorph methodsFor: 'processing' stamp: 'KR 4/17/2008 21:36'! makeControlsPanel "One-time initialization. Upon entry, the receiver has no submorphs; upon exit, it has one, namely its controlsPanel, which contains the scale slider, the track headings, and the control buttons." | topWrapper labelWrapper aMorph aPanel | aPanel := AlignmentMorph newColumn beTransparent. aPanel hResizing: #shrinkWrap; vResizing: #shrinkWrap. topWrapper := AlignmentMorph newRow beTransparent. topWrapper hResizing: #spaceFill; vResizing: #shirnkWrap. topWrapper rubberBandCells: true. labelWrapper := AlignmentMorph newColumn beTransparent. labelWrapper addTransparentSpacerOfSize: 0@4. #('mouse' 'keyboard' 'media') translatedNoop do: [:aString | aMorph := Morph new extent: 80@ 20. aMorph hResizing: #rigid; vResizing: #rigid. aMorph beTransparent. aMorph addMorphCentered: (StringMorph contents: aString translated font: (StrikeFont familyName: 'Accujen' size: 24)). labelWrapper addMorphBack: aMorph. labelWrapper addTransparentSpacerOfSize: 0@20]. labelWrapper submorphs last delete. "that last spacer" topWrapper addMorphBack: labelWrapper. labelWrapper on: #mouseDown send: #grabMorph: to: self. topWrapper addMorphBack: self scaleSlider. aPanel addMorphBack: topWrapper. aPanel addMorphBack: self makeButtonsPanel. self addMorph: aPanel! ! !FlapTab methodsFor: 'graphical tabs' stamp: 'KR 4/17/2008 21:22'! graphicalTabString ^ (self isCurrentlyGraphical ifTrue: ['choose new graphic...' translated] ifFalse: ['use graphical tab' translated]) ! ! !FlapTab methodsFor: 'menu' stamp: 'KR 4/17/2008 21:29'! destroyFlap "Destroy the receiver" | reply request | request _ self isGlobalFlap ifTrue: ['Caution -- this would permanently remove this flap, so it would no longer be available in this or any other project. Do you really want to this? ' translated] ifFalse: ['Caution -- this is permanent!! Do you really want to do this? ' translated]. reply _ self confirm: request translated orCancel: [^ self]. reply ifTrue: [self isGlobalFlap ifTrue: [Flaps removeFlapTab: self keepInList: false. self currentWorld reformulateUpdatingMenus] ifFalse: [referent isInWorld ifTrue: [referent delete]. self delete]]! ! !FlapTab methodsFor: 'menu' stamp: 'KR 4/17/2008 21:29'! flapMenuTitle ^ 'flap: ' translated , self wording! ! !FlapTab methodsFor: 'solid tabs' stamp: 'KR 4/17/2008 21:27'! solidTabString ^ (self isCurrentlySolid ifTrue: ['currently using solid tab' translated] ifFalse: ['use solid tab' translated]) ! ! !FlapTab methodsFor: 'textual tabs' stamp: 'KR 4/17/2008 21:26'! textualTabString ^ (self isCurrentlyTextual ifTrue: ['change tab wording...' translated] ifFalse: ['use textual tab' translated]) ! ! !PlaybackInvoker methodsFor: 'menu ' stamp: 'KR 4/17/2008 21:40'! autoDismissString "Answer a string telling the status of my autoDismiss." ^ (autoDismiss ifTrue: [''] ifFalse: ['']), 'auto dismiss' translated! ! !PlaybackInvoker methodsFor: 'menu ' stamp: 'KR 4/17/2008 21:39'! autoStartString "Answer a string telling the status of my autoStart." ^ (autoStart ifTrue: [''] ifFalse: ['']), 'auto start' translated! ! !Preferences class methodsFor: 'misc' stamp: 'KR 4/17/2008 21:04'! menuColorString ^ ((self valueOfFlag: #menuColorFromWorld) ifTrue: ['stop menu-color-from-world' translated] ifFalse: ['start menu-color-from-world' translated]) ! ! !Preferences class methodsFor: 'misc' stamp: 'KR 4/17/2008 21:09'! roundedCornersString ^ ((self valueOfFlag: #roundedWindowCorners) ifTrue: ['stop rounding window corners' translated] ifFalse: ['start rounding window corners' translated])! ! !Preferences class methodsFor: 'preferences panel' stamp: 'KR 4/17/2008 21:14'! openFactoredPanelWithWidth: aWidth "Open up a preferences panel of the given width" "Preferences openFactoredPanelWithWidth: 325" | window playfield aPanel | aPanel _ PreferencesPanel new. playfield _ PasteUpMorph new width: aWidth. playfield dropEnabled: false. self initializePreferencePanel: aPanel in: playfield. self couldOpenInMorphic ifTrue: [window _ (SystemWindow labelled: 'Preferences' translated) model: aPanel. window on: #keyStroke send: #keyStroke: to: aPanel. window bounds: (100 @ 100 - (0 @ window labelHeight + window borderWidth) extent: playfield extent + (2 * window borderWidth)). window addMorph: playfield frame: (0 @ 0 extent: 1 @ 1). window updatePaneColors. window setProperty: #minimumExtent toValue: playfield extent + (12@15). self currentWorld addMorphFront: window. window center: self currentWorld center. window activateAndForceLabelToShow] ifFalse: [(window _ MVCWiWPasteUpMorph newWorldForProject: nil) addMorph: playfield. MorphWorldView openOn: window label: 'Preferences' translated extent: playfield extent]! ! !Preferences class methodsFor: 'preferences panel' stamp: 'KR 4/17/2008 21:20'! preferencesControlPanel "Answer a Preferences control panel window" "Preferences preferencesControlPanel openInHand" | window playfield aPanel | aPanel _ PreferencesPanel new. playfield _ PasteUpMorph new width: 325. playfield dropEnabled: false. window _ (SystemWindow labelled: 'Preferences' translated) model: aPanel. self initializePreferencePanel: aPanel in: playfield. window on: #keyStroke send: #keyStroke: to: aPanel. window bounds: (100 @ 100 - (0 @ window labelHeight + window borderWidth) extent: playfield extent + (2 * window borderWidth)). window addMorph: playfield frame: (0 @ 0 extent: 1 @ 1). window updatePaneColors. window setProperty: #minimumExtent toValue: playfield extent + (12@15). ^ window! ! !TheWorldMenu methodsFor: 'construction' stamp: 'KR 4/17/2008 21:03'! buildWorldMenu "Build the menu that is put up when the screen-desktop is clicked on" | menu | menu _ MenuMorph new defaultTarget: self. menu commandKeyHandler: self. self colorForDebugging: menu. menu addStayUpItem. self fillIn: menu from: { {'previous project' translated. { #myWorld . #goBack }. 'return to the most-recently-visited project' translated}. {'jump to project...' translated. { #myWorld . #jumpToProject }. 'put up a list of all projects, letting me choose one to go to' translated}. {'save project on file...' translated. { #myWorld . #saveOnFile }. 'save this project on a file' translated}. {'load project from file...' translated. { self . #loadProject }. 'load a project from a file' translated}. nil}. myWorld addUndoItemsTo: menu. self fillIn: menu from: { {'restore display (r)' translated. { World . #restoreMorphicDisplay }. 'repaint the screen -- useful for removing unwanted display artifacts, lingering cursors, etc.' translated}. nil}. Preferences simpleMenus ifFalse: [self fillIn: menu from: { {'open...' translated. { self . #openWindow } }. {'windows...' translated. { self . #windowsDo } }. {'changes...' translated. { self . #changesDo } }}]. self fillIn: menu from: { {'help...' translated. { self . #helpDo }. 'puts up a menu of useful items for updating the system, determining what version you are running, and much else' translated}. {'appearance...' translated. { self . #appearanceDo }. 'put up a menu offering many controls over appearance.' translated}}. Preferences simpleMenus ifFalse: [self fillIn: menu from: { {'do...' translated. { Utilities . #offerCommonRequests} . 'put up an editible list of convenient expressions, and evaluate the one selected.' translated}}]. self fillIn: menu from: { nil. {'objects (o)' translated. { #myWorld . #activateObjectsTool } . 'A tool for finding and obtaining many kinds of objects' translated}. {'new morph...' translated. { self . #newMorph }. 'Offers a variety of ways to create new objects' translated}. nil. {'authoring tools...' translated. { self . #scriptingDo } . 'A menu of choices useful for authoring' translated}. {'playfield options...' translated. { self . #playfieldDo } . 'A menu of options pertaining to this object as viewed as a playfield' translated}. {'flaps...' translated. { self . #flapsDo } . 'A menu relating to use of flaps. For best results, use "keep this menu up"' translated}. {'projects...' translated. { self . #projectDo }. 'A menu of commands relating to use of projects' translated}}. Preferences simpleMenus ifFalse: [self fillIn: menu from: { {'print PS to file...' translated. { self . #printWorldOnFile } . 'write the world into a postscript file' translated}. {'debug...' translated. { self . #debugDo } . 'a menu of debugging items' translated}}]. self fillIn: menu from: { nil. {'save' translated. { SmalltalkImage current . #saveSession } . 'save the current version of the image on disk' translated}. {'save as...' translated. { SmalltalkImage current . #saveAs }. 'save the current version of the image on disk under a new name.' translated}. {'save as new version' translated. { SmalltalkImage current . #saveAsNewVersion }. 'give the current image a new version-stamped name and save it under that name on disk.' translated}. {'save and quit' translated. { self . #saveAndQuit } . 'save the current image on disk, and quit out of Squeak.' translated}. {'quit' translated. { self . #quitSession } . 'quit out of Squeak.' translated}}. ^ menu! !