The Trunk: Morphic-ar.266.mcz

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

The Trunk: Morphic-ar.266.mcz

commits-2
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.266.mcz

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

Name: Morphic-ar.266
Author: ar
Time: 12 December 2009, 6:47:25 am
UUID: dd6fa7c2-4539-d34e-9535-027fc1e717b8
Ancestors: Morphic-ul.265

UserDialogBoxMorph gets an optional position argument. The menu item "About Squeak" is now filled in with proper information.

=============== Diff against Morphic-ul.265 ===============

Item was changed:
  ----- Method: UserDialogBoxMorph class>>confirm:orCancel: (in category 'utilities') -----
  confirm: aString orCancel: cancelBlock
  "UserDialogBoxMorph confirm: 'Do you like chocolate?'"
+ ^self confirm: aString orCancel: cancelBlock at: nil!
- | dialog resp |
- dialog := self new.
- dialog title: 'Confirmation'.
- dialog label: aString.
- dialog addButton: '       Yes       ' translated value: true.
- dialog addButton: '        No        ' translated  value: false..
- dialog addButton: '     Cancel     ' translated  value: nil..
- resp := dialog runModalIn: ActiveWorld forHand: ActiveHand.
- ^resp ifNil:[cancelBlock value]!

Item was added:
+ ----- Method: UserDialogBoxMorph class>>confirm:orCancel:at: (in category 'utilities') -----
+ confirm: aString orCancel: cancelBlock at: aPointOrNil
+ "UserDialogBoxMorph confirm: 'Do you like chocolate?'"
+ | dialog resp |
+ dialog := self new.
+ dialog title: 'Confirmation'.
+ dialog label: aString.
+ dialog addButton: '       Yes       ' translated value: true.
+ dialog addButton: '        No        ' translated  value: false..
+ dialog addButton: '     Cancel     ' translated  value: nil..
+ resp := dialog runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil.
+ ^resp ifNil:[cancelBlock value]!

Item was added:
+ ----- Method: UserDialogBoxMorph>>runModalIn:forHand:at: (in category 'running') -----
+ runModalIn: aWorld forHand: aHand at: aPointOrNil
+ "Ensure that we have a reasonable minimum size"
+ | oldFocus pos |
+ (ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer].
+ self openInWorld: aWorld.
+ pos := (aPointOrNil ifNil:[aHand position]) - (self fullBounds extent // 2).
+ self setConstrainedPosition: pos hangOut: false.
+ oldFocus := aHand keyboardFocus.
+ aHand newMouseFocus: self.
+ aHand newKeyboardFocus: self.
+ [self isInWorld] whileTrue:[aWorld doOneSubCycle].
+ oldFocus ifNotNil:[aHand keyboardFocus: oldFocus].
+ ^value!

Item was added:
+ ----- Method: UserDialogBoxMorph class>>inform:title:at: (in category 'utilities') -----
+ inform: aString title: titleString at: aPointOrNil
+ "UserDialogBoxMorph inform: 'Squeak is great!!' title: 'Will you look at this:'"
+ | dialog |
+ dialog := self new.
+ dialog title: titleString.
+ dialog label: aString.
+ dialog addButton: '       OK       ' translated value: nil.
+ ^dialog runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil!

Item was changed:
  ----- Method: UserDialogBoxMorph class>>confirm:title: (in category 'utilities') -----
  confirm: aString title: titleString
  "UserDialogBoxMorph confirm: 'Make your choice carefully' withCRs title: 'Do you like chocolate?'"
+ ^self confirm: aString title: titleString at: nil!
- | dialog |
- dialog := self new.
- dialog title: titleString.
- dialog label: aString.
- dialog addButton: '       Yes       ' translated value: true.
- dialog addButton: '        No        ' translated  value: false..
- ^dialog runModalIn: ActiveWorld forHand: ActiveHand!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>aboutSqueak (in category 'menu actions') -----
  aboutSqueak
+ UserDialogBoxMorph
+ inform: SmalltalkImage current systemInformationString withCRs
+ title: 'About Squeak:'
+ at: World center.
  !

Item was changed:
  ----- Method: UserDialogBoxMorph class>>inform:title: (in category 'utilities') -----
  inform: aString title: titleString
  "UserDialogBoxMorph inform: 'Squeak is great!!' title: 'Will you look at this:'"
+ ^self inform: aString title: titleString at: nil!
- | dialog |
- dialog := self new.
- dialog title: titleString.
- dialog label: aString.
- dialog addButton: '       OK       ' translated value: nil.
- ^dialog runModalIn: ActiveWorld forHand: ActiveHand!

Item was added:
+ ----- Method: UserDialogBoxMorph class>>confirm:title:at: (in category 'utilities') -----
+ confirm: aString title: titleString at: aPointOrNil
+ "UserDialogBoxMorph confirm: 'Make your choice carefully' withCRs title: 'Do you like chocolate?'"
+ | dialog |
+ dialog := self new.
+ dialog title: titleString.
+ dialog label: aString.
+ dialog addButton: '       Yes       ' translated value: true.
+ dialog addButton: '        No        ' translated  value: false..
+ ^dialog runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil!

Item was removed:
- ----- Method: UserDialogBoxMorph>>runModalIn:forHand: (in category 'running') -----
- runModalIn: aWorld forHand: aHand
- "Ensure that we have a reasonable minimum size"
- | oldFocus |
- (ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer].
- self openInWorld: aWorld.
- self setConstrainedPosition: aHand position - (self fullBounds extent // 2) hangOut: false.
- oldFocus := aHand keyboardFocus.
- aHand newMouseFocus: self.
- aHand newKeyboardFocus: self.
- [self isInWorld] whileTrue:[aWorld doOneSubCycle].
- oldFocus ifNotNil:[aHand keyboardFocus: oldFocus].
- ^value!