[squeak-dev] The Trunk: System-cmm.443.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 21 20:35:44 UTC 2011


Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.443.mcz

==================== Summary ====================

Name: System-cmm.443
Author: cmm
Time: 21 June 2011, 3:34:50.504 pm
UUID: 905294e4-8bce-4db0-b4fc-864cc16094ae
Ancestors: System-ul.442, System-HenrikSperreJohansen.416

Merged System-HenrikSperreJohansen.416, support for moving Sound preferences out of Preferences.

=============== Diff against System-ul.442 ===============

Item was changed:
  ----- Method: Beeper class>>beepPrimitive (in category 'beeping') -----
  beepPrimitive
  	"Make a primitive beep. Only use this if
  	you want to force this to be a primitive beep.
  	Otherwise use Beeper class>>beep
  	since this method bypasses the current
  	registered playable entity."
  
+ 	SoundService soundEnabled ifTrue: [
- 	Preferences soundsEnabled ifTrue: [
  		self primitiveBeep]!

Item was changed:
+ ----- Method: Preferences class>>canRecordWhilePlaying (in category 'sound') -----
- ----- Method: Preferences class>>canRecordWhilePlaying (in category 'standard queries') -----
  canRecordWhilePlaying
+ 	self deprecated: 'Ask the sound recorder for this info'.
+ 	^SoundRecorder canRecordWhilePlaying!
- 	^ self
- 		valueOfFlag: #canRecordWhilePlaying
- 		ifAbsent: [false]!

Item was changed:
  ----- Method: Preferences class>>defaultValueTableForCurrentRelease (in category 'misc') -----
  defaultValueTableForCurrentRelease
  	"Answer a table defining default values for all the preferences in the release.  Returns a list of (pref-symbol, boolean-symbol) pairs"
  
  	^  #(
  		(abbreviatedBrowserButtons false)
  		(alternativeBrowseIt false)
  		(annotationPanes false)
  		(areaFillsAreTolerant false)
  		(areaFillsAreVeryTolerant false)
  		(automaticFlapLayout true)
  		(automaticKeyGeneration false)
  		(automaticPlatformSettings true)
  		(automaticViewerPlacement true)
  		(balloonHelpEnabled true)
  		(balloonHelpInMessageLists false)
  		(batchPenTrails false)
  		(browseWithDragNDrop false)
  		(browseWithPrettyPrint false)
  		(browserShowsPackagePane false)
  		(canRecordWhilePlaying false)
  		(capitalizedReferences true)
  		(caseSensitiveFinds false)
  		(cautionBeforeClosing false)
  		(changeSetVersionNumbers true)
  		(checkForSlips true)
  		(checkForUnsavedProjects true)
  		(classicNavigatorEnabled false)
  		(clickOnLabelToEdit false)
  		(cmdDotEnabled true)
  		(collapseWindowsInPlace false)
  		(compactViewerFlaps false)
  		(compressFlashImages false)
  		(confirmFirstUseOfStyle true)
  		(conversionMethodsAtFileOut false)
  		(cpuWatcherEnabled false)
  		(debugHaloHandle true)
  		(debugPrintSpaceLog false)
  		(debugShowDamage false)
  		(decorateBrowserButtons true)
  		(diffsInChangeList true)
  		(diffsWithPrettyPrint false)
  		(dismissAllOnOptionClose false)
  		(dragNDropWithAnimation false)
  		(eToyFriendly false)
  		(eToyLoginEnabled false)
  		(enableLocalSave true)
  		(extractFlashInHighQuality true)
  		(extractFlashInHighestQuality false)
  		(fastDragWindowForMorphic true)
  		(fenceEnabled true)
  		(fullScreenLeavesDeskMargins true)
  		(haloTransitions false)
  		(hiddenScrollBars false)
  		(higherPerformance false)
  		(honorDesktopCmdKeys true)
  		(ignoreStyleIfOnlyBold true)
  		(includeSoundControlInNavigator false)
  		(infiniteUndo false)
  		(logDebuggerStackToFile true)
  		(magicHalos false)
  		(menuButtonInToolPane false)
  		(menuColorFromWorld false)
  		(menuKeyboardControl false)  
  		(modalColorPickers true)
  		(mouseOverForKeyboardFocus false)
  		(mouseOverHalos false)
  		(mvcProjectsAllowed true)
  		(navigatorOnLeftEdge true)
  		(noviceMode false)
  		(okToReinitializeFlaps true)
  		(optionalButtons true)
  		(passwordsOnPublish false)
  		(personalizedWorldMenu true)
  		(postscriptStoredAsEPS false)
  		(preserveTrash true)
  		(projectViewsInWindows true)
  		(projectZoom true)
  		(projectsSentToDisk false)
  		(promptForUpdateServer true)
  		(propertySheetFromHalo false)
  		(readDocumentAtStartup true)
  		(restartAlsoProceeds false)
  		(reverseWindowStagger true)
  		(roundedMenuCorners true)
  		(roundedWindowCorners true)
  		(scrollBarsNarrow false)
  		(scrollBarsOnRight true)
  		(scrollBarsWithoutMenuButton false)
  		(securityChecksEnabled false)
  		(selectiveHalos false)
  		(showBoundsInHalo false)
  		(showDirectionForSketches false)
  		(showDirectionHandles false)
  		(showFlapsWhenPublishing false)
  		(showProjectNavigator false)
  		(showSecurityStatus true)
  		(showSharedFlaps true)
  		(signProjectFiles true)
  		(simpleMenus false)
  		(slideDismissalsToTrash true)
  		(smartUpdating true)
  		(soundQuickStart false)
+ 		(stopSoundWhenDone false)
+ 		(soundEnabled true)
- 		(soundStopWhenDone false)
- 		(soundsEnabled true)
  		(startInUntrustedDirectory false)
  		(systemWindowEmbedOK false)
  		(thoroughSenders true)
  		(tileTranslucentDrag true)
  		(timeStampsInMenuTitles true)
  		(turnOffPowerManager false)
  		(twentyFourHourFileStamps true)
  		(typeCheckingInTileScripting true)
  		(uniTilesClassic true)
  		(uniqueNamesInHalos false)
  		(universalTiles false)
  		(unlimitedPaintArea false)
  		(updateSavesFile false)
  		(useButtonProprtiesToFire false)
  		(useUndo true)
  		(viewersInFlaps true)
  		(warnAboutInsecureContent true)
  		(warnIfNoChangesFile true)
  		(warnIfNoSourcesFile true))
  
  
  "
  Preferences defaultValueTableForCurrentRelease do:
  	[:pair | (Preferences preferenceAt: pair first ifAbsent: [nil]) ifNotNilDo:
  			[:pref | pref defaultValue: (pair last == true)]].
  Preferences chooseInitialSettings.
  "!

