From 4654a35e7245f44d742236ca1c5c2fbf1140d8c3 Mon Sep 17 00:00:00 2001 From: Jan Bliznicenko Date: Thu, 24 Oct 2024 18:57:21 +0200 Subject: [PATCH] code cleanup, typo fix --- .../OpenPonk-Core/DoubleLink.extension.st | 41 ------------------- .../OpenPonk-Core/OPDiagramElement.class.st | 14 +++++++ repository/OpenPonk-Core/UUID.extension.st | 7 +--- .../OSWindowMorphicEventHandler.extension.st | 9 ++-- .../OpenPonk-Roassal/Announcer.extension.st | 15 ------- .../OPRSControlConfiguration.class.st | 2 +- 6 files changed, 20 insertions(+), 68 deletions(-) delete mode 100644 repository/OpenPonk-Core/DoubleLink.extension.st delete mode 100644 repository/OpenPonk-Roassal/Announcer.extension.st diff --git a/repository/OpenPonk-Core/DoubleLink.extension.st b/repository/OpenPonk-Core/DoubleLink.extension.st deleted file mode 100644 index 80ad6399..00000000 --- a/repository/OpenPonk-Core/DoubleLink.extension.st +++ /dev/null @@ -1,41 +0,0 @@ -Extension { #name : 'DoubleLink' } - -{ #category : '*OpenPonk-Core-accessing' } -DoubleLink >> addPredecessor: aLink [ - | oldPredeccessor | - oldPredeccessor := self previousLink. - oldPredeccessor nextLink: aLink. - aLink previousLink: oldPredeccessor. - aLink nextLink: self. - self previousLink: aLink -] - -{ #category : '*OpenPonk-Core-accessing' } -DoubleLink >> addSuccessor: aLink [ - | oldSuccessor | - oldSuccessor := self nextLink. - oldSuccessor previousLink: aLink. - aLink nextLink: oldSuccessor. - aLink previousLink: self. - self nextLink: aLink -] - -{ #category : '*OpenPonk-Core-accessing' } -DoubleLink >> next [ - ^ self nextLink -] - -{ #category : '*OpenPonk-Core-accessing' } -DoubleLink >> previous [ - ^ self previousLink -] - -{ #category : '*OpenPonk-Core-accessing' } -DoubleLink >> removeLink [ - | predecessor successor | - predecessor := self previousLink. - successor := self nextLink. - predecessor nextLink: successor. - successor previousLink: predecessor. - self clearLinks -] diff --git a/repository/OpenPonk-Core/OPDiagramElement.class.st b/repository/OpenPonk-Core/OPDiagramElement.class.st index 758aa1a4..d8294de3 100644 --- a/repository/OpenPonk-Core/OPDiagramElement.class.st +++ b/repository/OpenPonk-Core/OPDiagramElement.class.st @@ -372,6 +372,20 @@ OPDiagramElement >> owningElement: aDiagramElement [ to: aDiagramElement ] +{ #category : 'actions' } +OPDiagramElement >> pushBack [ + + roassalShape ifNil: [ ^ self ]. + roassalShape pushBack +] + +{ #category : 'actions' } +OPDiagramElement >> pushFront [ + + roassalShape ifNil: [ ^ self ]. + roassalShape pushFront +] + { #category : 'removing' } OPDiagramElement >> remove [ diff --git a/repository/OpenPonk-Core/UUID.extension.st b/repository/OpenPonk-Core/UUID.extension.st index 75365fb1..90296200 100644 --- a/repository/OpenPonk-Core/UUID.extension.st +++ b/repository/OpenPonk-Core/UUID.extension.st @@ -1,13 +1,8 @@ Extension { #name : 'UUID' } -{ #category : '*OpenPonk-Core' } -UUID >> displayStringOn: aStream [ - - self printOn: aStream -] - { #category : '*OpenPonk-Core' } UUID class >> fromSton: stonReader [ + "Backwards compatibility - UUID used to be printed differently" stonReader peek = $[ ifTrue: [ ^ super new diff --git a/repository/OpenPonk-Morphic/OSWindowMorphicEventHandler.extension.st b/repository/OpenPonk-Morphic/OSWindowMorphicEventHandler.extension.st index e9eb7292..4295db89 100644 --- a/repository/OpenPonk-Morphic/OSWindowMorphicEventHandler.extension.st +++ b/repository/OpenPonk-Morphic/OSWindowMorphicEventHandler.extension.st @@ -3,11 +3,10 @@ Extension { #name : 'OSWindowMorphicEventHandler' } { #category : '*OpenPonk-Morphic' } OSWindowMorphicEventHandler >> dispatchMorphicEvent: anEvent [ - (anEvent isKindOf: MouseMoveEvent) ifTrue: [ - morphicWorld worldState deferredUIMessages flushAllSuchThat: [ - :each | + (anEvent isKindOf: MouseMoveEvent) ifTrue: [ + morphicWorld worldState deferredUIMessages flushAllSuchThat: [ :each | each size = 1 and: [ (each at: 1) isKindOf: MouseMoveEvent ] ] ]. - morphicWorld defer: [ - (morphicWorld activeHand isNotNil and: [ anEvent hand isNotNil ]) + morphicWorld defer: [ + (morphicWorld activeHand isNotNil and: [ anEvent hand isNotNil ]) ifTrue: [ morphicWorld activeHand handleEvent: anEvent ] ] ] diff --git a/repository/OpenPonk-Roassal/Announcer.extension.st b/repository/OpenPonk-Roassal/Announcer.extension.st deleted file mode 100644 index d19f670e..00000000 --- a/repository/OpenPonk-Roassal/Announcer.extension.st +++ /dev/null @@ -1,15 +0,0 @@ -Extension { #name : 'Announcer' } - -{ #category : '*OpenPonk-Roassal' } -Announcer >> suspendAllOf: anObject while: aBlock [ - - | originalSubscriptions result | - originalSubscriptions := OrderedCollection new. - self subscriptions - subscriptionsOf: anObject - do: [ :each | originalSubscriptions add: each copy ]. - self unsubscribe: anObject. - result := aBlock value. - originalSubscriptions do: [ :each | self basicSubscribe: each ]. - ^ result -] diff --git a/repository/OpenPonk-Roassal/OPRSControlConfiguration.class.st b/repository/OpenPonk-Roassal/OPRSControlConfiguration.class.st index 28a68a87..f629e981 100644 --- a/repository/OpenPonk-Roassal/OPRSControlConfiguration.class.st +++ b/repository/OpenPonk-Roassal/OPRSControlConfiguration.class.st @@ -92,7 +92,7 @@ OPRSControlConfiguration class >> settingsOn: aBuilder [ (aBuilder setting: #dragSnapMargin) parent: #openponk; target: self; - label: 'Margin for srag snapping'; + label: 'Margin for drag snapping'; description: 'When dragging a shape, it snaps to a horizontally or vertically aligned shapes within this margin, ie. in case of horizontal snapping, how much below of above the shapes can be to still snap to it.'; order: 72;