Nicolas Cellier uploaded a new version of SMBase to project The Trunk:
http://source.squeak.org/trunk/SMBase-nice.138.mcz
==================== Summary ====================
Name: SMBase-nice.138
Author: nice
Time: 10 June 2017, 5:55:05.442161 pm
UUID: c5484d1d-8a60-447e-ad2b-35cb02f2bd64
Ancestors: SMBase-ul.137
Massively replace ifNotNilDo: by ifNotNil:
We don't need two different selectors to do a single thing.
=============== Diff against SMBase-ul.137 ===============
Item was changed:
----- Method: SMInstallationRegistry>>noteInstalledPackageWithId:autoVersion:name: (in category 'installation') -----
noteInstalledPackageWithId: aPackageId autoVersion: aVersion name: aName
"The package release was just successfully installed.
Can be used to inform SM of an installation not been
done using SM, even when the map isn't loaded.
We record the fact in our Dictionary of installed packages
and log a 'do it' to mark this in the changelog.
The doit helps keeping track of the packages when
recovering changes etc - not a perfect solution but should help.
The map used is the default map.
The id of the package is the key and the value is an OrderedCollection
of Arrays with the release auto version, the point in time and the current installCounter."
| time name id v |
v := aVersion isString ifTrue: [aVersion asVersion] ifFalse: [aVersion].
aName ifNil: [name := '<unknown package name>'] ifNotNil: [name := aName].
id := UUID fromString: aPackageId.
time := Time totalSeconds.
self countInstall.
self markInstalled: id version: v time: time counter: installCounter.
+ (((Smalltalk classNamed: 'SmalltalkImage') ifNotNil: [:si | si current]) ifNil: [Smalltalk])
- (((Smalltalk classNamed: 'SmalltalkImage') ifNotNilDo: [:si | si current]) ifNil: [Smalltalk])
logChange: '"Installed ', name, ' auto version ', v versionString, '".
(Smalltalk at: #SMSqueakMap ifAbsent: []) ifNotNil:[
SMSqueakMap noteInstalledPackageWithId: ', id asString storeString, ' autoVersion: ', v storeString, ' atSeconds: ', time asString, ' number: ', installCounter asString, ']'!
Item was changed:
----- Method: SMInstallationRegistry>>noteUninstalledPackageWithId:autoVersion:name: (in category 'installation') -----
noteUninstalledPackageWithId: aPackageId autoVersion: aVersion name: aName
"The package release was just successfully uninstalled.
Can be used to inform SM of an uninstallation not been
done using SM, even when the map isn't loaded.
We record the fact in our Dictionary of installed packages
and log a 'do it' to mark this in the changelog.
The doit helps keeping track of the packages when
recovering changes etc - not a perfect solution but should help.
The map used is the default map.
The id of the package is the key and the value is an OrderedCollection
of Arrays with the release auto version, the point in time and the current installCounter."
| time name id v |
v := aVersion isString ifTrue: [aVersion asVersion] ifFalse: [aVersion].
aName ifNil: [name := '<unknown package name>'] ifNotNil: [name := aName].
id := UUID fromString: aPackageId.
time := Time totalSeconds.
self countInstall. "Used for both installs and uninstalls"
self clearInstalled: id version: v time: time counter: installCounter.
+ (((Smalltalk classNamed: 'SmalltalkImage') ifNotNil: [:si | si current]) ifNil: [Smalltalk])
- (((Smalltalk classNamed: 'SmalltalkImage') ifNotNilDo: [:si | si current]) ifNil: [Smalltalk])
logChange: '"Uninstalled ', name, ' auto version ', v versionString, '".
(Smalltalk at: #SMSqueakMap ifAbsent: []) ifNotNil:[
SMSqueakMap noteUninstalledPackageWithId: ', id asString storeString, ' autoVersion: ', v storeString, ' atSeconds: ', time asString, ' number: ', installCounter asString, ']'!
Item was changed:
----- Method: SMInstaller class>>classForPackageRelease: (in category 'instance creation') -----
classForPackageRelease: aPackageRelease
"Decide which subclass to instantiate.
We detect and return the first subclass
that wants to handle the release going
recursively leaf first so that subclasses gets
first chance if several classes compete over
the same packages, like for example SMDVSInstaller
that also uses the .st file extension."
self subclasses do: [:ea |
(ea classForPackageRelease: aPackageRelease)
+ ifNotNil: [:class | ^ class]].
- ifNotNilDo: [:class | ^ class]].
^(self canInstall: aPackageRelease)
ifTrue: [self]!
Item was changed:
----- Method: SMPackage>>installedVersion (in category 'printing') -----
installedVersion
"Return the version String for the installed version.
We ask the map. Return nil if this package is not installed."
+ ^self installedRelease ifNotNil: [:r | r smartVersion]!
- ^self installedRelease ifNotNilDo: [:r | r smartVersion]!
Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.207.mcz
==================== Summary ====================
Name: MorphicExtras-nice.207
Author: nice
Time: 10 June 2017, 5:52:47.062634 pm
UUID: 157ef560-9a00-4d80-a341-9b1292a4cbae
Ancestors: MorphicExtras-nice.206
Massively replace ifNotNilDo: by ifNotNil:
We don't need two different selectors to do a single thing.
=============== Diff against MorphicExtras-nice.206 ===============
Item was changed:
----- Method: Flaps class>>addAndEnableEToyFlaps (in category 'predefined flaps') -----
addAndEnableEToyFlaps
"Initialize the standard default out-of-box set of global flaps. This method creates them and places them in my class variable #SharedFlapTabs, but does not itself get them displayed."
| aSuppliesFlap |
SharedFlapTabs
ifNotNil: [^ self].
SharedFlapTabs := OrderedCollection new.
aSuppliesFlap := self newSuppliesFlapFromQuads: self quadsDefiningPlugInSuppliesFlap positioning: #right.
aSuppliesFlap referent setNameTo: 'Supplies Flap' translated. "Per request from Kim Rose, 7/19/02"
SharedFlapTabs add: aSuppliesFlap. "The #center designation doesn't quite work at the moment"
(Smalltalk globals at: #SugarNavigatorBar ifPresent: [:c | c showSugarNavigator] ifAbsent: [false])
ifTrue: [SharedFlapTabs add: self newSugarNavigatorFlap]
ifFalse: [Preferences showProjectNavigator
ifTrue:[ SharedFlapTabs add: self newNavigatorFlap]].
self enableGlobalFlapWithID: 'Supplies' translated.
(Smalltalk globals at: #SugarNavigatorBar ifPresent: [:c | c showSugarNavigator] ifAbsent: [false])
ifTrue:
[self enableGlobalFlapWithID: 'Sugar Navigator Flap' translated.
+ (self globalFlapTabWithID: 'Sugar Navigator Flap' translated) ifNotNil:
- (self globalFlapTabWithID: 'Sugar Navigator Flap' translated) ifNotNilDo:
[:navTab | aSuppliesFlap sugarNavTab: navTab]]
ifFalse: [
Preferences showProjectNavigator
ifTrue:[ self enableGlobalFlapWithID: 'Navigator' translated]].
SharedFlapsAllowed := true.
Project current flapsSuppressed: false.
^ SharedFlapTabs
"Flaps addAndEnableEToyFlaps"!
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.1341.mcz
==================== Summary ====================
Name: Morphic-nice.1341
Author: nice
Time: 10 June 2017, 5:51:03.006817 pm
UUID: c151c809-e1f1-4fd4-92a0-e4911d6960fe
Ancestors: Morphic-eem.1340
Massively replace ifNotNilDo: by ifNotNil:
We don't need two different selectors to do a single thing.
=============== Diff against Morphic-eem.1340 ===============
Item was changed:
----- Method: Morph>>dismissMorph (in category 'meta-actions') -----
dismissMorph
"This is called from an explicit halo destroy/delete action.
So first disconnect all constraints to keep the graph up to date."
(self respondsTo: #disconnectAllConstraints) "Connectors package"
ifTrue: [ self perform: #disconnectAllConstraints ].
(self respondsTo: #releaseGraphModels) "CGPrereqs package (Connectors)"
ifTrue: [ self perform: #releaseGraphModels ].
+ self world ifNotNil:
- self world ifNotNilDo:
[:w | w abandonAllHalos; stopStepping: self].
self delete!
Item was changed:
----- Method: SketchMorph>>collapse (in category 'menus') -----
collapse
"Replace the receiver with a collapsed rendition of itself."
| w collapsedVersion a ht tab |
(w := self world) ifNil: [^self].
collapsedVersion := (self imageForm scaledToSize: 50@50) asMorph.
collapsedVersion setProperty: #uncollapsedMorph toValue: self.
collapsedVersion on: #mouseUp send: #uncollapseSketch to: collapsedVersion.
collapsedVersion setBalloonText: ('A collapsed version of {1}. Click to open it back up.' translated format: {self externalName}).
self delete.
w addMorphFront: (
a := AlignmentMorph newRow
hResizing: #shrinkWrap;
vResizing: #shrinkWrap;
borderWidth: 4;
borderColor: Color white;
addMorph: collapsedVersion;
yourself).
a setNameTo: self externalName.
ht := (tab := Smalltalk at: #SugarNavTab ifPresent: [:c | ActiveWorld findA: c])
ifNotNil:
[tab height]
ifNil:
[80].
a position: 0@ht.
collapsedVersion setProperty: #collapsedMorphCarrier toValue: a.
+ (self valueOfProperty: #collapsedPosition) ifNotNil:
- (self valueOfProperty: #collapsedPosition) ifNotNilDo:
[:priorPosition |
a position: priorPosition]!
Item was changed:
----- Method: SmalltalkEditor>>buttonForIt (in category 'do-its') -----
buttonForIt
+ ^ self doItButtonFromSelection ifNotNil: [:e | e openInHand]!
- ^ self doItButtonFromSelection ifNotNilDo: [:e | e openInHand]!
Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-nice.670.mcz
==================== Summary ====================
Name: Monticello-nice.670
Author: nice
Time: 10 June 2017, 5:49:59.546878 pm
UUID: 590e192e-d0a0-435a-a012-0c4859896286
Ancestors: Monticello-topa.669
Massively replace ifNotNilDo: by ifNotNil:
We don't need two different selectors to do a single thing.
=============== Diff against Monticello-topa.669 ===============
Item was changed:
----- Method: MCCodeTool>>copyReference (in category 'menus') -----
copyReference
"Copy the selected selector to the clipboard"
+ self selectedMessageName ifNotNil:
- self selectedMessageName ifNotNilDo:
[ : selector | Clipboard clipboardText:
(self selectedClassOrMetaClass
ifNil: [ selector asString ]
ifNotNilDo: [ : cls | (cls >> selector) reference ]) ]!
Item was changed:
----- Method: MCDefinition>>mcModel (in category 'private') -----
mcModel
"Find my WorkingCopy, use the first mcModel-capable repository in its reposigoryGroup."
self repositoryGroup ifNotNil:
[ : group | group repositoriesDo:
+ [ : each | each mcModel ifNotNil:
- [ : each | each mcModel ifNotNilDo:
[ : mcModel | ^ mcModel ] ] ].
^ nil!
Item was changed:
----- Method: MCRepositoryInspector>>versionListMenu: (in category 'morphic ui') -----
versionListMenu: aMenu
1 to: self orderSpecs size do: [ :index |
aMenu addUpdating: #orderString: target: self selector: #order: argumentList: { index } ].
aMenu addLine.
aMenu add: 'Changes against ...' action: [| ri |
ri := aMenu defaultTarget.
(UIManager default
chooseFrom: ri versionList
values: ri versionList
+ title: 'Select version to show patch against ...') ifNotNil: [:name |
- title: 'Select version to show patch against ...') ifNotNilDo: [:name |
| versionName target base |
versionName := MCVersionName on: name.
target := ri repository versionNamed: ri versionInfo name.
base := aMenu defaultTarget repository versionNamed: versionName.
(MCPatchBrowser
forPatch: (target snapshot patchRelativeToBase: base snapshot))
showLabelled: 'Changes from ', versionName, ' to ', ri versionInfo name]].
^aMenu!
Item was changed:
----- Method: MCWorkingCopyBrowser>>addPackageRepository (in category 'actions') -----
addPackageRepository
workingCopy ifNotNil:
[
(self pickRepositorySatisfying: [ :repos | (workingCopy repositoryGroup includes: repos) not ])
+ ifNotNil:
- ifNotNilDo:
[:repos |
workingCopy repositoryGroup addRepository: repos.
self repository: repos.
self
changed: #repositoryList;
changed: #repositorySelection.
self changedButtons]]!
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.330.mcz
==================== Summary ====================
Name: KernelTests-nice.330
Author: nice
Time: 10 June 2017, 5:48:42.935057 pm
UUID: 356066a2-7666-4b6f-be07-5158f997854f
Ancestors: KernelTests-eem.329
don't testIfNotNilDo, we might deprecate this message and this exact behavior is already tested in testIfNotNil
=============== Diff against KernelTests-eem.329 ===============
Item was removed:
- ----- Method: UndefinedObjectTest>>testIfNotNilDo (in category 'tests - testing') -----
- testIfNotNilDo
-
- self shouldnt: [ nil ifNotNilDo: [self halt]] raise: Halt.
- !
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.952.mcz
==================== Summary ====================
Name: System-eem.952
Author: eem
Time: 8 June 2017, 10:19:20.182777 am
UUID: 2d764b04-5c3e-4cfc-98c1-d96bc5a92ac7
Ancestors: System-eem.951
Add an "open window at pointer" preference. Harvested from Terf.
=============== Diff against System-eem.951 ===============
Item was changed:
Object subclass: #RealEstateAgent
instanceVariableNames: ''
+ classVariableNames: 'PlaceWindowsAtPointer ReverseStaggerOffset StaggerOffset StaggerOrigin StandardSize StandardWindowOrigins'
- classVariableNames: 'ReverseStaggerOffset StaggerOffset StaggerOrigin StandardSize StandardWindowOrigins'
poolDictionaries: ''
category: 'System-Support'!
!RealEstateAgent commentStamp: '<historical>' prior: 0!
Responsible for real-estate management on the screen, which is to say, controlling where new windows appear, with what sizes, etc. 5/20/96 sw!
Item was added:
+ ----- Method: RealEstateAgent class>>initialFrameAtPointerFor:initialExtent:world: (in category 'framing - private') -----
+ initialFrameAtPointerFor: aView initialExtent: scaledExtent world: aWorld
+ ^(aWorld cursorPoint - (50@10) "puts use with the mouse ptr just to the right of the menu button"
+ extent: scaledExtent)
+ translatedAndSquishedToBeWithin: (self maximumUsableAreaInWorld: aWorld)!
Item was changed:
----- Method: RealEstateAgent class>>initialFrameFor:initialExtent:world: (in category 'framing') -----
initialFrameFor: aView initialExtent: initialExtent world: aWorld
-
| scaledExtent |
scaledExtent := (initialExtent * self scaleFactor) rounded.
+ self placeWindowsAtPointer ifTrue:
+ [^self initialFrameAtPointerFor: aView initialExtent: scaledExtent world: aWorld].
+
^ Preferences reverseWindowStagger
ifTrue: [self strictlyStaggeredInitialFrameFor: aView initialExtent: scaledExtent world: aWorld]
ifFalse: [self normalInitialFrameFor: aView initialExtent: scaledExtent world: aWorld]!
Item was added:
+ ----- Method: RealEstateAgent class>>placeWindowsAtPointer (in category 'preferences') -----
+ placeWindowsAtPointer
+ "Value of the place-windows-at-pointer preference."
+ <preference: 'Place Windows At Pointer'
+ category: 'windows'
+ description: 'When true, place new windows near the mouse pointer'
+ type: #Boolean>
+ ^PlaceWindowsAtPointer ifNil: [false]!
Item was added:
+ ----- Method: RealEstateAgent class>>placeWindowsAtPointer: (in category 'preferences') -----
+ placeWindowsAtPointer: aBool
+ "Value of the place-windows-at-pointer preference."
+ PlaceWindowsAtPointer := aBool!