[squeak-dev] The Trunk: Services-Base-cmm.47.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 15 22:12:35 UTC 2011


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

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

Name: Services-Base-cmm.47
Author: cmm
Time: 15 March 2011, 5:12:27.554 pm
UUID: 2da058eb-da3c-4112-9a49-c1ac2139ebec
Ancestors: Services-Base-nice.46

- Fix the ability for external IDE tools to hook into the IDE menus.
- Printing for ServiceActions.

=============== Diff against Services-Base-nice.46 ===============

Item was changed:
  ----- Method: Browser>>menuHook:named:shifted: (in category '*services-base') -----
  menuHook: aMenu named: aSymbol shifted: aBool
+ 	"Enhance aMenu with registered services."
+ 	aSymbol 
+ 		caseOf: 
+ 			{ [ #classListMenu ] 		-> [ ServiceGui browser: self classMenu: aMenu ].
+ 			[ #codePaneMenu ]			-> [ ServiceGui browser: self codePaneMenu: aMenu ].
+ 			[ #messageCategoryMenu]	-> [ ServiceGui browser: self messageCategoryMenu: aMenu ].
+ 			[ #messageListMenu ] 		-> [ ServiceGui browser: self messageListMenu: aMenu ].
+ 			[ #systemCategoryMenu ] 	-> [ ServiceGui browser: self classCategoryMenu: aMenu ] } 
+ 		otherwise: [ "do nothing" ]!
- 	aSymbol caseOf: {
- 		[#classListMenu] -> [ServiceGui browser: self classMenu: aMenu].
- 		[#codePaneMenu] -> [ServiceGui browser: self codePaneMenu: aMenu].
- 		[#messageCategoryMenu] -> [ServiceGui browser: self messageCategoryMenu: aMenu.].
- 		[#messageListMenu] -> [ServiceGui browser: self messageListMenu: aMenu.].
- 		[#systemCategoryMenu] -> [ServiceGui browser: self classCategoryMenu: aMenu.].
- 	} otherwise:[^false].
- 	^ServiceGui onlyServices.
- !

Item was added:
+ ----- Method: ServiceAction>>printOn: (in category 'printing') -----
+ printOn: aStream 
+ 	super printOn: aStream.
+ 	aStream
+ 		 space ;
+ 		 nextPutAll: id asString!

Item was changed:
  ----- Method: ServiceGui classSide>>browser:messageListMenu: (in category 'hooks') -----
+ browser: aBrowser messageListMenu: aMenu 
+ 	^ (self new
+ 		for: aBrowser
+ 		id: #browserMethodMenu) inlineInMenu: aMenu!
- browser: b messageListMenu: aMenu 
- 	^ (self new  for:b  id:#browserMethodMenu)  inlineInMenu:aMenu!

Item was changed:
  ----- Method: ServiceShortcuts classSide>>setPreferences (in category 'as yet unclassified') -----
  setPreferences
  	| mm |
  	mm := self map copy.
  	(0 to: 9)
  		do: [:i | #('ctrl-' 'cmd-' 'ctrl-cmd-' )
  				do: [:str | 
  					| short | 
  					short := (str , i asString) asSymbol.
  					self insertPrefShortcut: short]].
  	#(#up #down #left #right )
  		do: [:s | 
  			self insertPrefShortcut: ('ctrl-cmd-' , s) asSymbol.].
  	mm
  		keysAndValuesDo: [:k :v | ServicePreferences setPreference: k toValue: v].
  	((Array new: 3) at: 1 put: ((Array new: 3) at: 1 put: #inlineServicesInMenu;
  			 at: 2 put: true;
+ 			 at: 3 put: 'Inline services within squeak menus';
- 			 at: 3 put: 'Inline the services the squeak menus';
  			 yourself);
  		 at: 2 put: ((Array new: 3) at: 1 put: #useOnlyServicesInMenu;
  			 at: 2 put: false;
  			 at: 3 put: 'Use only services and not regular menu items';
  			 yourself);
  		 at: 3 put: ((Array new: 3) at: 1 put: #useServicesInBrowserButtonBar;
  			 at: 2 put: true;
  			 at: 3 put: 'Use a service-based button bar';
  			 yourself);
  		 yourself)
  		do: [:tr | ServicePreferences
  				addPreference: tr first
  				categories: #('-- settings --' )
  				default: tr second
  				balloonHelp: tr third]!




More information about the Squeak-dev mailing list