From eede63599c7e0e132969309b46fabfc6a3f1086b Mon Sep 17 00:00:00 2001 From: Maximilian Koenig Date: Thu, 28 Jun 2018 14:19:08 +0200 Subject: [PATCH 01/22] Refactored shortcuts Closed #22 --- .../instance/chooseShortcutsDictionary..st | 6 +++++ .../instance/filterEvent.for..st | 7 ++++-- .../instance/initializeShortcuts.st | 6 ++++- .../instance/keyStroke..st | 19 ++++----------- .../instance/presentationCommandShortcuts..st | 4 ++++ .../instance/presentationCommandShortcuts.st | 4 ++++ .../presentationCreationCommandShortcuts..st | 4 ++++ .../presentationCreationCommandShortcuts.st | 4 ++++ ...resentationCreationModeCommandShortcuts.st | 6 +++++ .../presentationCreationModeShortcuts.st | 2 +- .../presentationCreationShortcuts..st | 4 ++-- .../presentationModeCommandShortcuts.st | 4 ++++ .../instance/presentationModeShortcuts.st | 2 +- .../instance/presentationShortcuts..st | 4 ++-- .../instance/sharedCommandShortcuts.st | 6 +++++ .../instance/sharedShortcuts.st | 15 ++++++------ .../methodProperties.json | 24 ++++++++++++------- .../PSSlideContainer.class/properties.json | 4 +++- 18 files changed, 86 insertions(+), 39 deletions(-) create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/chooseShortcutsDictionary..st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts..st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts.st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts..st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts.st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeCommandShortcuts.st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeCommandShortcuts.st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedCommandShortcuts.st diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/chooseShortcutsDictionary..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/chooseShortcutsDictionary..st new file mode 100644 index 0000000..91e1b87 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/chooseShortcutsDictionary..st @@ -0,0 +1,6 @@ +events-processing +chooseShortcutsDictionary: evt + + ^ evt commandKeyPressed + ifTrue: [ {self presentationCommandShortcuts . self presentationCreationCommandShortcuts} ] + ifFalse: [ {self presentationShortcuts . self presentationCreationShortcuts} ] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/filterEvent.for..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/filterEvent.for..st index e91c784..d194374 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/filterEvent.for..st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/filterEvent.for..st @@ -2,9 +2,12 @@ events-processing filterEvent: evt for: aMorphOrNil self isInteractive - ifFalse: [ + ifFalse: [ | shortcuts | + shortcuts := evt commandKeyPressed + ifTrue: [self presentationCommandShortcuts] + ifFalse: [self presentationShortcuts]. (evt isKeyboard and: [evt isKeystroke]) - ifTrue: [self in: self presentationShortcuts tryToEvaluate: evt]. + ifTrue: [self in: shortcuts tryToEvaluate: evt]. evt ignore]. ^ evt \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/initializeShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/initializeShortcuts.st index 6998b60..22ac2ff 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/initializeShortcuts.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/initializeShortcuts.st @@ -2,8 +2,12 @@ initialize-release initializeShortcuts self presentationShortcuts: Dictionary new. + self presentationCommandShortcuts: Dictionary new. self presentationCreationShortcuts: Dictionary new. + self presentationCreationCommandShortcuts: Dictionary new. - self initializeShortcuts: self presentationModeShortcuts in: self presentationShortcuts. + self initializeShortcuts: self presentationModeShortcuts in: self presentationShortcuts. + self initializeShortcuts: self presentationModeCommandShortcuts in: self presentationCommandShortcuts. + self initializeShortcuts: self presentationCreationModeCommandShortcuts in: self presentationCreationCommandShortcuts. self initializeShortcuts: self presentationCreationModeShortcuts in: self presentationCreationShortcuts \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st index 74c885c..4a80348 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st @@ -1,19 +1,10 @@ events-processing keyStroke: evt - | shortcuts | + | shortcuts choices | + choices := self chooseShortcutsDictionary: evt. shortcuts := self model presentationMode - ifTrue: [self presentationShortcuts] - ifFalse: [self presentationCreationShortcuts]. + ifTrue: [choices first] + ifFalse: [choices second]. - self in: shortcuts tryToEvaluate: evt - "evt keyCharacter caseOf: { - [Character escape] -> [self model disablePresentationMode]. - [Character arrowRight] -> [self model nextSlide]. - [Character arrowLeft] -> [self model previousSlide]. - [Character pageUp] -> [self model previousSlide]. - [Character pageDown] -> [self model nextSlide]. - [$i] -> [self toggleInteractivity]} - otherwise: [ - evt keyCharacter isDigit - ifTrue: [self model selectSlide: evt keyCharacter digitValue]]" + self in: shortcuts tryToEvaluate: evt \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts..st new file mode 100644 index 0000000..3e34cc0 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts..st @@ -0,0 +1,4 @@ +accessing +presentationCommandShortcuts: aDictionary + + presentationCommandShortcuts := aDictionary diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts.st new file mode 100644 index 0000000..e077a7a --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCommandShortcuts.st @@ -0,0 +1,4 @@ +accessing +presentationCommandShortcuts + + ^ presentationCommandShortcuts diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts..st new file mode 100644 index 0000000..087386f --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts..st @@ -0,0 +1,4 @@ +accessing +presentationCreationCommandShortcuts: aDictionary + + presentationCreationCommandShortcuts := aDictionary \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts.st new file mode 100644 index 0000000..2ea6a17 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationCommandShortcuts.st @@ -0,0 +1,4 @@ +accessing +presentationCreationCommandShortcuts + + ^ presentationCreationCommandShortcuts diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeCommandShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeCommandShortcuts.st new file mode 100644 index 0000000..3b0aa1c --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeCommandShortcuts.st @@ -0,0 +1,6 @@ +accessing +presentationCreationModeCommandShortcuts + "{character that triggers event . action block . description}" + ^ { + {$i . [self model newImageField] . 'Open file chooser for selecting an image'} + }, self sharedCommandShortcuts \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeShortcuts.st index 20b85c5..540c3a0 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeShortcuts.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationModeShortcuts.st @@ -1,4 +1,4 @@ accessing presentationCreationModeShortcuts "{character that triggers event . action block . description}" - ^ { }, self sharedShortcuts \ No newline at end of file + ^ {}, self sharedShortcuts \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationShortcuts..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationShortcuts..st index df4e6d9..90cb33c 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationShortcuts..st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationCreationShortcuts..st @@ -1,4 +1,4 @@ accessing -presentationCreationShortcuts: anObject +presentationCreationShortcuts: aDictionary - presentationCreationShortcuts := anObject + presentationCreationShortcuts := aDictionary diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeCommandShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeCommandShortcuts.st new file mode 100644 index 0000000..d97567c --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeCommandShortcuts.st @@ -0,0 +1,4 @@ +accessing +presentationModeCommandShortcuts + "{character that trggers event . action block . discription}" + ^ {}, self sharedCommandShortcuts \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeShortcuts.st index eec4e2c..f208504 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeShortcuts.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationModeShortcuts.st @@ -2,5 +2,5 @@ accessing presentationModeShortcuts "{character that trggers event . action block . discription}" ^ { - {$i . [self toggleInteractivity] . 'toggles iteractive/non interactive mode'} + {$i . [self toggleInteractivity] . 'Toggle iteractive/non interactive mode'} }, self sharedShortcuts \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationShortcuts..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationShortcuts..st index eca8341..d53a06f 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationShortcuts..st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/presentationShortcuts..st @@ -1,4 +1,4 @@ accessing -presentationShortcuts: anObject +presentationShortcuts: aDictionary - presentationShortcuts := anObject + presentationShortcuts := aDictionary diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedCommandShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedCommandShortcuts.st new file mode 100644 index 0000000..fdf7be3 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedCommandShortcuts.st @@ -0,0 +1,6 @@ +accessing +sharedCommandShortcuts + + ^ { + {$t . [self model newTextField] . 'Create new textField in hand'} + } \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st index edcb24b..59f609b 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st @@ -2,13 +2,14 @@ accessing sharedShortcuts ^ { - {Character escape . [self model disablePresentationMode] . 'disables Presentation Mode'}. - {Character arrowRight . [self model nextSlide] . 'goes to the next slide'}. - {Character pageDown . [self model nextSlide] . 'goes to the next slide'}. - {Character arrowDown . [self model nextSlide] . 'goes to the next slide'}. - {Character arrowLeft . [self model previousSlide] . 'goes to the previous slide'}. - {Character pageUp . [self model previousSlide] . 'goes to the previous slide'}. - {Character arrowUp . [self model previousSlide] . 'goes to the previous slide'}. + {Character escape . [self model disablePresentationMode] . 'Disable Presentation Mode'}. + {Character arrowRight . [self model nextSlide] . 'Go to the next slide'}. + {Character pageDown . [self model nextSlide] . 'Go to the next slide'}. + {Character arrowDown . [self model nextSlide] . 'Go to the next slide'}. + {Character arrowLeft . [self model previousSlide] . 'Go to the previous slide'}. + {Character pageUp . [self model previousSlide] . 'Go to the previous slide'}. + {Character arrowUp . [self model previousSlide] . 'Go to the previous slide'}. + {$1 . [self model selectSlide: 1] . 'Go to slide number 1'}. {$2 . [self model selectSlide: 2] . 'Go to slide number 2'}. {$3 . [self model selectSlide: 3] . 'Go to slide number 3'}. diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json index cd9767d..53ceaec 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json @@ -3,6 +3,7 @@ }, "instance" : { "beKeyWindow" : "WoC 6/3/2018 00:10", + "chooseShortcutsDictionary:" : "MK 6/28/2018 14:06", "currentSlide" : "MK 5/6/2018 13:56", "currentSlide:" : "MK 5/6/2018 15:51", "defaultColor" : "MK 5/25/2018 15:41", @@ -12,31 +13,38 @@ "enableNonInteractiveMode" : "WoC 6/15/2018 19:19", "enablePresentationMode" : "LM 6/22/2018 15:40", "ensurePreviousOwnerIsNotSubmorph" : "LM 6/1/2018 20:13", - "filterEvent:for:" : "WoC 6/17/2018 13:04", + "filterEvent:for:" : "MK 6/28/2018 14:12", "handlesKeyboard:" : "WoC 6/15/2018 17:00", "in:tryToEvaluate:" : "WoC 6/15/2018 17:07", "initialize" : "WoC 6/15/2018 18:00", - "initializeShortcuts" : "WoC 6/15/2018 16:40", + "initializeShortcuts" : "MK 6/28/2018 13:44", "initializeShortcuts:in:" : "WoC 6/15/2018 15:57", "initializeStyle" : "WoC 6/15/2018 16:00", "isCollapsed" : "LM 6/6/2018 18:13", "isInteractive" : "WoC 6/15/2018 14:55", "isInteractive:" : "WoC 6/15/2018 14:55", "isSystemWindow" : "WoC 6/4/2018 17:35", - "keyStroke:" : "WoC 6/15/2018 18:49", + "keyStroke:" : "MK 6/28/2018 13:56", "lookUnfocused" : "WoC 6/4/2018 17:13", "makeMeVisible" : "WoC 6/3/2018 00:10", "notification" : "WoC 6/15/2018 19:21", "notification:" : "WoC 6/15/2018 19:21", - "presentationCreationModeShortcuts" : "WoC 6/15/2018 19:32", + "presentationCommandShortcuts" : "MK 6/28/2018 13:40", + "presentationCommandShortcuts:" : "MK 6/28/2018 14:03", + "presentationCreationCommandShortcuts" : "MK 6/28/2018 13:40", + "presentationCreationCommandShortcuts:" : "MK 6/28/2018 14:03", + "presentationCreationModeCommandShortcuts" : "MK 6/28/2018 14:14", + "presentationCreationModeShortcuts" : "MK 6/28/2018 14:14", "presentationCreationShortcuts" : "WoC 6/15/2018 15:55", - "presentationCreationShortcuts:" : "WoC 6/15/2018 15:55", - "presentationModeShortcuts" : "WoC 6/15/2018 19:32", + "presentationCreationShortcuts:" : "MK 6/28/2018 14:02", + "presentationModeCommandShortcuts" : "MK 6/28/2018 14:15", + "presentationModeShortcuts" : "MK 6/28/2018 14:15", "presentationShortcuts" : "WoC 6/15/2018 15:55", - "presentationShortcuts:" : "WoC 6/15/2018 15:55", + "presentationShortcuts:" : "MK 6/28/2018 14:02", "previousOwner" : "MK 5/25/2018 15:31", "previousOwner:" : "MK 5/25/2018 15:32", - "sharedShortcuts" : "LM 6/24/2018 17:58", + "sharedCommandShortcuts" : "MK 6/28/2018 14:00", + "sharedShortcuts" : "MK 6/28/2018 14:01", "showNotification:" : "LM 6/22/2018 15:40", "showSlide:" : "LB 5/6/2018 16:49", "toggleInteractivity" : "WoC 6/15/2018 18:39", diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/properties.json b/packages/Presenter-Core.package/PSSlideContainer.class/properties.json index c34e8ac..70f16c1 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/properties.json +++ b/packages/Presenter-Core.package/PSSlideContainer.class/properties.json @@ -11,7 +11,9 @@ "isInteractive", "presentationShortcuts", "presentationCreationShortcuts", - "notification" ], + "notification", + "presentationCommandShortcuts", + "presentationCreationCommandShortcuts" ], "name" : "PSSlideContainer", "pools" : [ ], From a3fb73c0d5db832a49f38a335cc704f42e2209c2 Mon Sep 17 00:00:00 2001 From: Tom Braun Date: Fri, 29 Jun 2018 15:38:00 +0200 Subject: [PATCH 02/22] implemented slide miniatures --- .../PSMiniature.class/README.md | 0 .../PSMiniature.class/class/forSlide..st | 4 ++++ .../PSMiniature.class/instance/clickAction..st | 4 ++++ .../PSMiniature.class/instance/clickAction.st | 4 ++++ .../PSMiniature.class/instance/defaultSize.st | 4 ++++ .../instance/handlesMouseDown..st | 4 ++++ .../PSMiniature.class/instance/mouseDown..st | 4 ++++ .../PSMiniature.class/instance/setSlide..st | 5 +++++ .../PSMiniature.class/instance/slide..st | 4 ++++ .../PSMiniature.class/instance/slide.st | 4 ++++ .../PSMiniature.class/instance/updateImage.st | 4 ++++ .../PSMiniature.class/methodProperties.json | 13 +++++++++++++ .../PSMiniature.class/properties.json | 15 +++++++++++++++ .../PSSlideContainer.class/instance/keyStroke..st | 10 ---------- .../PSSlideContainer.class/methodProperties.json | 2 +- 15 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 packages/Presenter-Core.package/PSMiniature.class/README.md create mode 100644 packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/defaultSize.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/handlesMouseDown..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/setSlide..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/slide..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/slide.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/methodProperties.json create mode 100644 packages/Presenter-Core.package/PSMiniature.class/properties.json diff --git a/packages/Presenter-Core.package/PSMiniature.class/README.md b/packages/Presenter-Core.package/PSMiniature.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st b/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st new file mode 100644 index 0000000..f9c6697 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st @@ -0,0 +1,4 @@ +as yet unclassified +forSlide: aPSSlide + + ^ self new slide: aPSSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st new file mode 100644 index 0000000..ba533f2 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st @@ -0,0 +1,4 @@ +accessing +clickAction: aBlock + + clickAction := aBlock \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st new file mode 100644 index 0000000..7f6c465 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st @@ -0,0 +1,4 @@ +accessing +clickAction + + ^ clickAction ifNil: [[]] diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/defaultSize.st b/packages/Presenter-Core.package/PSMiniature.class/instance/defaultSize.st new file mode 100644 index 0000000..64ea8ef --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/defaultSize.st @@ -0,0 +1,4 @@ +accessing +defaultSize + + ^ 80 @ 60 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/handlesMouseDown..st b/packages/Presenter-Core.package/PSMiniature.class/instance/handlesMouseDown..st new file mode 100644 index 0000000..67e3af9 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/handlesMouseDown..st @@ -0,0 +1,4 @@ +as yet unclassified +handlesMouseDown: evt + + ^ true \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st b/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st new file mode 100644 index 0000000..95922dd --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st @@ -0,0 +1,4 @@ +as yet unclassified +mouseDown: evt + + self clickAction value \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/setSlide..st b/packages/Presenter-Core.package/PSMiniature.class/instance/setSlide..st new file mode 100644 index 0000000..5c351c8 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/setSlide..st @@ -0,0 +1,5 @@ +as yet unclassified +setSlide: aPSSlide + + self slide: aPSSlide. + self updateImage \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/slide..st b/packages/Presenter-Core.package/PSMiniature.class/instance/slide..st new file mode 100644 index 0000000..308dcb2 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/slide..st @@ -0,0 +1,4 @@ +accessing +slide: aPSSlide + + slide := aPSSlide diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/slide.st b/packages/Presenter-Core.package/PSMiniature.class/instance/slide.st new file mode 100644 index 0000000..e39d6d9 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/slide.st @@ -0,0 +1,4 @@ +accessing +slide + + ^ slide diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st new file mode 100644 index 0000000..ffac311 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st @@ -0,0 +1,4 @@ +as yet unclassified +updateImage + + self newForm: (self slide imageForm scaledToSize: self defaultSize) \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json new file mode 100644 index 0000000..4a2beea --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -0,0 +1,13 @@ +{ + "class" : { + "forSlide:" : "WoC 6/29/2018 15:31" }, + "instance" : { + "clickAction" : "WoC 6/29/2018 15:34", + "clickAction:" : "WoC 6/29/2018 15:33", + "defaultSize" : "WoC 6/29/2018 15:29", + "handlesMouseDown:" : "WoC 6/29/2018 15:33", + "mouseDown:" : "WoC 6/29/2018 15:34", + "setSlide:" : "WoC 6/29/2018 15:26", + "slide" : "WoC 6/29/2018 15:19", + "slide:" : "WoC 6/29/2018 15:33", + "updateImage" : "WoC 6/29/2018 15:28" } } diff --git a/packages/Presenter-Core.package/PSMiniature.class/properties.json b/packages/Presenter-Core.package/PSMiniature.class/properties.json new file mode 100644 index 0000000..8efb899 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/properties.json @@ -0,0 +1,15 @@ +{ + "category" : "Presenter-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "slide", + "clickAction" ], + "name" : "PSMiniature", + "pools" : [ + ], + "super" : "ImageMorph", + "type" : "normal" } diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st index 74c885c..3bdd4fc 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/keyStroke..st @@ -7,13 +7,3 @@ keyStroke: evt ifFalse: [self presentationCreationShortcuts]. self in: shortcuts tryToEvaluate: evt - "evt keyCharacter caseOf: { - [Character escape] -> [self model disablePresentationMode]. - [Character arrowRight] -> [self model nextSlide]. - [Character arrowLeft] -> [self model previousSlide]. - [Character pageUp] -> [self model previousSlide]. - [Character pageDown] -> [self model nextSlide]. - [$i] -> [self toggleInteractivity]} - otherwise: [ - evt keyCharacter isDigit - ifTrue: [self model selectSlide: evt keyCharacter digitValue]]" diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json index cd9767d..14a9426 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json @@ -23,7 +23,7 @@ "isInteractive" : "WoC 6/15/2018 14:55", "isInteractive:" : "WoC 6/15/2018 14:55", "isSystemWindow" : "WoC 6/4/2018 17:35", - "keyStroke:" : "WoC 6/15/2018 18:49", + "keyStroke:" : "WoC 6/28/2018 13:28", "lookUnfocused" : "WoC 6/4/2018 17:13", "makeMeVisible" : "WoC 6/3/2018 00:10", "notification" : "WoC 6/15/2018 19:21", From 261012093c6c9b786a0ccf2ca8e92355a11037da Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 15:39:28 +0200 Subject: [PATCH 03/22] Added slide miniature scolling pane - working on #7 --- .../instance/buildWith..st | 7 +++++-- .../instance/createMiniatureViewSpec..st | 14 ++++++++++++++ .../instance/createSlide.st | 1 + .../instance/deleteSlide..st | 1 + .../instance/miniatureViewLayoutFrame.st | 8 ++++++++ .../instance/miniatureViewWidth.st | 4 ++++ .../instance/slideMiniatures.st | 4 ++++ .../instance/updateSlideMiniatures.st | 4 ++++ .../instance/viewPortLayoutFrame.st | 2 +- .../PSPresentationTool.class/methodProperties.json | 13 +++++++++---- 10 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/createMiniatureViewSpec..st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewLayoutFrame.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewWidth.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/buildWith..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/buildWith..st index b109942..51abb74 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/buildWith..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/buildWith..st @@ -1,9 +1,12 @@ toolbuilder buildWith: builder - | windowSpec slideViewportSpec buttonBarTopSpec menuBarSpec window | + | windowSpec miniatureViewSpec slideViewportSpec buttonBarTopSpec menuBarSpec window | windowSpec := self createWindowSpec: builder. - + + miniatureViewSpec := self createMiniatureViewSpec: builder. + windowSpec children add: miniatureViewSpec. + slideViewportSpec := self createSlideViewportSpec: builder. windowSpec children add: slideViewportSpec. diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createMiniatureViewSpec..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createMiniatureViewSpec..st new file mode 100644 index 0000000..be0a0b8 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createMiniatureViewSpec..st @@ -0,0 +1,14 @@ +toolbuilder +createMiniatureViewSpec: aBuilder + | panelSpec | + panelSpec := aBuilder pluggableScrollPaneSpec new. + panelSpec + model: self; + frame: self miniatureViewLayoutFrame; + name: #MiniatureView; + vScrollBarPolicy: #always; + horizontalResizing: #spaceFill; + layout: #vertical; + wantsResizeHandles: false; + children: #slideMiniatures. + ^ panelSpec \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st index 10136b1..90e45cc 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st @@ -6,6 +6,7 @@ createSlide newSlide setModel: self. self slides add: newSlide afterIndex: self currentSlideNumber. self selectSlide: self currentSlideNumber + 1. + self updateSlideMiniatures. "self updateSlideNumbers." ^ newSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st index a99e4a3..1f7891d 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st @@ -9,5 +9,6 @@ deleteSlide: anIndex self currentSlideNumber >= anIndex ifTrue: [self selectSlide: (self currentSlideNumber - 1 max: self minimumSlideCount)]. + self updateSlideMiniatures "self updateSlideNumbers " \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewLayoutFrame.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewLayoutFrame.st new file mode 100644 index 0000000..052d9e9 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewLayoutFrame.st @@ -0,0 +1,8 @@ +toolbuilder +miniatureViewLayoutFrame + + ^ LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: 2 * self buttonHeight; + rightFraction: self miniatureViewWidth offset: 0; + bottomFraction: 1 offset: 0 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewWidth.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewWidth.st new file mode 100644 index 0000000..f09217e --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewWidth.st @@ -0,0 +1,4 @@ +toolbuilder +miniatureViewWidth + + ^ 0.2 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st new file mode 100644 index 0000000..4c24bb8 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st @@ -0,0 +1,4 @@ +as yet unclassified +slideMiniatures + + ^ self slides collect: [:each | Morph new color: Color random; yourself] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st new file mode 100644 index 0000000..e1d7054 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st @@ -0,0 +1,4 @@ +as yet unclassified +updateSlideMiniatures + + self changed: #slideMiniatures \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/viewPortLayoutFrame.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/viewPortLayoutFrame.st index 24fce77..1b6da9b 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/viewPortLayoutFrame.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/viewPortLayoutFrame.st @@ -2,7 +2,7 @@ toolbuilder viewPortLayoutFrame ^ LayoutFrame new - leftFraction: 0 offset: 0; + leftFraction: self miniatureViewWidth offset: 0; topFraction: 0 offset: 2 * self buttonHeight; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 8d86f15..30ede33 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -10,7 +10,7 @@ "askForPresentationName" : "JZ 6/8/2018 20:41", "barFrameFrom:height:" : "LB 6/22/2018 18:28", "buildErrorReportString:" : "MK 6/8/2018 18:38", - "buildWith:" : "LB 6/22/2018 17:00", + "buildWith:" : "LB 6/29/2018 15:12", "buttonBarTopData" : "LB 6/22/2018 16:47", "buttonHeight" : "LB 6/22/2018 18:34", "checkSlideDirectory:" : "MK 6/17/2018 18:52", @@ -19,7 +19,8 @@ "createButtonSpec:with:" : "LB 6/22/2018 18:09", "createDirectory:in:" : "JZ 6/8/2018 19:12", "createMenuBarSpec:" : "LB 6/22/2018 18:28", - "createSlide" : "WoC 6/27/2018 14:13", + "createMiniatureViewSpec:" : "LB 6/29/2018 15:29", + "createSlide" : "LB 6/29/2018 15:34", "createSlideContainerIn:" : "MK 5/25/2018 15:55", "createSlideNumberLabelSpec:" : "LB 6/22/2018 16:25", "createSlideViewportSpec:" : "LB 6/22/2018 18:30", @@ -31,7 +32,7 @@ "defaultDirectory" : "JZ 6/8/2018 17:01", "defaultDirectoryName" : "JZ 6/8/2018 16:52", "deleteSlide" : "LB 5/6/2018 18:03", - "deleteSlide:" : "WoC 6/27/2018 14:13", + "deleteSlide:" : "LB 6/29/2018 15:34", "deleteSlideButtonData" : "LB 6/22/2018 15:50", "disablePresentationMode" : "LM 5/25/2018 16:58", "duplicateCurrentSlide" : "WoC 6/22/2018 17:14", @@ -52,6 +53,8 @@ "loadSlideFromDirectory:" : "LB 6/22/2018 19:29", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", + "miniatureViewLayoutFrame" : "LB 6/29/2018 15:31", + "miniatureViewWidth" : "LB 6/29/2018 15:31", "minimumSlideCount" : "WoC 6/22/2018 16:10", "morph:survivesOneCycleIn:" : "LM 6/13/2018 16:57", "moveCurrentSlideTo:" : "WoC 6/27/2018 17:02", @@ -81,6 +84,7 @@ "slideContainer" : "MK 5/6/2018 15:32", "slideContainer:" : "MK 5/6/2018 15:32", "slideCount" : "LB 5/6/2018 17:25", + "slideMiniatures" : "LB 6/29/2018 15:37", "slideNumberString" : "LB 6/22/2018 16:08", "slideNumberString:" : "LB 6/22/2018 17:09", "slides" : "LM 5/6/2018 15:05", @@ -89,9 +93,10 @@ "sortedSlideSubdirectories:" : "LM 6/17/2018 17:35", "switchButtonData" : "LB 6/22/2018 16:48", "textFieldButtonData" : "LB 6/22/2018 15:50", + "updateSlideMiniatures" : "LB 6/29/2018 15:34", "updateSlideNumbers" : "WoC 6/17/2018 18:24", "validateUsageOf:inDirectory:" : "JZ 6/8/2018 20:05", - "viewPortLayoutFrame" : "LB 6/22/2018 18:30", + "viewPortLayoutFrame" : "LB 6/29/2018 15:31", "warn:trueChoice:" : "JZ 6/8/2018 17:54", "warn:trueChoice:falseChoice:" : "MK 6/8/2018 18:44", "window" : "LM 6/1/2018 20:15", From b94f11d499f3c25c5d1b70086669de75642d673a Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 15:55:19 +0200 Subject: [PATCH 04/22] Using PSMiniatures in scroll pane - working on #7 --- .../instance/clickAction..st | 4 --- .../PSMiniature.class/instance/clickAction.st | 4 --- .../PSMiniature.class/instance/model..st | 4 +++ .../PSMiniature.class/instance/model.st | 4 +++ .../PSMiniature.class/instance/mouseDown..st | 2 +- .../PSMiniature.class/methodProperties.json | 6 ++--- .../PSMiniature.class/properties.json | 2 +- .../instance/createSlide.st | 2 +- .../instance/currentSlide.st | 2 +- .../instance/deleteSlide..st | 2 +- .../instance/exportAsPNGs..st | 2 +- .../instance/loadPresentationUnchecked..st | 2 +- .../instance/moveCurrentSlideTo..st | 2 +- .../instance/nextSlide.st | 2 +- .../instance/openSlideSelectionDialog.st | 2 +- .../instance/previousSlide.st | 2 +- .../instance/selectSlide..st | 6 ++--- .../instance/selectSlideNumber..st | 6 +++++ .../instance/slideMiniatures.st | 5 +++- .../instance/slideNumberString..st | 2 +- .../methodProperties.json | 25 ++++++++++--------- .../instance/sharedShortcuts.st | 18 ++++++------- .../methodProperties.json | 2 +- .../instance/testMoveSlide.st | 2 +- .../instance/testMoveSlideOutOfBounds.st | 2 +- .../testMovedSlideStayCurrentSlide.st | 2 +- .../instance/testNextSlide.st | 2 +- .../instance/testSelectSlide.st | 4 +-- .../instance/testSelectSlideClamps.st | 6 ++--- .../testSlideNavigationInPresentationMode.st | 4 +-- .../methodProperties.json | 14 +++++------ 31 files changed, 76 insertions(+), 68 deletions(-) delete mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st delete mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/model..st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/model.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st deleted file mode 100644 index ba533f2..0000000 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -clickAction: aBlock - - clickAction := aBlock \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st b/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st deleted file mode 100644 index 7f6c465..0000000 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/clickAction.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -clickAction - - ^ clickAction ifNil: [[]] diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/model..st b/packages/Presenter-Core.package/PSMiniature.class/instance/model..st new file mode 100644 index 0000000..bca7820 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/model..st @@ -0,0 +1,4 @@ +accessing +model: aModel + + model := aModel \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/model.st b/packages/Presenter-Core.package/PSMiniature.class/instance/model.st new file mode 100644 index 0000000..12e76a5 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/model.st @@ -0,0 +1,4 @@ +accessing +model + + ^ model \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st b/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st index 95922dd..e36e2b9 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..st @@ -1,4 +1,4 @@ as yet unclassified mouseDown: evt - self clickAction value \ No newline at end of file + self model selectSlide: self slide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index 4a2beea..2e20d65 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -2,11 +2,11 @@ "class" : { "forSlide:" : "WoC 6/29/2018 15:31" }, "instance" : { - "clickAction" : "WoC 6/29/2018 15:34", - "clickAction:" : "WoC 6/29/2018 15:33", "defaultSize" : "WoC 6/29/2018 15:29", "handlesMouseDown:" : "WoC 6/29/2018 15:33", - "mouseDown:" : "WoC 6/29/2018 15:34", + "model" : "LB 6/29/2018 15:52", + "model:" : "LB 6/29/2018 15:52", + "mouseDown:" : "LB 6/29/2018 15:49", "setSlide:" : "WoC 6/29/2018 15:26", "slide" : "WoC 6/29/2018 15:19", "slide:" : "WoC 6/29/2018 15:33", diff --git a/packages/Presenter-Core.package/PSMiniature.class/properties.json b/packages/Presenter-Core.package/PSMiniature.class/properties.json index 8efb899..d1933a3 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/properties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/properties.json @@ -7,7 +7,7 @@ "commentStamp" : "", "instvars" : [ "slide", - "clickAction" ], + "model" ], "name" : "PSMiniature", "pools" : [ ], diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st index 90e45cc..6a33fe1 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st @@ -5,7 +5,7 @@ createSlide newSlide := PSSlide new. newSlide setModel: self. self slides add: newSlide afterIndex: self currentSlideNumber. - self selectSlide: self currentSlideNumber + 1. + self selectSlideNumber: self currentSlideNumber + 1. self updateSlideMiniatures. "self updateSlideNumbers." ^ newSlide diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentSlide.st index 8ed3136..baef080 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentSlide.st @@ -1,6 +1,6 @@ accessing currentSlide - (self currentSlideNumber <= self slides size and: [self currentSlideNumber > 0]) + (self currentSlideNumber between: 1 and: self slides size) ifFalse: [ self error: 'No slide available']. ^ self slides at: self currentSlideNumber \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st index 1f7891d..d6457c2 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st @@ -7,7 +7,7 @@ deleteSlide: anIndex (self slideAt: anIndex) abandon. self slides removeAt: anIndex. self currentSlideNumber >= anIndex ifTrue: - [self selectSlide: (self currentSlideNumber - 1 max: self minimumSlideCount)]. + [self selectSlideNumber: (self currentSlideNumber - 1 max: self minimumSlideCount)]. self updateSlideMiniatures "self updateSlideNumbers " diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st index be3acd7..235f38f 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st @@ -5,7 +5,7 @@ exportAsPNGs: name self enablePresentationMode. self slideContainer enableNonInteractiveMode. self slides withIndexDo: [:each :index | - self selectSlide: index. + self selectSlideNumber: index. World doOneCycle. each exportAsPNGNamed: 'PSSlidePNGs\', name, '\slide',index,'.png']. self disablePresentationMode \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st index eb861c1..f3023d8 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st @@ -8,5 +8,5 @@ loadPresentationUnchecked: aDirectory sortedDirectories := self sortedSlideSubdirectories: slidesDirectory. sortedDirectories do: [:each | errorReport at: each put: (self loadSlideFromDirectory: slidesDirectory / each)]. - self selectSlide: 1. + self selectSlideNumber: 1. ^ errorReport \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st index bea1b65..be58e38 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st @@ -7,4 +7,4 @@ moveCurrentSlideTo: aNumber add: (self slides removeAt: self currentSlideNumber) afterIndex: position - 1. "position needs to be 0 indexed for add:afterIndex" "self updateSlideNumbers." - self selectSlide: position \ No newline at end of file + self selectSlideNumber: position \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/nextSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/nextSlide.st index 44d7079..0c73726 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/nextSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/nextSlide.st @@ -1,4 +1,4 @@ slide management nextSlide - self selectSlide: self currentSlideNumber + 1 \ No newline at end of file + self selectSlideNumber: self currentSlideNumber + 1 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/openSlideSelectionDialog.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/openSlideSelectionDialog.st index 365366f..12a7801 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/openSlideSelectionDialog.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/openSlideSelectionDialog.st @@ -3,6 +3,6 @@ openSlideSelectionDialog | userInput | userInput := UIManager default request: 'Which slide should I select???'. - [self selectSlide: userInput asNumber] + [self selectSlideNumber: userInput asNumber] on: Error do: [UIManager inform: 'Not a valid number'] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/previousSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/previousSlide.st index 4043537..4609666 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/previousSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/previousSlide.st @@ -1,4 +1,4 @@ slide management previousSlide - self selectSlide: self currentSlideNumber - 1 \ No newline at end of file + self selectSlideNumber: self currentSlideNumber - 1 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlide..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlide..st index 8408a3c..445e785 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlide..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlide..st @@ -1,6 +1,4 @@ slide management -selectSlide: aNumber +selectSlide: aSlide - self currentSlideNumber: (self clampSlideNumber: aNumber). - self slideContainer showSlide: self currentSlide. - self changed: #slideNumberString + self selectSlideNumber: (self slides indexOf: aSlide ifAbsent: []) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st new file mode 100644 index 0000000..1e7f996 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st @@ -0,0 +1,6 @@ +slide management +selectSlideNumber: aNumber + + self currentSlideNumber: (self clampSlideNumber: aNumber). + self slideContainer showSlide: self currentSlide. + self changed: #slideNumberString diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st index 4c24bb8..51a4d98 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st @@ -1,4 +1,7 @@ as yet unclassified slideMiniatures - ^ self slides collect: [:each | Morph new color: Color random; yourself] \ No newline at end of file + ^ self slides collect: [:each | + (PSMiniature forSlide: each) + model: self; + yourself] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideNumberString..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideNumberString..st index 52a6872..e1f92d8 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideNumberString..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideNumberString..st @@ -4,5 +4,5 @@ slideNumberString: aText | number prefix | prefix := (aText asString subStrings: '/') at: 1 ifAbsent:['']. number := prefix asInteger. - number ifNotNil: [self selectSlide: number]. + number ifNotNil: [self selectSlideNumber: number]. self changed: #slideNumberString diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 30ede33..04a224f 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -20,24 +20,24 @@ "createDirectory:in:" : "JZ 6/8/2018 19:12", "createMenuBarSpec:" : "LB 6/22/2018 18:28", "createMiniatureViewSpec:" : "LB 6/29/2018 15:29", - "createSlide" : "LB 6/29/2018 15:34", + "createSlide" : "LB 6/29/2018 15:45", "createSlideContainerIn:" : "MK 5/25/2018 15:55", "createSlideNumberLabelSpec:" : "LB 6/22/2018 16:25", "createSlideViewportSpec:" : "LB 6/22/2018 18:30", "createWindowSpec:" : "LB 5/6/2018 16:57", - "currentSlide" : "LM 5/11/2018 18:09", + "currentSlide" : "LB 6/29/2018 15:44", "currentSlideNumber" : "LM 5/6/2018 15:15", "currentSlideNumber:" : "MK 5/6/2018 15:56", "currentSlideNumberString" : "LB 6/22/2018 15:59", "defaultDirectory" : "JZ 6/8/2018 17:01", "defaultDirectoryName" : "JZ 6/8/2018 16:52", "deleteSlide" : "LB 5/6/2018 18:03", - "deleteSlide:" : "LB 6/29/2018 15:34", + "deleteSlide:" : "LB 6/29/2018 15:45", "deleteSlideButtonData" : "LB 6/22/2018 15:50", "disablePresentationMode" : "LM 5/25/2018 16:58", "duplicateCurrentSlide" : "WoC 6/22/2018 17:14", "enablePresentationMode" : "LM 6/8/2018 20:01", - "exportAsPNGs:" : "LB 6/20/2018 15:22", + "exportAsPNGs:" : "LB 6/29/2018 15:45", "fileButtonData" : "LB 6/22/2018 17:12", "getValidPresentationName:" : "JZ 6/8/2018 20:45", "imageFieldButtonData" : "LB 6/22/2018 15:50", @@ -49,7 +49,7 @@ "loadMorphFromStream:testIn:" : "LB 6/22/2018 19:28", "loadPresentation" : "WoC 6/27/2018 14:13", "loadPresentationFromDirectory:" : "LM 6/15/2018 18:22", - "loadPresentationUnchecked:" : "LM 6/17/2018 17:33", + "loadPresentationUnchecked:" : "LB 6/29/2018 15:45", "loadSlideFromDirectory:" : "LB 6/22/2018 19:29", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", @@ -57,36 +57,37 @@ "miniatureViewWidth" : "LB 6/29/2018 15:31", "minimumSlideCount" : "WoC 6/22/2018 16:10", "morph:survivesOneCycleIn:" : "LM 6/13/2018 16:57", - "moveCurrentSlideTo:" : "WoC 6/27/2018 17:02", + "moveCurrentSlideTo:" : "LB 6/29/2018 15:45", "newImageField" : "LM 5/18/2018 17:13", "newTextField" : "LB 5/25/2018 16:43", - "nextSlide" : "LM 5/6/2018 15:33", + "nextSlide" : "LB 6/29/2018 15:45", "nextSlideButtonData" : "LB 6/22/2018 16:43", "openFileMenu" : "LB 6/22/2018 17:40", "openImageField:" : "LB 5/18/2018 17:35", "openInsertMenu" : "LB 6/22/2018 17:56", "openSlideMoveDialog" : "WoC 6/22/2018 16:24", - "openSlideSelectionDialog" : "WoC 6/22/2018 16:05", + "openSlideSelectionDialog" : "LB 6/29/2018 15:45", "overwriteQuestion" : "JZ 6/8/2018 20:06", "presentationMode" : "LM 5/25/2018 16:57", "presentationMode:" : "LM 5/25/2018 16:57", "presentationModeButtonData" : "LB 6/22/2018 15:49", - "previousSlide" : "LM 5/6/2018 15:33", + "previousSlide" : "LB 6/29/2018 15:45", "previousSlideButtonData" : "LB 6/22/2018 15:48", "riskyOperationMessage" : "LM 6/23/2018 14:21", "saveButtonData" : "LM 6/23/2018 14:29", "savePresentation" : "LM 6/23/2018 14:30", "savePresentationConfirmed" : "LM 6/23/2018 14:29", - "selectSlide:" : "LB 6/22/2018 16:46", + "selectSlide:" : "LB 6/29/2018 15:47", "selectSlideButtonData" : "WoC 6/22/2018 15:42", + "selectSlideNumber:" : "LB 6/29/2018 15:45", "showErrorReport:" : "MK 6/8/2018 18:30", "slideAt:" : "LM 5/6/2018 15:37", "slideContainer" : "MK 5/6/2018 15:32", "slideContainer:" : "MK 5/6/2018 15:32", "slideCount" : "LB 5/6/2018 17:25", - "slideMiniatures" : "LB 6/29/2018 15:37", + "slideMiniatures" : "LB 6/29/2018 15:51", "slideNumberString" : "LB 6/22/2018 16:08", - "slideNumberString:" : "LB 6/22/2018 17:09", + "slideNumberString:" : "LB 6/29/2018 15:45", "slides" : "LM 5/6/2018 15:05", "slides:" : "MK 5/6/2018 15:56", "slidesDirectoryName" : "MK 6/8/2018 18:14", diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st index 59f609b..50f4f4b 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/sharedShortcuts.st @@ -10,13 +10,13 @@ sharedShortcuts {Character pageUp . [self model previousSlide] . 'Go to the previous slide'}. {Character arrowUp . [self model previousSlide] . 'Go to the previous slide'}. - {$1 . [self model selectSlide: 1] . 'Go to slide number 1'}. - {$2 . [self model selectSlide: 2] . 'Go to slide number 2'}. - {$3 . [self model selectSlide: 3] . 'Go to slide number 3'}. - {$4 . [self model selectSlide: 4] . 'Go to slide number 4'}. - {$5 . [self model selectSlide: 5] . 'Go to slide number 5'}. - {$6 . [self model selectSlide: 6] . 'Go to slide number 6'}. - {$7 . [self model selectSlide: 7] . 'Go to slide number 7'}. - {$8 . [self model selectSlide: 8] . 'Go to slide number 8'}. - {$9 . [self model selectSlide: 9] . 'Go to slide number 9'} + {$1 . [self model selectSlideNumber: 1] . 'Go to slide number 1'}. + {$2 . [self model selectSlideNumber: 2] . 'Go to slide number 2'}. + {$3 . [self model selectSlideNumber: 3] . 'Go to slide number 3'}. + {$4 . [self model selectSlideNumber: 4] . 'Go to slide number 4'}. + {$5 . [self model selectSlideNumber: 5] . 'Go to slide number 5'}. + {$6 . [self model selectSlideNumber: 6] . 'Go to slide number 6'}. + {$7 . [self model selectSlideNumber: 7] . 'Go to slide number 7'}. + {$8 . [self model selectSlideNumber: 8] . 'Go to slide number 8'}. + {$9 . [self model selectSlideNumber: 9] . 'Go to slide number 9'} } \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json index 53ceaec..88f92aa 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json @@ -44,7 +44,7 @@ "previousOwner" : "MK 5/25/2018 15:31", "previousOwner:" : "MK 5/25/2018 15:32", "sharedCommandShortcuts" : "MK 6/28/2018 14:00", - "sharedShortcuts" : "MK 6/28/2018 14:01", + "sharedShortcuts" : "LB 6/29/2018 15:45", "showNotification:" : "LM 6/22/2018 15:40", "showSlide:" : "LB 5/6/2018 16:49", "toggleInteractivity" : "WoC 6/15/2018 18:39", diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlide.st index 64b7aaa..a1de3f9 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlide.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlide.st @@ -5,7 +5,7 @@ testMoveSlide 4 timesRepeat: [self tool createSlide]. "=> 5 slides" slide := self slides first. - self tool selectSlide: 1. + self tool selectSlideNumber: 1. self tool moveCurrentSlideTo: 3. self assert: (self slides indexOf: slide startingAt: 0) equals: 3. diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlideOutOfBounds.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlideOutOfBounds.st index a9b4388..a1af67d 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlideOutOfBounds.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMoveSlideOutOfBounds.st @@ -5,7 +5,7 @@ testMoveSlideOutOfBounds 4 timesRepeat: [self tool createSlide]. "=> 5 slides" slide := self slides first. - self tool selectSlide: 1. + self tool selectSlideNumber: 1. self tool moveCurrentSlideTo: 100. "no slide with number 100 exists" self assert: (self slides indexOf: slide startingAt: 0) equals: 5. diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMovedSlideStayCurrentSlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMovedSlideStayCurrentSlide.st index 78553ff..4d5940a 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMovedSlideStayCurrentSlide.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMovedSlideStayCurrentSlide.st @@ -5,6 +5,6 @@ testMovedSlideStayCurrentSlide 4 timesRepeat: [self tool createSlide]. "=> 5 slides" slide := self slides first. - self tool selectSlide: 1. + self tool selectSlideNumber: 1. self tool moveCurrentSlideTo: 5. self assert: slide = self tool currentSlide \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testNextSlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testNextSlide.st index cb89cbb..6a1b603 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testNextSlide.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testNextSlide.st @@ -2,7 +2,7 @@ slide navigation tests testNextSlide self tool createSlide. - self tool selectSlide: 1. + self tool selectSlideNumber: 1. self assert: self tool currentSlide = self tool slides first. self tool nextSlide. self assert: self tool currentSlide = self tool slides second. \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlide.st index 0a308e8..89c7287 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlide.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlide.st @@ -2,8 +2,8 @@ slide navigation tests testSelectSlide self tool createSlide. - self tool selectSlide: 1. + self tool selectSlideNumber: 1. self assert: self tool currentSlide = self tool slides first. - self tool selectSlide: 2. + self tool selectSlideNumber: 2. self assert: self tool currentSlide = self tool slides second \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlideClamps.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlideClamps.st index 28d919c..57bacce 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlideClamps.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectSlideClamps.st @@ -2,11 +2,11 @@ slide navigation tests testSelectSlideClamps self tool createSlide. - self tool selectSlide: 3. + self tool selectSlideNumber: 3. self assert: self tool currentSlide = self tool slides last. - self tool selectSlide: 0. + self tool selectSlideNumber: 0. self assert: self tool currentSlide = self tool slides first. - self tool selectSlide: -1. + self tool selectSlideNumber: -1. self assert: self tool currentSlide = self tool slides first. \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSlideNavigationInPresentationMode.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSlideNavigationInPresentationMode.st index 475342f..bbaf851 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSlideNavigationInPresentationMode.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSlideNavigationInPresentationMode.st @@ -3,8 +3,8 @@ testSlideNavigationInPresentationMode self tool createSlide; - selectSlide: 1; + selectSlideNumber: 1; enablePresentationMode. self assert: self tool slideContainer currentSlide equals: self tool currentSlide. - self tool selectSlide: 2. + self tool selectSlideNumber: 2. self assert: self tool slideContainer currentSlide equals: self tool currentSlide \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index c920bce..1c7f221 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -28,22 +28,22 @@ "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", "testMissingSlidesDirectory" : "LM 6/15/2018 18:39", "testMorphLoadIsValid" : "LM 6/13/2018 16:50", - "testMoveSlide" : "WoC 6/22/2018 17:03", - "testMoveSlideOutOfBounds" : "WoC 6/22/2018 17:06", - "testMovedSlideStayCurrentSlide" : "WoC 6/22/2018 17:08", - "testNextSlide" : "LM 5/18/2018 18:43", + "testMoveSlide" : "LB 6/29/2018 15:45", + "testMoveSlideOutOfBounds" : "LB 6/29/2018 15:45", + "testMovedSlideStayCurrentSlide" : "LB 6/29/2018 15:45", + "testNextSlide" : "LB 6/29/2018 15:45", "testNonInteractivetyInNonInteractiveMode" : "WoC 6/15/2018 22:18", "testPreviousSlideClampsToMin" : "LM 5/18/2018 18:45", "testSavingShouldProvideWarning" : "LM 6/23/2018 14:31", - "testSelectSlide" : "LM 5/18/2018 18:46", - "testSelectSlideClamps" : "LM 5/18/2018 18:47", + "testSelectSlide" : "LB 6/29/2018 15:45", + "testSelectSlideClamps" : "LB 6/29/2018 15:45", "testSlideContainerExtent" : "WoC 6/15/2018 18:51", "testSlideContainerPosition" : "LM 6/8/2018 19:55", "testSlideCreation" : "LM 5/18/2018 18:38", "testSlideCreationReturnsSlide" : "LM 5/18/2018 18:37", "testSlideCreationSelectsNewSlide" : "LM 5/18/2018 18:35", "testSlideDeletionMovesSlideSelection" : "LM 5/18/2018 18:32", - "testSlideNavigationInPresentationMode" : "LM 6/8/2018 20:20", + "testSlideNavigationInPresentationMode" : "LB 6/29/2018 15:45", "testSlideNumberLabelSelectsCorrectly" : "LB 6/22/2018 16:35", "testSlideRatioIsFixed" : "LB 6/1/2018 18:49", "testSlideResizeRegression" : "LB 5/18/2018 20:27", From 838cad931f0c311cebec5fd2b97476f88e5e4385 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 16:28:51 +0200 Subject: [PATCH 05/22] Added lazy initialization of miniatures, so that they do not have to be recreated every time their collection changes - working on #7 --- .../PSPresentationTool.class/instance/deleteSlide..st | 7 ++++--- .../PSPresentationTool.class/instance/initialize.st | 1 + .../PSPresentationTool.class/instance/miniatures..st | 4 ++++ .../PSPresentationTool.class/instance/miniatures.st | 4 ++++ .../instance/moveCurrentSlideTo..st | 3 ++- .../instance/slideMiniatures.st | 6 +++--- .../PSPresentationTool.class/methodProperties.json | 10 ++++++---- .../PSPresentationTool.class/properties.json | 3 ++- 8 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures..st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures.st diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st index d6457c2..59d2686 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..st @@ -1,14 +1,15 @@ slide management deleteSlide: anIndex + | deletedSlide | self slideCount = self minimumSlideCount ifTrue: [ self createSlide ]. "There should never be zero slides" - - (self slideAt: anIndex) abandon. - self slides removeAt: anIndex. + deletedSlide := self slides removeAt: anIndex. + deletedSlide abandon. self currentSlideNumber >= anIndex ifTrue: [self selectSlideNumber: (self currentSlideNumber - 1 max: self minimumSlideCount)]. + self miniatures removeKey: deletedSlide ifAbsent: []. self updateSlideMiniatures "self updateSlideNumbers " \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/initialize.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/initialize.st index 57822d2..5239ea2 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/initialize.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/initialize.st @@ -3,5 +3,6 @@ initialize self slides: OrderedCollection new; + miniatures: Dictionary new; currentSlideNumber: 0; presentationMode: false \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures..st new file mode 100644 index 0000000..17f91ba --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures..st @@ -0,0 +1,4 @@ +accessing +miniatures: aDictionary + + miniatures := aDictionary diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures.st new file mode 100644 index 0000000..07682f9 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures.st @@ -0,0 +1,4 @@ +accessing +miniatures + + ^ miniatures diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st index be58e38..ffb03bc 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/moveCurrentSlideTo..st @@ -7,4 +7,5 @@ moveCurrentSlideTo: aNumber add: (self slides removeAt: self currentSlideNumber) afterIndex: position - 1. "position needs to be 0 indexed for add:afterIndex" "self updateSlideNumbers." - self selectSlideNumber: position \ No newline at end of file + self selectSlideNumber: position. + self updateSlideMiniatures \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st index 51a4d98..b45bdfe 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st @@ -1,7 +1,7 @@ as yet unclassified slideMiniatures - ^ self slides collect: [:each | - (PSMiniature forSlide: each) + ^ self slides collect: [:each | self miniatures at: each ifAbsentPut: + [(PSMiniature forSlide: each) model: self; - yourself] \ No newline at end of file + yourself]] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 04a224f..4a8299a 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -32,7 +32,7 @@ "defaultDirectory" : "JZ 6/8/2018 17:01", "defaultDirectoryName" : "JZ 6/8/2018 16:52", "deleteSlide" : "LB 5/6/2018 18:03", - "deleteSlide:" : "LB 6/29/2018 15:45", + "deleteSlide:" : "LB 6/29/2018 16:22", "deleteSlideButtonData" : "LB 6/22/2018 15:50", "disablePresentationMode" : "LM 5/25/2018 16:58", "duplicateCurrentSlide" : "WoC 6/22/2018 17:14", @@ -41,7 +41,7 @@ "fileButtonData" : "LB 6/22/2018 17:12", "getValidPresentationName:" : "JZ 6/8/2018 20:45", "imageFieldButtonData" : "LB 6/22/2018 15:50", - "initialize" : "LM 5/25/2018 16:58", + "initialize" : "LB 6/29/2018 16:15", "insertButtonData" : "LB 6/22/2018 17:57", "isValidPresentationDirectory:" : "MK 6/17/2018 18:54", "loadMorphFromFile:" : "MK 6/8/2018 17:32", @@ -55,9 +55,11 @@ "menuBarButtonData" : "LB 6/22/2018 17:58", "miniatureViewLayoutFrame" : "LB 6/29/2018 15:31", "miniatureViewWidth" : "LB 6/29/2018 15:31", + "miniatures" : "LB 6/29/2018 16:14", + "miniatures:" : "LB 6/29/2018 16:14", "minimumSlideCount" : "WoC 6/22/2018 16:10", "morph:survivesOneCycleIn:" : "LM 6/13/2018 16:57", - "moveCurrentSlideTo:" : "LB 6/29/2018 15:45", + "moveCurrentSlideTo:" : "LB 6/29/2018 16:03", "newImageField" : "LM 5/18/2018 17:13", "newTextField" : "LB 5/25/2018 16:43", "nextSlide" : "LB 6/29/2018 15:45", @@ -85,7 +87,7 @@ "slideContainer" : "MK 5/6/2018 15:32", "slideContainer:" : "MK 5/6/2018 15:32", "slideCount" : "LB 5/6/2018 17:25", - "slideMiniatures" : "LB 6/29/2018 15:51", + "slideMiniatures" : "LB 6/29/2018 16:24", "slideNumberString" : "LB 6/22/2018 16:08", "slideNumberString:" : "LB 6/29/2018 15:45", "slides" : "LM 5/6/2018 15:05", diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/properties.json b/packages/Presenter-Core.package/PSPresentationTool.class/properties.json index 774ca54..4cae030 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/properties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/properties.json @@ -10,7 +10,8 @@ "slideContainer", "slides", "currentSlideNumber", - "presentationMode" ], + "presentationMode", + "miniatures" ], "name" : "PSPresentationTool", "pools" : [ ], From cd3fa963dbe17212a836021ba3eac630e3a3393d Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 17:34:15 +0200 Subject: [PATCH 06/22] Miniatures are now updated and highlighted - working on #7 --- .../PSMiniature.class/class/forSlide..st | 2 +- .../PSMiniature.class/instance/highlight.st | 4 ++++ .../instance/highlightBorderColor.st | 6 ++++++ .../instance/highlightBorderWidth.st | 6 ++++++ .../PSMiniature.class/instance/initialize.st | 5 +++++ .../PSMiniature.class/instance/unHighlight.st | 4 ++++ .../PSMiniature.class/methodProperties.json | 9 +++++++-- .../instance/createSlide.st | 1 + .../instance/currentMiniature.st | 4 ++++ .../instance/highlightCurrentMiniature.st | 5 +++++ .../instance/miniatureOf..st | 6 ++++++ .../instance/selectSlideNumber..st | 1 + .../instance/slideMiniatures.st | 7 ++----- .../PSPresentationTool.class/instance/step.st | 4 ++++ .../instance/updateCurrentMiniature.st | 4 ++++ .../instance/updateSlideMiniatures.st | 2 +- .../instance/wantsSteps.st | 4 ++++ .../methodProperties.json | 16 +++++++++++----- .../PSSlide.class/instance/changed.st | 5 +++++ .../PSSlide.class/instance/initialize.st | 2 +- .../PSSlide.class/methodProperties.json | 3 ++- 21 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderWidth.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/currentMiniature.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/highlightCurrentMiniature.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureOf..st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/step.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/updateCurrentMiniature.st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/wantsSteps.st create mode 100644 packages/Presenter-Core.package/PSSlide.class/instance/changed.st diff --git a/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st b/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st index f9c6697..bbd3620 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st +++ b/packages/Presenter-Core.package/PSMiniature.class/class/forSlide..st @@ -1,4 +1,4 @@ as yet unclassified forSlide: aPSSlide - ^ self new slide: aPSSlide \ No newline at end of file + ^ self new setSlide: aPSSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st new file mode 100644 index 0000000..f3572de --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st @@ -0,0 +1,4 @@ +as yet unclassified +highlight + + self borderWidth: self highlightBorderWidth \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st new file mode 100644 index 0000000..dc0d688 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st @@ -0,0 +1,6 @@ +accessing +highlightBorderColor + + ^ Color orange muchDarker + + \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderWidth.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderWidth.st new file mode 100644 index 0000000..7ec60fb --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderWidth.st @@ -0,0 +1,6 @@ +accessing +highlightBorderWidth + + ^ 5 + + \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st new file mode 100644 index 0000000..f40f557 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st @@ -0,0 +1,5 @@ +as yet unclassified +initialize + + super initialize. + self borderColor: self highlightBorderColor \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st new file mode 100644 index 0000000..0002d4a --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st @@ -0,0 +1,4 @@ +as yet unclassified +unHighlight + + self borderWidth: 0 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index 2e20d65..7542ed3 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -1,13 +1,18 @@ { "class" : { - "forSlide:" : "WoC 6/29/2018 15:31" }, + "forSlide:" : "LB 6/29/2018 17:11" }, "instance" : { "defaultSize" : "WoC 6/29/2018 15:29", "handlesMouseDown:" : "WoC 6/29/2018 15:33", + "highlight" : "LB 6/29/2018 17:17", + "highlightBorderColor" : "LB 6/29/2018 17:17", + "highlightBorderWidth" : "LB 6/29/2018 17:16", + "initialize" : "LB 6/29/2018 17:18", "model" : "LB 6/29/2018 15:52", "model:" : "LB 6/29/2018 15:52", "mouseDown:" : "LB 6/29/2018 15:49", "setSlide:" : "WoC 6/29/2018 15:26", "slide" : "WoC 6/29/2018 15:19", - "slide:" : "WoC 6/29/2018 15:33", + "slide:" : "LB 6/29/2018 17:00", + "unHighlight" : "LB 6/29/2018 17:18", "updateImage" : "WoC 6/29/2018 15:28" } } diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st index 6a33fe1..8499300 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/createSlide.st @@ -7,6 +7,7 @@ createSlide self slides add: newSlide afterIndex: self currentSlideNumber. self selectSlideNumber: self currentSlideNumber + 1. self updateSlideMiniatures. + self updateCurrentMiniature. "self updateSlideNumbers." ^ newSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentMiniature.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentMiniature.st new file mode 100644 index 0000000..b7402c7 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/currentMiniature.st @@ -0,0 +1,4 @@ +slide miniatures +currentMiniature + + ^ self miniatureOf: self currentSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/highlightCurrentMiniature.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/highlightCurrentMiniature.st new file mode 100644 index 0000000..03311e1 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/highlightCurrentMiniature.st @@ -0,0 +1,5 @@ +slide miniatures +highlightCurrentMiniature + + self miniatures do: [:each | each unHighlight]. + self currentMiniature highlight \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureOf..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureOf..st new file mode 100644 index 0000000..b5db82d --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureOf..st @@ -0,0 +1,6 @@ +slide miniatures +miniatureOf: aPSSlide + + ^ self miniatures at: aPSSlide ifAbsentPut: [(PSMiniature forSlide: aPSSlide) + model: self; + yourself] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st index 1e7f996..640ad86 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/selectSlideNumber..st @@ -3,4 +3,5 @@ selectSlideNumber: aNumber self currentSlideNumber: (self clampSlideNumber: aNumber). self slideContainer showSlide: self currentSlide. + self highlightCurrentMiniature. self changed: #slideNumberString diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st index b45bdfe..ab0e495 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/slideMiniatures.st @@ -1,7 +1,4 @@ -as yet unclassified +slide miniatures slideMiniatures - ^ self slides collect: [:each | self miniatures at: each ifAbsentPut: - [(PSMiniature forSlide: each) - model: self; - yourself]] \ No newline at end of file + ^ self slides collect: [:each | self miniatureOf: each] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/step.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/step.st new file mode 100644 index 0000000..f70bfb6 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/step.st @@ -0,0 +1,4 @@ +as yet unclassified +step + + self updateCurrentMiniature \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateCurrentMiniature.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateCurrentMiniature.st new file mode 100644 index 0000000..c20bd7e --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateCurrentMiniature.st @@ -0,0 +1,4 @@ +slide miniatures +updateCurrentMiniature + + self currentMiniature updateImage \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st index e1d7054..3e9f786 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/updateSlideMiniatures.st @@ -1,4 +1,4 @@ -as yet unclassified +slide miniatures updateSlideMiniatures self changed: #slideMiniatures \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/wantsSteps.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/wantsSteps.st new file mode 100644 index 0000000..4b42fb6 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/wantsSteps.st @@ -0,0 +1,4 @@ +as yet unclassified +wantsSteps + + ^ true \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 4a8299a..83ccb13 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -19,12 +19,13 @@ "createButtonSpec:with:" : "LB 6/22/2018 18:09", "createDirectory:in:" : "JZ 6/8/2018 19:12", "createMenuBarSpec:" : "LB 6/22/2018 18:28", - "createMiniatureViewSpec:" : "LB 6/29/2018 15:29", - "createSlide" : "LB 6/29/2018 15:45", + "createMiniatureViewSpec:" : "LB 6/29/2018 17:33", + "createSlide" : "LB 6/29/2018 17:29", "createSlideContainerIn:" : "MK 5/25/2018 15:55", "createSlideNumberLabelSpec:" : "LB 6/22/2018 16:25", "createSlideViewportSpec:" : "LB 6/22/2018 18:30", "createWindowSpec:" : "LB 5/6/2018 16:57", + "currentMiniature" : "LB 6/29/2018 17:28", "currentSlide" : "LB 6/29/2018 15:44", "currentSlideNumber" : "LM 5/6/2018 15:15", "currentSlideNumber:" : "MK 5/6/2018 15:56", @@ -40,6 +41,7 @@ "exportAsPNGs:" : "LB 6/29/2018 15:45", "fileButtonData" : "LB 6/22/2018 17:12", "getValidPresentationName:" : "JZ 6/8/2018 20:45", + "highlightCurrentMiniature" : "LB 6/29/2018 17:22", "imageFieldButtonData" : "LB 6/22/2018 15:50", "initialize" : "LB 6/29/2018 16:15", "insertButtonData" : "LB 6/22/2018 17:57", @@ -53,6 +55,7 @@ "loadSlideFromDirectory:" : "LB 6/22/2018 19:29", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", + "miniatureOf:" : "LB 6/29/2018 17:28", "miniatureViewLayoutFrame" : "LB 6/29/2018 15:31", "miniatureViewWidth" : "LB 6/29/2018 15:31", "miniatures" : "LB 6/29/2018 16:14", @@ -81,25 +84,28 @@ "savePresentationConfirmed" : "LM 6/23/2018 14:29", "selectSlide:" : "LB 6/29/2018 15:47", "selectSlideButtonData" : "WoC 6/22/2018 15:42", - "selectSlideNumber:" : "LB 6/29/2018 15:45", + "selectSlideNumber:" : "LB 6/29/2018 17:23", "showErrorReport:" : "MK 6/8/2018 18:30", "slideAt:" : "LM 5/6/2018 15:37", "slideContainer" : "MK 5/6/2018 15:32", "slideContainer:" : "MK 5/6/2018 15:32", "slideCount" : "LB 5/6/2018 17:25", - "slideMiniatures" : "LB 6/29/2018 16:24", + "slideMiniatures" : "LB 6/29/2018 17:28", "slideNumberString" : "LB 6/22/2018 16:08", "slideNumberString:" : "LB 6/29/2018 15:45", "slides" : "LM 5/6/2018 15:05", "slides:" : "MK 5/6/2018 15:56", "slidesDirectoryName" : "MK 6/8/2018 18:14", "sortedSlideSubdirectories:" : "LM 6/17/2018 17:35", + "step" : "LB 6/29/2018 17:05", "switchButtonData" : "LB 6/22/2018 16:48", "textFieldButtonData" : "LB 6/22/2018 15:50", - "updateSlideMiniatures" : "LB 6/29/2018 15:34", + "updateCurrentMiniature" : "LB 6/29/2018 17:21", + "updateSlideMiniatures" : "LB 6/29/2018 17:08", "updateSlideNumbers" : "WoC 6/17/2018 18:24", "validateUsageOf:inDirectory:" : "JZ 6/8/2018 20:05", "viewPortLayoutFrame" : "LB 6/29/2018 15:31", + "wantsSteps" : "LB 6/29/2018 17:04", "warn:trueChoice:" : "JZ 6/8/2018 17:54", "warn:trueChoice:falseChoice:" : "MK 6/8/2018 18:44", "window" : "LM 6/1/2018 20:15", diff --git a/packages/Presenter-Core.package/PSSlide.class/instance/changed.st b/packages/Presenter-Core.package/PSSlide.class/instance/changed.st new file mode 100644 index 0000000..602da9c --- /dev/null +++ b/packages/Presenter-Core.package/PSSlide.class/instance/changed.st @@ -0,0 +1,5 @@ +as yet unclassified +changed + + super changed. + self changed: #redraw \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st b/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st index 2e97879..60bcea4 100644 --- a/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st +++ b/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st @@ -4,7 +4,7 @@ initialize super initialize. self "initializeSlideNumberMorph;" - color: Color white; + color: Color seaFoam; borderColor: nil; layoutPolicy: ProportionalLayout new; beSticky \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlide.class/methodProperties.json b/packages/Presenter-Core.package/PSSlide.class/methodProperties.json index 37700a5..fb2ea80 100644 --- a/packages/Presenter-Core.package/PSSlide.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlide.class/methodProperties.json @@ -5,6 +5,7 @@ "acceptDroppingMorph:event:" : "LB 5/23/2018 15:46", "addContent:" : "LB 6/15/2018 21:36", "addSlideNumberMorph" : "WoC 6/18/2018 10:12", + "changed" : "LB 6/29/2018 16:57", "disablePresentationMode" : "WoC 6/27/2018 14:13", "doubleClick:" : "LM 5/25/2018 17:20", "enablePresentationMode" : "MK 5/25/2018 15:11", @@ -13,7 +14,7 @@ "handleDroppedItem:event:" : "LB 5/18/2018 17:33", "handlesMouseDown:" : "WoC 5/22/2018 19:23", "hideSlideNumberMorphHandles" : "WoC 6/17/2018 19:42", - "initialize" : "WoC 6/27/2018 14:13", + "initialize" : "LB 6/29/2018 17:11", "initializeSlideNumberMorph" : "WoC 6/18/2018 10:12", "isImageFileName:" : "LB 5/18/2018 17:16", "layoutFrameFor:" : "LB 6/15/2018 21:36", From e3e1891ece3c88464e164efd947cdc916fb04d41 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 17:49:10 +0200 Subject: [PATCH 07/22] Fixed Colors - working on #7 --- .../PSMiniature.class/instance/highlight.st | 2 +- .../PSMiniature.class/instance/highlightBorderColor.st | 2 +- .../PSMiniature.class/instance/initialize.st | 3 ++- .../PSMiniature.class/instance/unHighlight.st | 2 +- .../PSMiniature.class/methodProperties.json | 8 ++++---- .../PSSlide.class/instance/initialize.st | 2 +- .../PSSlide.class/methodProperties.json | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st index f3572de..e154838 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st @@ -1,4 +1,4 @@ as yet unclassified highlight - self borderWidth: self highlightBorderWidth \ No newline at end of file + self borderColor: self highlightBorderColor \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st index dc0d688..7ec9ffc 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.st @@ -1,6 +1,6 @@ accessing highlightBorderColor - ^ Color orange muchDarker + ^ Color r: 247/255 g: 159/255 b: 0 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st index f40f557..def85b8 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st @@ -2,4 +2,5 @@ as yet unclassified initialize super initialize. - self borderColor: self highlightBorderColor \ No newline at end of file + self borderWidth: self highlightBorderWidth. + self unHighlight \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st index 0002d4a..ce94fcb 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st @@ -1,4 +1,4 @@ as yet unclassified unHighlight - self borderWidth: 0 \ No newline at end of file + self borderColor: Color transparent \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index 7542ed3..c26f8da 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -4,15 +4,15 @@ "instance" : { "defaultSize" : "WoC 6/29/2018 15:29", "handlesMouseDown:" : "WoC 6/29/2018 15:33", - "highlight" : "LB 6/29/2018 17:17", - "highlightBorderColor" : "LB 6/29/2018 17:17", + "highlight" : "LB 6/29/2018 17:42", + "highlightBorderColor" : "LB 6/29/2018 17:48", "highlightBorderWidth" : "LB 6/29/2018 17:16", - "initialize" : "LB 6/29/2018 17:18", + "initialize" : "LB 6/29/2018 17:43", "model" : "LB 6/29/2018 15:52", "model:" : "LB 6/29/2018 15:52", "mouseDown:" : "LB 6/29/2018 15:49", "setSlide:" : "WoC 6/29/2018 15:26", "slide" : "WoC 6/29/2018 15:19", "slide:" : "LB 6/29/2018 17:00", - "unHighlight" : "LB 6/29/2018 17:18", + "unHighlight" : "LB 6/29/2018 17:42", "updateImage" : "WoC 6/29/2018 15:28" } } diff --git a/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st b/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st index 60bcea4..2e97879 100644 --- a/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st +++ b/packages/Presenter-Core.package/PSSlide.class/instance/initialize.st @@ -4,7 +4,7 @@ initialize super initialize. self "initializeSlideNumberMorph;" - color: Color seaFoam; + color: Color white; borderColor: nil; layoutPolicy: ProportionalLayout new; beSticky \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlide.class/methodProperties.json b/packages/Presenter-Core.package/PSSlide.class/methodProperties.json index fb2ea80..77ce2e1 100644 --- a/packages/Presenter-Core.package/PSSlide.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlide.class/methodProperties.json @@ -14,7 +14,7 @@ "handleDroppedItem:event:" : "LB 5/18/2018 17:33", "handlesMouseDown:" : "WoC 5/22/2018 19:23", "hideSlideNumberMorphHandles" : "WoC 6/17/2018 19:42", - "initialize" : "LB 6/29/2018 17:11", + "initialize" : "WoC 6/27/2018 14:13", "initializeSlideNumberMorph" : "WoC 6/18/2018 10:12", "isImageFileName:" : "LB 5/18/2018 17:16", "layoutFrameFor:" : "LB 6/15/2018 21:36", From aa09f91899dfb40ce0f6386dc4966b0604241d4e Mon Sep 17 00:00:00 2001 From: Jonas Zimmermann Date: Fri, 29 Jun 2018 18:03:51 +0200 Subject: [PATCH 08/22] Closes #60 --- .../instance/checkSlideDirectory..st | 6 ++++-- .../instance/checkSlideDirectoryName..st | 4 ++++ .../instance/isValidPresentationDirectory..st | 2 +- .../instance/loadSlideFromDirectory..st | 7 ++++--- .../instance/sortedMorphFiles..st | 5 +++++ .../methodProperties.json | 8 +++++--- .../instance/localName.st | 4 ++++ .../methodProperties.json | 1 + .../instance/testInvalidSlideDirectoryNames.st | 2 +- .../instance/testLoadingProvidesWarning.st | 2 +- .../instance/testMorphNameIsNotNumber.st | 10 ++++++++++ .../instance/testMorphNameIsNumber.st | 10 ++++++++++ .../instance/testSingleMorphOnSlide.st | 17 +++++++++++++++++ .../instance/testSortMorphFiles.st | 7 +++++++ .../methodProperties.json | 6 +++++- 15 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/sortedMorphFiles..st create mode 100644 packages/Presenter-Tests.package/PSMockFileDirectory.class/instance/localName.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNotNumber.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNumber.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSingleMorphOnSlide.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSortMorphFiles.st diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st index f6d2a85..26aa864 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st @@ -1,4 +1,6 @@ as yet unclassified -checkSlideDirectory: aDirectoryName +checkSlideDirectory: aDirectory - ^ aDirectoryName matchesRegex: 'slide[0-9]+' \ No newline at end of file + ^ (self checkSlideDirectoryName: aDirectory localName) + and: [aDirectory fileNames allSatisfy: [:each | + each matchesRegex: '[0-9]+.morph']] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st new file mode 100644 index 0000000..b1ba120 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st @@ -0,0 +1,4 @@ +as yet unclassified +checkSlideDirectoryName: aDirectoryName + + ^ aDirectoryName matchesRegex: 'slide[0-9]+' \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/isValidPresentationDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/isValidPresentationDirectory..st index 6e3ae82..be302a9 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/isValidPresentationDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/isValidPresentationDirectory..st @@ -6,4 +6,4 @@ isValidPresentationDirectory: aDirectory ^ slidesDirectory exists and: [slidesDirectory directoryNames isEmpty not] and: [slidesDirectory directoryNames allSatisfy: [:each | - self checkSlideDirectory: each]] \ No newline at end of file + self checkSlideDirectory: slidesDirectory / each]] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st index c877a5a..6ee3477 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st @@ -1,15 +1,16 @@ presentation loading loadSlideFromDirectory: aDirectory - | slide corruptedMorphs | + | slide corruptedMorphs sortedMorphFiles | corruptedMorphs := 0. slide := PSSlide new. slide setModel: self. - aDirectory fileNames do: [:each | + sortedMorphFiles := self sortedMorphFiles: aDirectory fileNames. + sortedMorphFiles do: [:each | | morph | morph := self loadMorphFromFile: aDirectory / each. morph ifNil: [corruptedMorphs := corruptedMorphs + 1] - ifNotNil: [slide addMorph: morph]]. + ifNotNil: [slide addMorphBack: morph]]. self slides addLast: slide. ^ corruptedMorphs \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/sortedMorphFiles..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/sortedMorphFiles..st new file mode 100644 index 0000000..dfff255 --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/sortedMorphFiles..st @@ -0,0 +1,5 @@ +presentation loading +sortedMorphFiles: anOrderedCollection + + ^ anOrderedCollection sorted: [:a :b | + a splitInteger first < b splitInteger first] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 4a8299a..9483505 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -13,7 +13,8 @@ "buildWith:" : "LB 6/29/2018 15:12", "buttonBarTopData" : "LB 6/22/2018 16:47", "buttonHeight" : "LB 6/22/2018 18:34", - "checkSlideDirectory:" : "MK 6/17/2018 18:52", + "checkSlideDirectory:" : "JZ 6/29/2018 17:24", + "checkSlideDirectoryName:" : "JZ 6/29/2018 17:03", "clampSlideNumber:" : "WoC 6/22/2018 16:11", "createButtonBarTopSpec:" : "LB 6/22/2018 18:28", "createButtonSpec:with:" : "LB 6/22/2018 18:09", @@ -43,14 +44,14 @@ "imageFieldButtonData" : "LB 6/22/2018 15:50", "initialize" : "LB 6/29/2018 16:15", "insertButtonData" : "LB 6/22/2018 17:57", - "isValidPresentationDirectory:" : "MK 6/17/2018 18:54", + "isValidPresentationDirectory:" : "JZ 6/29/2018 17:18", "loadMorphFromFile:" : "MK 6/8/2018 17:32", "loadMorphFromStream:" : "LM 6/13/2018 16:46", "loadMorphFromStream:testIn:" : "LB 6/22/2018 19:28", "loadPresentation" : "WoC 6/27/2018 14:13", "loadPresentationFromDirectory:" : "LM 6/15/2018 18:22", "loadPresentationUnchecked:" : "LB 6/29/2018 15:45", - "loadSlideFromDirectory:" : "LB 6/22/2018 19:29", + "loadSlideFromDirectory:" : "JZ 6/29/2018 18:02", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", "miniatureViewLayoutFrame" : "LB 6/29/2018 15:31", @@ -93,6 +94,7 @@ "slides" : "LM 5/6/2018 15:05", "slides:" : "MK 5/6/2018 15:56", "slidesDirectoryName" : "MK 6/8/2018 18:14", + "sortedMorphFiles:" : "JZ 6/29/2018 17:50", "sortedSlideSubdirectories:" : "LM 6/17/2018 17:35", "switchButtonData" : "LB 6/22/2018 16:48", "textFieldButtonData" : "LB 6/22/2018 15:50", diff --git a/packages/Presenter-Tests.package/PSMockFileDirectory.class/instance/localName.st b/packages/Presenter-Tests.package/PSMockFileDirectory.class/instance/localName.st new file mode 100644 index 0000000..244a7d5 --- /dev/null +++ b/packages/Presenter-Tests.package/PSMockFileDirectory.class/instance/localName.st @@ -0,0 +1,4 @@ +filedirectory compatibility +localName + + ^ self name \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSMockFileDirectory.class/methodProperties.json b/packages/Presenter-Tests.package/PSMockFileDirectory.class/methodProperties.json index 44ab2ed..ccbf34e 100644 --- a/packages/Presenter-Tests.package/PSMockFileDirectory.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSMockFileDirectory.class/methodProperties.json @@ -12,6 +12,7 @@ "initialize" : "LM 6/15/2018 17:35", "isFile" : "LM 6/15/2018 17:34", "isFile:" : "LM 6/15/2018 17:34", + "localName" : "JZ 6/29/2018 17:00", "name" : "LM 6/15/2018 16:59", "name:" : "LM 6/15/2018 16:54", "parent" : "LM 6/15/2018 16:54", diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testInvalidSlideDirectoryNames.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testInvalidSlideDirectoryNames.st index 85c5e47..f7ef818 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testInvalidSlideDirectoryNames.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testInvalidSlideDirectoryNames.st @@ -3,5 +3,5 @@ testInvalidSlideDirectoryNames | invalidSlideDirectoryNames | invalidSlideDirectoryNames := {'12slide1' . 'slides1' . 'slide1test' . 'slide' . ''} asOrderedCollection. - self assert: (invalidSlideDirectoryNames noneSatisfy: [:each | (self tool checkSlideDirectory: each)]) + self assert: (invalidSlideDirectoryNames noneSatisfy: [:each | (self tool checkSlideDirectoryName: each)]) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st index feab090..42800da 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st @@ -1,4 +1,4 @@ -as yet unclassified +loading tests testLoadingProvidesWarning self diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNotNumber.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNotNumber.st new file mode 100644 index 0000000..ad6cfbe --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNotNumber.st @@ -0,0 +1,10 @@ +loading tests +testMorphNameIsNotNumber + + | presentationDirectory | + presentationDirectory := PSMockFileDirectory from: 'Presentation' -> { + 'slides' -> { + 'slide1' -> {'a.morph'} + } + }. + self assert: false equals: (self tool isValidPresentationDirectory: presentationDirectory) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNumber.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNumber.st new file mode 100644 index 0000000..a19c040 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMorphNameIsNumber.st @@ -0,0 +1,10 @@ +loading tests +testMorphNameIsNumber + + | presentationDirectory | + presentationDirectory := PSMockFileDirectory from: 'Presentation' -> { + 'slides' -> { + 'slide1' -> {'1.morph' . '2.morph'} + } + }. + self assert: true equals: (self tool isValidPresentationDirectory: presentationDirectory) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSingleMorphOnSlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSingleMorphOnSlide.st new file mode 100644 index 0000000..50bec21 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSingleMorphOnSlide.st @@ -0,0 +1,17 @@ +loading tests +testSingleMorphOnSlide + + | presentationDirectory | + presentationDirectory := PSMockFileDirectory from: 'Presentation' -> { + 'slides' -> { + 'slide1' -> {'a.morph'} + } + }. + self assert: false equals: (self tool isValidPresentationDirectory: presentationDirectory). + + presentationDirectory := PSMockFileDirectory from: 'Presentation' -> { + 'slides' -> { + 'slide1' -> {'1.morph' . '2.morph'} + } + }. + self assert: true equals: (self tool isValidPresentationDirectory: presentationDirectory) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSortMorphFiles.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSortMorphFiles.st new file mode 100644 index 0000000..b0470a6 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSortMorphFiles.st @@ -0,0 +1,7 @@ +loading tests +testSortMorphFiles + + self assert: {'1.morph'} equals: (self tool sortedMorphFiles: {'1.morph'}). + + self assert: {'2.morph' . '3.morph' . '4.morph'} + equals: (self tool sortedMorphFiles: {'4.morph' . '2.morph' . '3.morph'}) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index 1c7f221..c00ce49 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -24,10 +24,12 @@ "testEnterNonInteractiveMode" : "WoC 6/15/2018 20:18", "testErrorReportExistsPerSlide" : "LM 6/15/2018 18:38", "testInvalidLoadReturnsNil" : "LM 6/13/2018 17:34", - "testInvalidSlideDirectoryNames" : "MK 6/17/2018 19:09", + "testInvalidSlideDirectoryNames" : "JZ 6/29/2018 17:04", "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", "testMissingSlidesDirectory" : "LM 6/15/2018 18:39", "testMorphLoadIsValid" : "LM 6/13/2018 16:50", + "testMorphNameIsNotNumber" : "JZ 6/29/2018 17:32", + "testMorphNameIsNumber" : "JZ 6/29/2018 17:31", "testMoveSlide" : "LB 6/29/2018 15:45", "testMoveSlideOutOfBounds" : "LB 6/29/2018 15:45", "testMovedSlideStayCurrentSlide" : "LB 6/29/2018 15:45", @@ -37,6 +39,7 @@ "testSavingShouldProvideWarning" : "LM 6/23/2018 14:31", "testSelectSlide" : "LB 6/29/2018 15:45", "testSelectSlideClamps" : "LB 6/29/2018 15:45", + "testSingleMorphOnSlide" : "JZ 6/29/2018 17:23", "testSlideContainerExtent" : "WoC 6/15/2018 18:51", "testSlideContainerPosition" : "LM 6/8/2018 19:55", "testSlideCreation" : "LM 5/18/2018 18:38", @@ -49,6 +52,7 @@ "testSlideResizeRegression" : "LB 5/18/2018 20:27", "testSlidesDirectoryIsEmpty" : "LM 6/15/2018 18:42", "testSlidesReceiveEnablePresentationMode" : "LM 6/15/2018 18:40", + "testSortMorphFiles" : "JZ 6/29/2018 18:00", "testZeroSlidesRegression" : "LM 5/11/2018 18:09", "testnextSlideClampsToMax" : "LM 5/18/2018 18:42", "tool" : "LM 5/16/2018 17:13", From 0b0957a1d5d127b56af8972b4ba45deb8896a08e Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 18:20:18 +0200 Subject: [PATCH 09/22] First tests for #7 [skip ci] --- .../instance/testMiniatureCreated.st | 7 +++++++ .../instance/testMiniatureDeleted.st | 8 ++++++++ .../instance/testMiniatureSelects.st | 9 +++++++++ .../PSPresentationToolTest.class/methodProperties.json | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureCreated.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureDeleted.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureCreated.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureCreated.st new file mode 100644 index 0000000..87bb844 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureCreated.st @@ -0,0 +1,7 @@ +miniature view tests +testMiniatureCreated + + | oldSize | + oldSize := self tool slideMiniatures size. + self tool createSlide. + self assert: self tool slideMiniatures size equals: oldSize + 1 \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureDeleted.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureDeleted.st new file mode 100644 index 0000000..e989cbe --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureDeleted.st @@ -0,0 +1,8 @@ +miniature view tests +testMiniatureDeleted + + | oldSize | + self tool createSlide. + oldSize := self tool slideMiniatures size. + self tool deleteSlide. + self assert: self tool slideMiniatures size equals: oldSize - 1 \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st new file mode 100644 index 0000000..9a3ba4c --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st @@ -0,0 +1,9 @@ +miniature view tests +testMiniatureSelects + + | slideToSelect miniatureToClick | + 5 timesRepeat: [self tool createSlide]. + slideToSelect := self tool slides at: 3. + miniatureToClick := self tool miniatureOf: slideToSelect. + self hand handleEvent: (self redMouseDownAt: miniatureToClick center). + self assert: self tool currentSlide equals: slideToSelect \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index 1c7f221..60c74fa 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -26,6 +26,9 @@ "testInvalidLoadReturnsNil" : "LM 6/13/2018 17:34", "testInvalidSlideDirectoryNames" : "MK 6/17/2018 19:09", "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", + "testMiniatureCreated" : "LB 6/29/2018 18:01", + "testMiniatureDeleted" : "LB 6/29/2018 18:02", + "testMiniatureSelects" : "LB 6/29/2018 18:19", "testMissingSlidesDirectory" : "LM 6/15/2018 18:39", "testMorphLoadIsValid" : "LM 6/13/2018 16:50", "testMoveSlide" : "LB 6/29/2018 15:45", From 93e1138f914d31b104d047d00433b7fe6827959c Mon Sep 17 00:00:00 2001 From: Jonas Zimmermann Date: Fri, 29 Jun 2018 18:33:10 +0200 Subject: [PATCH 10/22] Refactored slide loading --- .../instance/checkSlideDirectory..st | 2 +- .../instance/checkSlideDirectoryName..st | 2 +- .../instance/loadPresentationUnchecked..st | 6 +++++- .../instance/loadSlideFromDirectory..st | 13 ++++--------- .../PSPresentationTool.class/methodProperties.json | 4 ++-- .../instance/testCanLoadEmptySlide.st | 4 +++- .../methodProperties.json | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st index 26aa864..5b04b96 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..st @@ -1,4 +1,4 @@ -as yet unclassified +presentation loading checkSlideDirectory: aDirectory ^ (self checkSlideDirectoryName: aDirectory localName) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st index b1ba120..280dc87 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..st @@ -1,4 +1,4 @@ -as yet unclassified +presentation loading checkSlideDirectoryName: aDirectoryName ^ aDirectoryName matchesRegex: 'slide[0-9]+' \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st index f3023d8..ca61a78 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st @@ -7,6 +7,10 @@ loadPresentationUnchecked: aDirectory slidesDirectory := aDirectory / self slidesDirectoryName. sortedDirectories := self sortedSlideSubdirectories: slidesDirectory. sortedDirectories do: [:each | - errorReport at: each put: (self loadSlideFromDirectory: slidesDirectory / each)]. + | slide | + slide := self loadSlideFromDirectory: slidesDirectory / each. + self slides addLast: slide. + errorReport at: each + put: (slidesDirectory / each) fileNames size - slide submorphs size]. self selectSlideNumber: 1. ^ errorReport \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st index 6ee3477..cd0bdb4 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st @@ -1,16 +1,11 @@ presentation loading loadSlideFromDirectory: aDirectory - | slide corruptedMorphs sortedMorphFiles | - corruptedMorphs := 0. + | slide sortedMorphFiles | slide := PSSlide new. slide setModel: self. sortedMorphFiles := self sortedMorphFiles: aDirectory fileNames. sortedMorphFiles do: [:each | - | morph | - morph := self loadMorphFromFile: aDirectory / each. - morph - ifNil: [corruptedMorphs := corruptedMorphs + 1] - ifNotNil: [slide addMorphBack: morph]]. - self slides addLast: slide. - ^ corruptedMorphs \ No newline at end of file + (self loadMorphFromFile: aDirectory / each) + ifNotNil: [:morph | slide addMorphBack: morph]]. + ^ slide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index fd96f1b..29ee684 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -52,8 +52,8 @@ "loadMorphFromStream:testIn:" : "LB 6/22/2018 19:28", "loadPresentation" : "WoC 6/27/2018 14:13", "loadPresentationFromDirectory:" : "LM 6/15/2018 18:22", - "loadPresentationUnchecked:" : "LB 6/29/2018 15:45", - "loadSlideFromDirectory:" : "JZ 6/29/2018 18:02", + "loadPresentationUnchecked:" : "JZ 6/29/2018 18:23", + "loadSlideFromDirectory:" : "JZ 6/29/2018 18:26", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", "miniatureOf:" : "LB 6/29/2018 17:28", diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCanLoadEmptySlide.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCanLoadEmptySlide.st index 5cf737f..ab79b68 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCanLoadEmptySlide.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCanLoadEmptySlide.st @@ -3,4 +3,6 @@ testCanLoadEmptySlide | directory | directory := PSMockFileDirectory named: 'slide'. - self assert: (self tool loadSlideFromDirectory: directory) equals: 0 description: 'Loading an empty slide should returns 0 morph errors' \ No newline at end of file + self + assert: 0 + equals: (self tool loadSlideFromDirectory: directory) submorphs size \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index c00ce49..5b4e7b0 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -14,7 +14,7 @@ "tearDown" : "LB 5/22/2018 17:37", "testBuildWith" : "LM 5/18/2018 18:48", "testCanLoadEmptyPresentation" : "LM 6/15/2018 18:48", - "testCanLoadEmptySlide" : "LM 6/15/2018 18:39", + "testCanLoadEmptySlide" : "JZ 6/29/2018 18:32", "testDefaultSlideCount" : "LM 5/18/2018 18:34", "testDeleteFirstSlide" : "LM 5/18/2018 18:25", "testDeletionDecreasesSlideCount" : "LM 5/18/2018 18:31", From 5388f98f983d50ab765e34be9102660bc4e963b9 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 18:58:46 +0200 Subject: [PATCH 11/22] Fixes Test miniature selects - working on #7 --- .../instance/testMiniatureSelects.st | 2 +- .../PSPresentationToolTest.class/methodProperties.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st index 9a3ba4c..16ca2a0 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureSelects.st @@ -5,5 +5,5 @@ testMiniatureSelects 5 timesRepeat: [self tool createSlide]. slideToSelect := self tool slides at: 3. miniatureToClick := self tool miniatureOf: slideToSelect. - self hand handleEvent: (self redMouseDownAt: miniatureToClick center). + self hand handleEvent: (self redMouseDownAt: miniatureToClick boundsInWorld center). self assert: self tool currentSlide equals: slideToSelect \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index e614079..2ac18d6 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -28,7 +28,7 @@ "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", "testMiniatureCreated" : "LB 6/29/2018 18:01", "testMiniatureDeleted" : "LB 6/29/2018 18:02", - "testMiniatureSelects" : "LB 6/29/2018 18:19", + "testMiniatureSelects" : "LB 6/29/2018 18:56", "testMissingSlidesDirectory" : "LM 6/15/2018 18:39", "testMorphLoadIsValid" : "LM 6/13/2018 16:50", "testMorphNameIsNotNumber" : "JZ 6/29/2018 17:32", From 2149000cab4cb79f1e2a88e2716160e12f679ede Mon Sep 17 00:00:00 2001 From: Jonas Zimmermann Date: Fri, 29 Jun 2018 19:13:23 +0200 Subject: [PATCH 12/22] Closes #68 reenabled PSSlideContainer >> ensurePreviousOwnerIsNotSubmorph --- .../instance/disablePresentationMode.st | 9 ++++----- .../instance/enablePresentationMode.st | 5 ++--- .../instance/ensurePreviousOwnerIsNotSubmorph.st | 2 +- .../PSSlideContainer.class/instance/occupyWorld..st | 7 +++++++ .../PSSlideContainer.class/instance/step.st | 7 +++++++ .../PSSlideContainer.class/instance/stepTime.st | 4 ++++ .../PSSlideContainer.class/methodProperties.json | 9 ++++++--- 7 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/occupyWorld..st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/step.st create mode 100644 packages/Presenter-Core.package/PSSlideContainer.class/instance/stepTime.st diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/disablePresentationMode.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/disablePresentationMode.st index 10742d0..33cd3af 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/disablePresentationMode.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/disablePresentationMode.st @@ -1,11 +1,10 @@ presentation mode disablePresentationMode - -" self ensurePreviousOwnerIsNotSubmorph." - self previousOwner - addMorph: self. + self ensurePreviousOwnerIsNotSubmorph. + self previousOwner addMorph: self. self disableNonInteractiveMode; color: self defaultColor; - deleteNotification + deleteNotification; + stopStepping diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/enablePresentationMode.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/enablePresentationMode.st index 93039f9..9978f7f 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/enablePresentationMode.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/enablePresentationMode.st @@ -4,8 +4,7 @@ enablePresentationMode self previousOwner: self owner. self owner removeMorph: self. self - openInWorld: self previousOwner world; - position: 0@0; - extent: self world extent; + occupyWorld: self previousOwner world; + startStepping; color: Color black; showNotification: 'Press ''i'' to toggle interactivity' \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/ensurePreviousOwnerIsNotSubmorph.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/ensurePreviousOwnerIsNotSubmorph.st index 9a57916..dec6b16 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/instance/ensurePreviousOwnerIsNotSubmorph.st +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/ensurePreviousOwnerIsNotSubmorph.st @@ -1,6 +1,6 @@ presentation mode ensurePreviousOwnerIsNotSubmorph - + "We have to make sure our previous owner is not a submorph of ourselves because otherwise setting me as submorph of this owner would crash the image." | morph window | morph := self findDeepSubmorphThat: [:m | m = self previousOwner ] ifAbsent: [nil]. morph ifNotNil: [ diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/occupyWorld..st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/occupyWorld..st new file mode 100644 index 0000000..78d7665 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/occupyWorld..st @@ -0,0 +1,7 @@ +stepping and presenter +occupyWorld: aWorld + + self + openInWorld: aWorld; + extent: aWorld extent; + position: 0@0. \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/step.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/step.st new file mode 100644 index 0000000..b337cd8 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/step.st @@ -0,0 +1,7 @@ +stepping and presenter +step + + self model presentationMode ifFalse: [^self]. + (self extent ~= self world extent + or: [self position ~= (0@0)]) + ifTrue: [self occupyWorld: self world] \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/instance/stepTime.st b/packages/Presenter-Core.package/PSSlideContainer.class/instance/stepTime.st new file mode 100644 index 0000000..5ee34a6 --- /dev/null +++ b/packages/Presenter-Core.package/PSSlideContainer.class/instance/stepTime.st @@ -0,0 +1,4 @@ +stepping and presenter +stepTime + + ^500 \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json index 88f92aa..0ce5077 100644 --- a/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSSlideContainer.class/methodProperties.json @@ -9,10 +9,10 @@ "defaultColor" : "MK 5/25/2018 15:41", "deleteNotification" : "WoC 6/15/2018 19:25", "disableNonInteractiveMode" : "WoC 6/15/2018 19:20", - "disablePresentationMode" : "WoC 6/15/2018 19:26", + "disablePresentationMode" : "JZ 6/29/2018 19:04", "enableNonInteractiveMode" : "WoC 6/15/2018 19:19", - "enablePresentationMode" : "LM 6/22/2018 15:40", - "ensurePreviousOwnerIsNotSubmorph" : "LM 6/1/2018 20:13", + "enablePresentationMode" : "JZ 6/29/2018 19:01", + "ensurePreviousOwnerIsNotSubmorph" : "JZ 6/29/2018 19:06", "filterEvent:for:" : "MK 6/28/2018 14:12", "handlesKeyboard:" : "WoC 6/15/2018 17:00", "in:tryToEvaluate:" : "WoC 6/15/2018 17:07", @@ -29,6 +29,7 @@ "makeMeVisible" : "WoC 6/3/2018 00:10", "notification" : "WoC 6/15/2018 19:21", "notification:" : "WoC 6/15/2018 19:21", + "occupyWorld:" : "JZ 6/29/2018 19:01", "presentationCommandShortcuts" : "MK 6/28/2018 13:40", "presentationCommandShortcuts:" : "MK 6/28/2018 14:03", "presentationCreationCommandShortcuts" : "MK 6/28/2018 13:40", @@ -47,5 +48,7 @@ "sharedShortcuts" : "LB 6/29/2018 15:45", "showNotification:" : "LM 6/22/2018 15:40", "showSlide:" : "LB 5/6/2018 16:49", + "step" : "JZ 6/29/2018 19:02", + "stepTime" : "JZ 6/29/2018 18:56", "toggleInteractivity" : "WoC 6/15/2018 18:39", "wantsDroppedMorph:event:" : "MK 6/7/2018 09:29" } } From 6369982a510c50b9450ccbdccd6a10b952599090 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 19:23:38 +0200 Subject: [PATCH 13/22] Added more tests for #7 --- .../PSMiniature.class/instance/isHighlighted.st | 4 ++++ .../PSMiniature.class/methodProperties.json | 1 + .../instance/testCurrentMiniatureHighlighted.st | 6 ++++++ .../instance/testSelectedMiniatureChanges.st | 8 ++++++++ .../PSPresentationToolTest.class/methodProperties.json | 2 ++ 5 files changed, 21 insertions(+) create mode 100644 packages/Presenter-Core.package/PSMiniature.class/instance/isHighlighted.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCurrentMiniatureHighlighted.st create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectedMiniatureChanges.st diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/isHighlighted.st b/packages/Presenter-Core.package/PSMiniature.class/instance/isHighlighted.st new file mode 100644 index 0000000..bddf908 --- /dev/null +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/isHighlighted.st @@ -0,0 +1,4 @@ +as yet unclassified +isHighlighted + + ^ self borderColor = self highlightBorderColor \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index c26f8da..d682507 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -8,6 +8,7 @@ "highlightBorderColor" : "LB 6/29/2018 17:48", "highlightBorderWidth" : "LB 6/29/2018 17:16", "initialize" : "LB 6/29/2018 17:43", + "isHighlighted" : "LB 6/29/2018 19:05", "model" : "LB 6/29/2018 15:52", "model:" : "LB 6/29/2018 15:52", "mouseDown:" : "LB 6/29/2018 15:49", diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCurrentMiniatureHighlighted.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCurrentMiniatureHighlighted.st new file mode 100644 index 0000000..bf4184a --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testCurrentMiniatureHighlighted.st @@ -0,0 +1,6 @@ +miniature view tests +testCurrentMiniatureHighlighted + + 5 timesRepeat: [self tool createSlide]. + self tool selectSlideNumber: 5. + self assert: self tool currentMiniature isHighlighted \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectedMiniatureChanges.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectedMiniatureChanges.st new file mode 100644 index 0000000..f80e253 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSelectedMiniatureChanges.st @@ -0,0 +1,8 @@ +miniature view tests +testSelectedMiniatureChanges + + | slide | + 5 timesRepeat: [self tool createSlide]. + slide := self tool slideAt: 2. + self tool selectSlide: slide. + self assert: (self tool miniatureOf: slide) equals: self tool currentMiniature \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index 2ac18d6..f3bc2b3 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -15,6 +15,7 @@ "testBuildWith" : "LM 5/18/2018 18:48", "testCanLoadEmptyPresentation" : "LM 6/15/2018 18:48", "testCanLoadEmptySlide" : "JZ 6/29/2018 18:32", + "testCurrentMiniatureHighlighted" : "LB 6/29/2018 19:05", "testDefaultSlideCount" : "LM 5/18/2018 18:34", "testDeleteFirstSlide" : "LM 5/18/2018 18:25", "testDeletionDecreasesSlideCount" : "LM 5/18/2018 18:31", @@ -42,6 +43,7 @@ "testSavingShouldProvideWarning" : "LM 6/23/2018 14:31", "testSelectSlide" : "LB 6/29/2018 15:45", "testSelectSlideClamps" : "LB 6/29/2018 15:45", + "testSelectedMiniatureChanges" : "LB 6/29/2018 19:05", "testSingleMorphOnSlide" : "JZ 6/29/2018 17:23", "testSlideContainerExtent" : "WoC 6/15/2018 18:51", "testSlideContainerPosition" : "LM 6/8/2018 19:55", From fc03aeba58a67f4d45bcd2b05cd293130efe3c02 Mon Sep 17 00:00:00 2001 From: Tom Braun Date: Fri, 29 Jun 2018 19:23:53 +0200 Subject: [PATCH 14/22] wrote 1 test for miniatures --- .../PSPresentationTool.class/methodProperties.json | 2 +- .../instance/testMiniatureChangesIfSlideChanges.st | 11 +++++++++++ .../methodProperties.json | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureChangesIfSlideChanges.st diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 29ee684..5e93cb9 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -85,7 +85,7 @@ "savePresentationConfirmed" : "LM 6/23/2018 14:29", "selectSlide:" : "LB 6/29/2018 15:47", "selectSlideButtonData" : "WoC 6/22/2018 15:42", - "selectSlideNumber:" : "LB 6/29/2018 17:23", + "selectSlideNumber:" : "WoC 6/29/2018 19:18", "showErrorReport:" : "MK 6/8/2018 18:30", "slideAt:" : "LM 5/6/2018 15:37", "slideContainer" : "MK 5/6/2018 15:32", diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureChangesIfSlideChanges.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureChangesIfSlideChanges.st new file mode 100644 index 0000000..7c0d2b9 --- /dev/null +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testMiniatureChangesIfSlideChanges.st @@ -0,0 +1,11 @@ +miniature view tests +testMiniatureChangesIfSlideChanges + + | slide miniature oldMiniatureForm | + slide := self slides first. + miniature := (self tool miniatureOf: slide). + oldMiniatureForm := miniature form. + + slide addContent: (Morph new center: slide center). + self tool step. "the tool is stepping but we do not want to wait here" + self assert: oldMiniatureForm ~= miniature form \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index 2ac18d6..e7f7e17 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -26,6 +26,7 @@ "testInvalidLoadReturnsNil" : "LM 6/13/2018 17:34", "testInvalidSlideDirectoryNames" : "JZ 6/29/2018 17:04", "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", + "testMiniatureChangesIfSlideChanges" : "WoC 6/29/2018 19:23", "testMiniatureCreated" : "LB 6/29/2018 18:01", "testMiniatureDeleted" : "LB 6/29/2018 18:02", "testMiniatureSelects" : "LB 6/29/2018 18:56", From 15354d79b074cd4cdac0438d09a8636dd90cf561 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 19:40:44 +0200 Subject: [PATCH 15/22] Added Font size dialog test --- .../PSTextMorph.class/instance/fontSizeDialogText.st | 4 ++++ .../PSTextMorph.class/instance/showFontSizeDialog.st | 2 +- .../PSTextMorph.class/methodProperties.json | 3 ++- .../instance/testLoadingProvidesWarning.st | 2 +- .../instance/testSavingShouldProvideWarning.st | 2 +- .../PSPresentationToolTest.class/methodProperties.json | 4 ++-- .../PSTextMorphTest.class/instance/testFontSizeDialog.st | 7 +++++++ .../PSTextMorphTest.class/methodProperties.json | 1 + ...ould.raise.withDescriptionContainingCaseInsensitive..st | 7 ------- .../UITestCase.class/methodProperties.json | 1 - 10 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 packages/Presenter-Core.package/PSTextMorph.class/instance/fontSizeDialogText.st create mode 100644 packages/Presenter-Tests.package/PSTextMorphTest.class/instance/testFontSizeDialog.st delete mode 100644 packages/Presenter-Tests.package/UITestCase.class/instance/should.raise.withDescriptionContainingCaseInsensitive..st diff --git a/packages/Presenter-Core.package/PSTextMorph.class/instance/fontSizeDialogText.st b/packages/Presenter-Core.package/PSTextMorph.class/instance/fontSizeDialogText.st new file mode 100644 index 0000000..8135985 --- /dev/null +++ b/packages/Presenter-Core.package/PSTextMorph.class/instance/fontSizeDialogText.st @@ -0,0 +1,4 @@ +accessing +fontSizeDialogText + + ^ 'Please enter new text size' \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSTextMorph.class/instance/showFontSizeDialog.st b/packages/Presenter-Core.package/PSTextMorph.class/instance/showFontSizeDialog.st index 683f86a..4f5a45f 100644 --- a/packages/Presenter-Core.package/PSTextMorph.class/instance/showFontSizeDialog.st +++ b/packages/Presenter-Core.package/PSTextMorph.class/instance/showFontSizeDialog.st @@ -3,7 +3,7 @@ showFontSizeDialog | newSize | newSize := UIManager default - request: 'Please enter new text size' + request: self fontSizeDialogText initialAnswer: self selectionFontSize printString. newSize isEmpty ifTrue: [^ self]. [self selectionFontSize: newSize asNumber] diff --git a/packages/Presenter-Core.package/PSTextMorph.class/methodProperties.json b/packages/Presenter-Core.package/PSTextMorph.class/methodProperties.json index 0f256f6..9827df2 100644 --- a/packages/Presenter-Core.package/PSTextMorph.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSTextMorph.class/methodProperties.json @@ -9,6 +9,7 @@ "defaultFontColor" : "LM 6/6/2018 19:22", "defaultTextBackgroundColor" : "LM 6/15/2018 19:04", "ensureScalingFontAttribute" : "LB 6/17/2018 18:39", + "fontSizeDialogText" : "LB 6/29/2018 19:38", "hasUnacceptedEdits" : "LM 6/8/2018 20:48", "initialize" : "LM 6/18/2018 10:07", "initializeTextAttribute" : "LB 6/12/2018 16:48", @@ -22,7 +23,7 @@ "selectionFontSize:" : "LB 6/15/2018 19:27", "showBackgroundColorDialog" : "LB 6/15/2018 16:14", "showFontColorDialog" : "LB 6/8/2018 14:56", - "showFontSizeDialog" : "LB 6/15/2018 17:02", + "showFontSizeDialog" : "LB 6/29/2018 19:38", "textEdited:" : "LB 6/17/2018 18:46", "textScale" : "LB 5/25/2018 16:08", "textScale:" : "LB 6/8/2018 15:38" } } diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st index 42800da..0a61ce0 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testLoadingProvidesWarning.st @@ -4,4 +4,4 @@ testLoadingProvidesWarning self should: [self tool loadPresentation] raise: ProvideAnswerNotification - withDescriptionContainingCaseInsensitive: 'warning' \ No newline at end of file + description: self tool riskyOperationMessage. \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSavingShouldProvideWarning.st b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSavingShouldProvideWarning.st index a1b2766..874f1b9 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSavingShouldProvideWarning.st +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/instance/testSavingShouldProvideWarning.st @@ -4,4 +4,4 @@ testSavingShouldProvideWarning self should: [self tool savePresentation] raise: ProvideAnswerNotification - withDescriptionContainingCaseInsensitive: 'warning'. \ No newline at end of file + description: self tool riskyOperationMessage. \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json index f3bc2b3..62b8669 100644 --- a/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSPresentationToolTest.class/methodProperties.json @@ -26,7 +26,7 @@ "testErrorReportExistsPerSlide" : "LM 6/15/2018 18:38", "testInvalidLoadReturnsNil" : "LM 6/13/2018 17:34", "testInvalidSlideDirectoryNames" : "JZ 6/29/2018 17:04", - "testLoadingProvidesWarning" : "LM 6/23/2018 14:20", + "testLoadingProvidesWarning" : "LB 6/29/2018 19:38", "testMiniatureCreated" : "LB 6/29/2018 18:01", "testMiniatureDeleted" : "LB 6/29/2018 18:02", "testMiniatureSelects" : "LB 6/29/2018 18:56", @@ -40,7 +40,7 @@ "testNextSlide" : "LB 6/29/2018 15:45", "testNonInteractivetyInNonInteractiveMode" : "WoC 6/15/2018 22:18", "testPreviousSlideClampsToMin" : "LM 5/18/2018 18:45", - "testSavingShouldProvideWarning" : "LM 6/23/2018 14:31", + "testSavingShouldProvideWarning" : "LB 6/29/2018 19:38", "testSelectSlide" : "LB 6/29/2018 15:45", "testSelectSlideClamps" : "LB 6/29/2018 15:45", "testSelectedMiniatureChanges" : "LB 6/29/2018 19:05", diff --git a/packages/Presenter-Tests.package/PSTextMorphTest.class/instance/testFontSizeDialog.st b/packages/Presenter-Tests.package/PSTextMorphTest.class/instance/testFontSizeDialog.st new file mode 100644 index 0000000..5f96a13 --- /dev/null +++ b/packages/Presenter-Tests.package/PSTextMorphTest.class/instance/testFontSizeDialog.st @@ -0,0 +1,7 @@ +style tests +testFontSizeDialog + + self + should: [self textField showFontSizeDialog] + raise: ProvideAnswerNotification + description: self textField fontSizeDialogText. \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSTextMorphTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSTextMorphTest.class/methodProperties.json index 7cbf315..32dca92 100644 --- a/packages/Presenter-Tests.package/PSTextMorphTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSTextMorphTest.class/methodProperties.json @@ -8,6 +8,7 @@ "testBackgroundColorDialog" : "LB 6/15/2018 16:46", "testContextMenu" : "MK 6/1/2018 19:45", "testFontColorDialog" : "LB 6/15/2018 16:46", + "testFontSizeDialog" : "LB 6/29/2018 19:40", "testLocalFontColor" : "LB 6/12/2018 17:15", "testLocalFontSize" : "LB 6/12/2018 17:15", "testTextFieldRescale" : "LB 6/8/2018 14:59", diff --git a/packages/Presenter-Tests.package/UITestCase.class/instance/should.raise.withDescriptionContainingCaseInsensitive..st b/packages/Presenter-Tests.package/UITestCase.class/instance/should.raise.withDescriptionContainingCaseInsensitive..st deleted file mode 100644 index 115d727..0000000 --- a/packages/Presenter-Tests.package/UITestCase.class/instance/should.raise.withDescriptionContainingCaseInsensitive..st +++ /dev/null @@ -1,7 +0,0 @@ -accessing -should: aBlock raise: anException withDescriptionContainingCaseInsensitive: aString - - ^ self assert: ([aBlock value. false] - on: anException - do: [:exception | - exception description asLowercase includesSubstring: aString asLowercase]) \ No newline at end of file diff --git a/packages/Presenter-Tests.package/UITestCase.class/methodProperties.json b/packages/Presenter-Tests.package/UITestCase.class/methodProperties.json index ef08e9c..a645ef4 100644 --- a/packages/Presenter-Tests.package/UITestCase.class/methodProperties.json +++ b/packages/Presenter-Tests.package/UITestCase.class/methodProperties.json @@ -11,7 +11,6 @@ "keystroke:at:" : "WoC 6/15/2018 18:26", "number:isSimilarTo:" : "LB 5/29/2018 17:39", "redMouseDownAt:" : "LB 5/23/2018 16:01", - "should:raise:withDescriptionContainingCaseInsensitive:" : "LM 6/23/2018 14:21", "tearDown" : "LM 6/17/2018 11:23", "world" : "LM 6/15/2018 18:41", "yellowMouseDownAt:" : "LB 5/23/2018 16:02" } } From e51b6eb9c9371fa5cc32f0116f58f4821772666e Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Fri, 29 Jun 2018 20:11:15 +0200 Subject: [PATCH 16/22] Extending resize container tests - wip [skip ci] --- .../instance/testContainerResizingAllCorners.st | 8 ++++++++ .../instance/testContainerResizingCorner.offset..st | 12 ++++++++++++ .../PSSlideSubmorphTest.class/methodProperties.json | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st create mode 100644 packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingCorner.offset..st diff --git a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st new file mode 100644 index 0000000..54e410e --- /dev/null +++ b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st @@ -0,0 +1,8 @@ +container tests +testContainerResizingAllCorners + + self + testContainerResizingCorner: 0 offset: -20@ -20; + testContainerResizingCorner: 1 offset: 20@ -20; + testContainerResizingCorner: 2 offset: -20@20; + testContainerResizingCorner: 3 offset: 20@20 \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingCorner.offset..st b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingCorner.offset..st new file mode 100644 index 0000000..baeb25f --- /dev/null +++ b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingCorner.offset..st @@ -0,0 +1,12 @@ +container tests +testContainerResizingCorner: aNumber offset: aPoint + + | container oldExtent targetPoint event| + self slide addContent: self morph. + container := self morph owner. + oldExtent := self morph extent. + targetPoint := (container resizeHandles at: aNumber) center + aPoint. + event := MouseButtonEvent new setPosition: targetPoint. + container dragCorner: aNumber event: event fromHandle: nil. + self slide fullBounds. + self assert: self morph extent equals: oldExtent + aPoint abs \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json index 8397d18..2755641 100644 --- a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json @@ -9,6 +9,8 @@ "setUp" : "WoC 6/15/2018 20:15", "tearDown" : "LB 6/1/2018 17:51", "testContainerResizing" : "LB 5/23/2018 16:44", + "testContainerResizingAllCorners" : "LB 6/29/2018 20:09", + "testContainerResizingCorner:offset:" : "LB 6/29/2018 20:06", "testContextMenu" : "WoC 6/15/2018 20:13", "testDroppingCreatesContainer" : "LM 5/18/2018 18:59", "testLeavePresentationModeEnablesHandles" : "LM 6/8/2018 20:11", From 7e928c809a1f9c451e83918b4055f0fca495082d Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Fri, 29 Jun 2018 20:12:09 +0200 Subject: [PATCH 17/22] Fixes miniature slide view while loading --- .../PSPresentationTool.class/instance/deleteAllSlides.st | 6 ++++++ .../instance/loadPresentationUnchecked..st | 6 ++++-- .../instance/loadSlideFromDirectory..st | 3 +-- .../instance/morph.survivesOneCycleIn..st | 4 +++- .../PSPresentationTool.class/methodProperties.json | 7 ++++--- 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteAllSlides.st diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteAllSlides.st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteAllSlides.st new file mode 100644 index 0000000..b05090d --- /dev/null +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteAllSlides.st @@ -0,0 +1,6 @@ +slide management +deleteAllSlides + + [self slideCount > self minimumSlideCount] + whileTrue: [self deleteSlide]. + self deleteSlide \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st index ca61a78..c66c157 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st @@ -3,14 +3,16 @@ loadPresentationUnchecked: aDirectory | slidesDirectory errorReport sortedDirectories | errorReport := Dictionary new. - self slides removeAll. + self deleteAllSlides. "will remove all slides up to the minim slide count" slidesDirectory := aDirectory / self slidesDirectoryName. sortedDirectories := self sortedSlideSubdirectories: slidesDirectory. sortedDirectories do: [:each | | slide | slide := self loadSlideFromDirectory: slidesDirectory / each. - self slides addLast: slide. + slide redraw. + self updateCurrentMiniature. errorReport at: each put: (slidesDirectory / each) fileNames size - slide submorphs size]. + self minimumSlideCount timesRepeat: [self deleteSlide: 1]. self selectSlideNumber: 1. ^ errorReport \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st index cd0bdb4..839d4d2 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..st @@ -2,8 +2,7 @@ presentation loading loadSlideFromDirectory: aDirectory | slide sortedMorphFiles | - slide := PSSlide new. - slide setModel: self. + slide := self createSlide. sortedMorphFiles := self sortedMorphFiles: aDirectory fileNames. sortedMorphFiles do: [:each | (self loadMorphFromFile: aDirectory / each) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/morph.survivesOneCycleIn..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/morph.survivesOneCycleIn..st index 52bb7c6..31eb897 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/morph.survivesOneCycleIn..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/morph.survivesOneCycleIn..st @@ -5,7 +5,9 @@ morph: aMorph survivesOneCycleIn: aWorld | debuggersBefore newDebuggers | debuggersBefore := Debugger allInstances. aMorph openInWorld: aWorld. - World doOneCycle. + [World doOneCycle] + on: Error + do: [^false]. newDebuggers := Debugger allInstances reject: [:each | debuggersBefore includes: each]. newDebuggers do: [:each | each abandon]. diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 5e93cb9..40c394b 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -33,6 +33,7 @@ "currentSlideNumberString" : "LB 6/22/2018 15:59", "defaultDirectory" : "JZ 6/8/2018 17:01", "defaultDirectoryName" : "JZ 6/8/2018 16:52", + "deleteAllSlides" : "LM 6/29/2018 20:03", "deleteSlide" : "LB 5/6/2018 18:03", "deleteSlide:" : "LB 6/29/2018 16:22", "deleteSlideButtonData" : "LB 6/22/2018 15:50", @@ -52,8 +53,8 @@ "loadMorphFromStream:testIn:" : "LB 6/22/2018 19:28", "loadPresentation" : "WoC 6/27/2018 14:13", "loadPresentationFromDirectory:" : "LM 6/15/2018 18:22", - "loadPresentationUnchecked:" : "JZ 6/29/2018 18:23", - "loadSlideFromDirectory:" : "JZ 6/29/2018 18:26", + "loadPresentationUnchecked:" : "LM 6/29/2018 20:10", + "loadSlideFromDirectory:" : "LM 6/29/2018 20:05", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", "miniatureOf:" : "LB 6/29/2018 17:28", @@ -62,7 +63,7 @@ "miniatures" : "LB 6/29/2018 16:14", "miniatures:" : "LB 6/29/2018 16:14", "minimumSlideCount" : "WoC 6/22/2018 16:10", - "morph:survivesOneCycleIn:" : "LM 6/13/2018 16:57", + "morph:survivesOneCycleIn:" : "LM 6/29/2018 19:48", "moveCurrentSlideTo:" : "LB 6/29/2018 16:03", "newImageField" : "LM 5/18/2018 17:13", "newTextField" : "LB 5/25/2018 16:43", From 432b9b0db449beede213bea0ba05ef7e530e209a Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Fri, 29 Jun 2018 20:19:54 +0200 Subject: [PATCH 18/22] Finished resizing test --- .../instance/testContainerResizingAllCorners.st | 8 ++++---- .../PSSlideSubmorphTest.class/methodProperties.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st index 54e410e..60d6740 100644 --- a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st +++ b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/instance/testContainerResizingAllCorners.st @@ -2,7 +2,7 @@ container tests testContainerResizingAllCorners self - testContainerResizingCorner: 0 offset: -20@ -20; - testContainerResizingCorner: 1 offset: 20@ -20; - testContainerResizingCorner: 2 offset: -20@20; - testContainerResizingCorner: 3 offset: 20@20 \ No newline at end of file + testContainerResizingCorner: 1 offset: -20@ -20; + testContainerResizingCorner: 2 offset: 20@ -20; + testContainerResizingCorner: 3 offset: 20@20; + testContainerResizingCorner: 4 offset: -20@20 \ No newline at end of file diff --git a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json index 2755641..a7444e8 100644 --- a/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json +++ b/packages/Presenter-Tests.package/PSSlideSubmorphTest.class/methodProperties.json @@ -9,7 +9,7 @@ "setUp" : "WoC 6/15/2018 20:15", "tearDown" : "LB 6/1/2018 17:51", "testContainerResizing" : "LB 5/23/2018 16:44", - "testContainerResizingAllCorners" : "LB 6/29/2018 20:09", + "testContainerResizingAllCorners" : "LM 6/29/2018 20:19", "testContainerResizingCorner:offset:" : "LB 6/29/2018 20:06", "testContextMenu" : "WoC 6/15/2018 20:13", "testDroppingCreatesContainer" : "LM 5/18/2018 18:59", From fec2ac632c9aa2991414469a21a04c88dffb4982 Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Fri, 29 Jun 2018 20:27:07 +0200 Subject: [PATCH 19/22] Fixes miniature view on travis --- .../instance/loadPresentationUnchecked..st | 2 +- .../PSPresentationTool.class/methodProperties.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st index c66c157..285120d 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/loadPresentationUnchecked..st @@ -9,7 +9,7 @@ loadPresentationUnchecked: aDirectory sortedDirectories do: [:each | | slide | slide := self loadSlideFromDirectory: slidesDirectory / each. - slide redraw. + slide fullBounds. self updateCurrentMiniature. errorReport at: each put: (slidesDirectory / each) fileNames size - slide submorphs size]. diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 40c394b..9c656c1 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -53,7 +53,7 @@ "loadMorphFromStream:testIn:" : "LB 6/22/2018 19:28", "loadPresentation" : "WoC 6/27/2018 14:13", "loadPresentationFromDirectory:" : "LM 6/15/2018 18:22", - "loadPresentationUnchecked:" : "LM 6/29/2018 20:10", + "loadPresentationUnchecked:" : "LM 6/29/2018 20:26", "loadSlideFromDirectory:" : "LM 6/29/2018 20:05", "loadingButtonData" : "LB 6/22/2018 15:50", "menuBarButtonData" : "LB 6/22/2018 17:58", From 45c112757cfc2c7e7b7623c95f673ae82a96c5c3 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Tue, 3 Jul 2018 13:19:26 +0200 Subject: [PATCH 20/22] Closes #66 - PNG export paths not os independent --- .../PSPresentationTool.class/instance/exportAsPNGs..st | 6 ++++-- .../PSPresentationTool.class/methodProperties.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st b/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st index 235f38f..8b00f6e 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st +++ b/packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..st @@ -1,11 +1,13 @@ do not touch exportAsPNGs: name - (FileDirectory default / 'PSSlidePNGs' / name) assureExistence. + | directory | + directory := FileDirectory default / 'PSSlidePNGs' / name. + directory assureExistence. self enablePresentationMode. self slideContainer enableNonInteractiveMode. self slides withIndexDo: [:each :index | self selectSlideNumber: index. World doOneCycle. - each exportAsPNGNamed: 'PSSlidePNGs\', name, '\slide',index,'.png']. + each exportAsPNGNamed: (directory / ('slide', index, '.png')) fullName]. self disablePresentationMode \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json index 9c656c1..c9c9837 100644 --- a/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSPresentationTool.class/methodProperties.json @@ -40,7 +40,7 @@ "disablePresentationMode" : "LM 5/25/2018 16:58", "duplicateCurrentSlide" : "WoC 6/22/2018 17:14", "enablePresentationMode" : "LM 6/8/2018 20:01", - "exportAsPNGs:" : "LB 6/29/2018 15:45", + "exportAsPNGs:" : "LB 7/3/2018 13:16", "fileButtonData" : "LB 6/22/2018 17:12", "getValidPresentationName:" : "JZ 6/8/2018 20:45", "highlightCurrentMiniature" : "LB 6/29/2018 17:22", From 8ee90dc3753cf379ee77e9ae8a91fe5281385ad8 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Tue, 3 Jul 2018 16:46:11 +0200 Subject: [PATCH 21/22] Fixes slide miniature image morph border --- .../PSMiniature.class/instance/updateImage.st | 3 ++- .../PSMiniature.class/methodProperties.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st index ffac311..d8c1c4a 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st @@ -1,4 +1,5 @@ as yet unclassified updateImage - self newForm: (self slide imageForm scaledToSize: self defaultSize) \ No newline at end of file + self newForm: (self slide imageForm scaledToSize: self defaultSize). + self borderWidth: self borderWidth. \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index d682507..a3898bb 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -16,4 +16,4 @@ "slide" : "WoC 6/29/2018 15:19", "slide:" : "LB 6/29/2018 17:00", "unHighlight" : "LB 6/29/2018 17:42", - "updateImage" : "WoC 6/29/2018 15:28" } } + "updateImage" : "LB 7/3/2018 16:05" } } From 1ca182f6a1d67aa2dd2f0015d85fb2b7e141bcb2 Mon Sep 17 00:00:00 2001 From: Leon Bein Date: Tue, 3 Jul 2018 17:05:02 +0200 Subject: [PATCH 22/22] More fixes --- .../PSMiniature.class/instance/highlight.st | 3 ++- .../PSMiniature.class/instance/initialize.st | 2 +- .../PSMiniature.class/instance/unHighlight.st | 3 ++- .../PSMiniature.class/instance/updateImage.st | 2 +- .../PSMiniature.class/methodProperties.json | 10 +++++----- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st index e154838..3fe56d2 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/highlight.st @@ -1,4 +1,5 @@ as yet unclassified highlight - self borderColor: self highlightBorderColor \ No newline at end of file + self borderColor: self highlightBorderColor. + self updateImage \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st index def85b8..f222668 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/initialize.st @@ -3,4 +3,4 @@ initialize super initialize. self borderWidth: self highlightBorderWidth. - self unHighlight \ No newline at end of file + self borderColor: Color transparent \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st index ce94fcb..1586974 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.st @@ -1,4 +1,5 @@ as yet unclassified unHighlight - self borderColor: Color transparent \ No newline at end of file + self borderColor: Color transparent. + self updateImage \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st index d8c1c4a..89696df 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st +++ b/packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.st @@ -2,4 +2,4 @@ as yet unclassified updateImage self newForm: (self slide imageForm scaledToSize: self defaultSize). - self borderWidth: self borderWidth. \ No newline at end of file + self borderWidth: self borderWidth \ No newline at end of file diff --git a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json index a3898bb..29e2bf5 100644 --- a/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json +++ b/packages/Presenter-Core.package/PSMiniature.class/methodProperties.json @@ -4,16 +4,16 @@ "instance" : { "defaultSize" : "WoC 6/29/2018 15:29", "handlesMouseDown:" : "WoC 6/29/2018 15:33", - "highlight" : "LB 6/29/2018 17:42", + "highlight" : "LB 7/3/2018 16:57", "highlightBorderColor" : "LB 6/29/2018 17:48", "highlightBorderWidth" : "LB 6/29/2018 17:16", - "initialize" : "LB 6/29/2018 17:43", + "initialize" : "LB 7/3/2018 16:57", "isHighlighted" : "LB 6/29/2018 19:05", "model" : "LB 6/29/2018 15:52", "model:" : "LB 6/29/2018 15:52", - "mouseDown:" : "LB 6/29/2018 15:49", + "mouseDown:" : "LB 7/3/2018 17:00", "setSlide:" : "WoC 6/29/2018 15:26", "slide" : "WoC 6/29/2018 15:19", "slide:" : "LB 6/29/2018 17:00", - "unHighlight" : "LB 6/29/2018 17:42", - "updateImage" : "LB 7/3/2018 16:05" } } + "unHighlight" : "LB 7/3/2018 16:56", + "updateImage" : "LB 7/3/2018 17:04" } }