Item was changed:
+ ----- Method: Preferences class>>soundEnablingString (in category 'sound') -----
- ----- Method: Preferences class>>soundEnablingString (in category 'misc') -----
  soundEnablingString
+ 	self deprecated: 'Ask the sound service for this'.
+ 	^ SoundService soundEnablingString!
- 	^ self soundsEnabled
- 		ifFalse:
- 			['turn sound on' translated]
- 		ifTrue:
- 			['turn sound off' translated]!

Item was changed:
+ ----- Method: Preferences class>>soundQuickStart (in category 'sound') -----
- ----- Method: Preferences class>>soundQuickStart (in category 'standard queries') -----
  soundQuickStart
+ 	self deprecated: 'Ask the sound player for this info'.
+ 	^SoundPlayer soundQuickStart!
- 	^ self
- 		valueOfFlag: #soundQuickStart
- 		ifAbsent: [false]!

Item was changed:
+ ----- Method: Preferences class>>soundStopWhenDone (in category 'sound') -----
- ----- Method: Preferences class>>soundStopWhenDone (in category 'standard queries') -----
  soundStopWhenDone
+ 	self deprecated: 'Ask the sound player for this info'.
+ 	^SoundPlayer stopSoundWhenDone!
- 	^ self
- 		valueOfFlag: #soundStopWhenDone
- 		ifAbsent: [false]!

