[Pkg] The Trunk: Morphic-mt.1542.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 25 09:25:49 UTC 2019


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1542.mcz

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

Name: Morphic-mt.1542
Author: mt
Time: 25 September 2019, 11:25:42.543838 am
UUID: 7ef7fdda-3074-144f-8ff7-a728dbfc50a2
Ancestors: Morphic-mt.1541

Now that we have an MVC parent project and the project name is visible in the main docking bar, make that label clickable to open the change sorter. :-)

=============== Diff against Morphic-mt.1541 ===============

Item was added:
+ ----- Method: DockingBarMorph>>addUpdatingItem: (in category 'construction') -----
+ addUpdatingItem: aBlock
+ 	| item |
+ 	item := DockingBarUpdatingItemMorph new.
+ 	aBlock value: item.
+ 	self addMorphBack: item!

Item was added:
+ ----- Method: DockingBarMorph>>items (in category 'accessing') -----
+ items
+ 
+ 	^ submorphs select: [:m | m isKindOf: MenuItemMorph]!

Item was added:
+ UpdatingMenuItemMorph subclass: #DockingBarUpdatingItemMorph
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Morphic-Menus-DockingBar'!

Item was added:
+ ----- Method: DockingBarUpdatingItemMorph>>decorateOwner (in category 'as yet unclassified') -----
+ decorateOwner
+ 
+ 	"Ignore."!

Item was added:
+ ----- Method: DockingBarUpdatingItemMorph>>mouseEnter: (in category 'as yet unclassified') -----
+ mouseEnter: evt
+ 	"Do not hover docking bar items directory. Mouse-down required. But if you already see a submenu, support hovering."
+ 
+ 	owner selectedItem ifNotNil: [owner selectItem: self event: evt]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>browseChanges (in category 'right side') -----
+ browseChanges
+ 
+ 	ChangeSorter open.!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>browseChangesLabel (in category 'right side') -----
+ browseChangesLabel
+ 	"The project name is the same as the current change set."
+ 	
+ 	^ Project current name!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>createDockingBar (in category 'construction') -----
  createDockingBar
  	"Create a docking bar from the receiver's representation"
  	
  	| dockingBar |
  	dockingBar := DockingBarMorph new
  		adhereToTop;
  		borderWidth: 0.
  	self fillDockingBar: dockingBar.
+ 	"self labelIfNeeded: dockingBar."
- 	self labelIfNeeded: dockingBar.
  	^ dockingBar!

Item was removed:
- ----- Method: TheWorldMainDockingBar>>labelIfNeeded: (in category 'private') -----
- labelIfNeeded: aDockingBar 
- 	"Label the given docking bar with the project name, if needed"
- 	(aDockingBar submorphWithProperty: #projectNameMorph)
- 		contents: (Project current isTopProject ifTrue: [''] ifFalse: [Project current name]);
- 		fitContents!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>projectNameOn: (in category 'right side') -----
  projectNameOn: aDockingBar
+ 	
+ 	aDockingBar addUpdatingItem: [:item |
+ 		item
+ 			help: 'Browse this project''s changes';
+ 			target: self;
+ 			selector: #browseChanges;
+ 			wordingProvider: self
+ 			wordingSelector: #browseChangesLabel].!
- 	| morph |
- 	morph := StringMorph contents: ''.
- 	morph
- 		color: (self userInterfaceTheme textColor ifNil: [Color black]);
- 		font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]).
- 	morph setProperty: #projectNameMorph toValue: #projectNameMorph.
- 	aDockingBar addMorphBack: morph.
- 	self labelIfNeeded: aDockingBar!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>updateIfNeeded: (in category 'private') -----
  updateIfNeeded: aDockingBar 
  	"Update the given docking bar if needed"
  	| timeStamp |
  	timeStamp := aDockingBar
  					valueOfProperty: #mainDockingBarTimeStamp
  					ifAbsent: [].
  	timeStamp ~= self class timeStamp
  		ifTrue:
  			[aDockingBar
  				 release;
  				 removeAllMorphs.
+ 			 self fillDockingBar: aDockingBar]!
- 			 self fillDockingBar: aDockingBar]
- 		ifFalse:
- 			[self labelIfNeeded: aDockingBar]!

Item was added:
+ ----- Method: UpdatingMenuItemMorph>>decorateOwner (in category 'world') -----
+ decorateOwner
+ 
+ 	MenuIcons decorateMenu: owner.!

Item was changed:
  ----- Method: UpdatingMenuItemMorph>>updateContents (in category 'world') -----
  updateContents
  	"Update the receiver's contents"
  
  	| newString enablement nArgs |
  	((wordingProvider isNil) or: [wordingSelector isNil]) ifFalse: [
  		nArgs := wordingSelector numArgs.
  		newString := nArgs = 0
  			ifTrue:
  				[wordingProvider perform: wordingSelector]
  			ifFalse:
  				[(nArgs = 1 and: [wordingArgument notNil])
  					ifTrue:
  						[wordingProvider perform: wordingSelector with: wordingArgument]
  					ifFalse:
  						[nArgs == arguments size ifTrue:
  							[wordingProvider perform: wordingSelector withArguments: arguments]]].
  		newString = (self contentString ifNil: [ contents ])
  			ifFalse: [self contents: newString.
+ 				self decorateOwner ]].
- 				MenuIcons decorateMenu: owner ]].
  	enablementSelector ifNotNil:
  		[(enablement := self enablement) == isEnabled 
  			ifFalse:	[self isEnabled: enablement]]!



More information about the Packages mailing list