[squeak-dev] The Inbox: System-fbs.579.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jul 29 15:44:08 UTC 2013


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-fbs.579.mcz

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

Name: System-fbs.579
Author: fbs
Time: 29 July 2013, 4:43:55.156 pm
UUID: 17e970be-db50-d342-8e3d-db5de222d1f4
Ancestors: System-fbs.578

Move check-for-updates into MonticelloConfigurations, thanks to pragma preferences and Smalltalk's startup/shutdown registration.

Remove the old preference in Preferences' initialize. A later System commit can remove this removal.

=============== Diff against System-fbs.578 ===============

Item was changed:
  ----- Method: AutoStart class>>checkForUpdates (in category 'updating') -----
  checkForUpdates
  	| availableUpdate updateServer |
  	World 
  		ifNotNil: [
  			World install.
  			ActiveHand position: 100 at 100].
- 	HTTPClient isRunningInBrowser
- 		ifFalse: [^self processUpdates].
  	availableUpdate := (AbstractLauncher extractParameters
  		at: 'UPDATE'
  		ifAbsent: [''] ) asInteger.
  	availableUpdate
  		ifNil: [^false].
  	updateServer := AbstractLauncher extractParameters
  		at: 'UPDATESERVER'
  		ifAbsent: [AbstractLauncher extractParameters
  		at: 'UPDATE_SERVER'
  		ifAbsent: ['Squeakland']].
  	Utilities setUpdateServer: updateServer.
  	^SystemVersion checkAndApplyUpdates: availableUpdate!

Item was removed:
- ----- Method: AutoStart class>>processUpdates (in category 'updating') -----
- processUpdates
- 	"Process update files from a well-known update server.  This method is called at system startup time,   Only if the preference #updateFromServerAtStartup is true is the actual update processing undertaken automatically"
- 	| choice |
- 	(Preferences valueOfFlag: #updateFromServerAtStartup) ifTrue:
- 		[choice := UIManager default chooseFrom: #('Yes, Update' 'No, Not now' 'Don''t ask again')
- 			title: 'Shall I look for new code\updates on the server?' withCRs.
- 		choice = 1 ifTrue: [
- 			Utilities updateFromServer].
- 		choice = 3 ifTrue: [
- 			Preferences setPreference: #updateFromServerAtStartup toValue: false.
- 			self inform: 'Remember to save you image to make this setting permant.']].
- 	^false!

Item was changed:
  ----- Method: Preferences class>>initialize (in category 'class initialization') -----
  initialize
  	"Preferences initialize"
+ 	self registerForEvents.
+ 	"Remove obsolete preferences, storing their values in the new preferences as necessary"
+ 	MCMcmUpdater updateFromServerAtStartup: (self valueOfFlag: #updateFromServerAtStartup ifAbsent: [false]).
+ 	self removePreference: #updateFromServerAtStartup.!
- 	self registerForEvents.!

Item was changed:
  ----- Method: Preferences class>>personalizeUserMenu: (in category 'personalization') -----
  personalizeUserMenu: aMenu
  	"The user has clicked on the morphic desktop with the yellow mouse button (option+click on the Mac); a menu is being constructed to present to the user in response; its default target is the current world.  In this method, you are invited to add items to the menu as per personal preferences.
+ 	The default implementation, for illustrative purposes, sets the menu title to 'personal', and adds items for go-to-previous-project and show/hide flaps."
- 	The default implementation, for illustrative purposes, sets the menu title to 'personal', and adds items for go-to-previous-project, show/hide flaps, and load code updates"
  	
  	aMenu addTitle: 'personal' translated.  "Remove or modify this as per personal choice"
  
  	aMenu addStayUpItem.
  	aMenu add: 'previous project' translated action: #goBack.
- 	aMenu add: 'load latest code updates' translated target: Utilities action: #updateFromServer.
  	aMenu add: 'about this system...' translated target: Smalltalk action: #aboutThisSystem.
  	
  	aMenu addLine.
  				
  	aMenu addUpdating: #suppressFlapsString target: Project current action: #toggleFlapsSuppressed.
  	aMenu balloonTextForLastItem: 'Whether prevailing flaps should be shown in the project right now or not.' translated!

Item was removed:
- ----- Method: Utilities class>>openUpdateButton (in category 'user interface') -----
- openUpdateButton
- 	PluggableButtonMorph new
- 		label: 'Load Code Updates';
- 		model: Utilities;
- 		action: #updateFromServer;
- 		openInHand!

Item was removed:
- ----- Method: Utilities class>>setSystemVersionFromConfig: (in category 'fetching updates') -----
- setSystemVersionFromConfig: anMCConfiguration
- 	"Set the current system version date to the latest date found in anMCConfiguration (or the associated working copy). Also set the highest update number to the sum of version numbers in the config."
- 
- 	| versionNumbers versionDates |
- 	versionNumbers := anMCConfiguration dependencies collect: [:d |
- 		(d versionInfo name copyAfterLast: $.) asInteger].
- 	versionDates := anMCConfiguration dependencies collect: [:d |
- 		d versionInfo date
- 			ifNil: [d package workingCopy ancestors first date]].
- 	SystemVersion current
- 		date: versionDates max;
- 		highestUpdate: versionNumbers sum.
- !

Item was changed:
  ----- Method: Utilities class>>updateFromServer (in category 'fetching updates') -----
  updateFromServer
+ 	self deprecated: 'Use MCMcmUpdater updateFromServer'.
+ 	^ MCMcmUpdater updateFromServer.!
- 	"Update the image by loading all pending updates from the server."
- 	| config |
- 	"Flush all caches. If a previous download failed this is often helpful"
- 	MCFileBasedRepository flushAllCaches.
- 	config := MCMcmUpdater updateFromDefaultRepository.
- 	config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated].
- 	self setSystemVersionFromConfig: config.
- 	self inform: ('Update completed.
- Current update number: ' translated, SystemVersion current highestUpdate).!



More information about the Squeak-dev mailing list