Item was changed:
+ ----- Method: Preferences class>>soundsEnabled (in category 'sound') -----
- ----- Method: Preferences class>>soundsEnabled (in category 'standard queries') -----
  soundsEnabled
+ 	self deprecated: 'Sound now uses now preference pragmas. 
+ 		Setting available directly in SoundService'.
+ 	^SoundService soundEnabled!
- 	^ self
- 		valueOfFlag: #soundsEnabled
- 		ifAbsent: [true]!

Item was changed:
+ ----- Method: Preferences class>>toggleSoundEnabling (in category 'sound') -----
- ----- Method: Preferences class>>toggleSoundEnabling (in category 'misc') -----
  toggleSoundEnabling
+ 	self deprecated: 'Now uses pragma preference, and is stored in SoundService'.
+     SoundService toggleSoundEnabled!
-      self togglePreference: #soundsEnabled!

Item was changed:
  ----- Method: SmalltalkImage>>setPlatformPreferences (in category 'snapshot and quit') -----
  setPlatformPreferences
  	"Set some platform specific preferences on system startup"
  	| platform specs |
  	Preferences automaticPlatformSettings ifFalse:[^self].
+ 	SoundPlayer soundQuickStart: SoundPlayer defaultQuickStartForPlatform.
+ 	SoundPlayer stopSoundWhenDone: SoundPlayer defaultStopSoundForPlatform.
  	platform := self platformName.
+ 	specs := 	#().
- 	specs := 	#(	
- 					(soundStopWhenDone true)
- 					(soundQuickStart false)
- 			).
  	platform = 'Win32' ifTrue:[
+ 		specs := #()].
- 		specs := #(	
- 					(soundStopWhenDone true)
- 					(soundQuickStart false)
- 				)].
  	platform = 'Mac OS' ifTrue:[
+ 		specs := #()].
- 		specs := #(	
- 					(soundStopWhenDone false)
- 					(soundQuickStart true)
- 				)].
  	specs do:[:tuple|
  		Preferences setPreference: tuple first toValue: (tuple last == true).
  	].
  !

Item was changed:
  AppRegistry subclass: #SoundService
  	instanceVariableNames: ''
+ 	classVariableNames: 'SoundEnabled'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'System-Applications'!
  
  !SoundService commentStamp: 'gk 2/24/2004 23:14' prior: 0!
  This is the AppRegistry class for the sound system.
  
  A sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in this registry and can be accessed by "SoundService default". This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.!

Item was added:
+ ----- Method: SoundService class>>soundEnabled (in category 'preferences') -----
+ soundEnabled
+ 	<preference: 'Enable sound'
+ 		category: 'media'
+ 		description: 'If false, all sound playing is disabled'
+ 		type: #Boolean>
+ 	^SoundEnabled ifNil: [false]!

Item was added:
+ ----- Method: SoundService class>>soundEnabled: (in category 'preferences') -----
+ soundEnabled: aBoolean
+ 	SoundEnabled := aBoolean!

Item was added:
+ ----- Method: SoundService class>>soundEnablingString (in category 'preferences') -----
+ soundEnablingString
+ 	^ self soundEnabled
+ 		ifFalse:
+ 			['turn sound on' translated]
+ 		ifTrue:
+ 			['turn sound off' translated]!

Item was added:
+ ----- Method: SoundService class>>toggleSoundEnabled (in category 'preferences') -----
+ toggleSoundEnabled
+ 	self soundEnabled: self soundEnabled not!

Item was added:
+ ----- Method: SystemVersion>>isPharo (in category 'testing') -----
+ isPharo
+ 	^ version includesSubString: 'Pharo'!

Item was added:
+ ----- Method: SystemVersion>>isSqueak (in category 'testing') -----
+ isSqueak
+ 	^ version includesSubString: 'Squeak'!




More information about the Squeak-dev mailing list