The Trunk: EToys-jl.238.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-jl.238.mcz

commits-2
Jens Lincke uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-jl.238.mcz

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

Name: EToys-jl.238
Author: jl
Time: 20 September 2016, 3:50:57.399902 pm
UUID: 4130651d-c6a9-1c43-a5aa-734f9e8d8202
Ancestors: EToys-jl.237

allow closing projects in the project history view morph. necessary because of changes to how project deletion works for trees of projects.

=============== Diff against EToys-jl.237 ===============

Item was added:
+ ----- Method: EToyProjectHistoryMorph>>confirmedDelete:evt:from: (in category 'as yet unclassified') -----
+ confirmedDelete: aProject evt: evt from: origin
+
+ self delete.
+ aProject = Project current ifTrue: [
+ ^ self inform: 'Cannot delete current project' translated].
+ (self confirm: ('Do you really want to delete {1}
+ and all its content?' translated format: {aProject name}))
+ ifTrue: [aProject delete].!

Item was changed:
  ----- Method: EToyProjectHistoryMorph>>jumpToProject (in category 'as yet unclassified') -----
  jumpToProject
 
- | selection |
- selection := (Project current buildJumpToMenu: MenuMorph new) invokeModal.
  self closeMyFlapIfAny.
+ Project current jumpToProject.
+
- Project current jumpToSelection: selection
  !

Item was changed:
  ----- Method: EToyProjectHistoryMorph>>rebuild (in category 'as yet unclassified') -----
  rebuild
 
  | history r1 |
  history := ProjectHistory currentHistory mostRecentCopy.
  changeCounter := ProjectHistory changeCounter.
  self removeAllMorphs.
  self rubberBandCells: false. "enable growing"
  r1 := self addARow: {
  self inAColumn: {
  StringMorph new contents: 'Jump...' translated; lock.
  }.
  }.
  r1 on: #mouseUp send: #jumpToProject to: self.
 
  history do: [ :each |
  (
  self addARow: {
  (self inAColumn: {
  StretchyImageMorph new form: each second; minWidth: 35; minHeight: 35; lock
  }) vResizing: #spaceFill.
  self inAColumn: {
  StringMorph new contents: each first; lock.
+ "StringMorph new contents: each fourth first; lock."
- "StringMorph new contents: each third; lock."
  }.
+ (self inAColumn: {
+ StringMorph new
+ color: Color red;
+ contents: 'X';
+ on: #mouseDown send: #confirmedDelete:evt:from: to: self withValue: each fourth first
+ }) hResizing: #rigid.
  }
  )
  color: Color paleYellow;
  borderWidth: 1;
  borderColor: #raised;
  vResizing: #spaceFill;
  on: #mouseUp send: #mouseUp:in: to: self;
  on: #mouseDown send: #mouseDown:in: to: self;
  on: #mouseMove send: #mouseMove:in: to: self;
  on: #mouseLeave send: #mouseLeave:in: to: self;
  setProperty: #projectParametersTuple toValue: each;
  setBalloonText: (each third isEmptyOrNil ifTrue: ['not saved'] ifFalse: [each third])
  ].
  "---
  newTuple := {
  aProject name.
  aProject thumbnail.
  aProject url.
  WeakArray with: aProject.
  }.
  ---"!

Item was changed:
  ----- Method: SugarNavigatorBar>>newProject (in category 'the actions') -----
  newProject
+ "Not creating a view. mt's refactoring of projects breaks the assumption that we can always delete a project and all it's children through a view anyway"
  MorphicProject new enter!