The Trunk: Morphic-topa.1321.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-topa.1321.mcz

commits-2
Tobias Pape uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-topa.1321.mcz

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

Name: Morphic-topa.1321
Author: topa
Time: 9 February 2017, 4:56:13.396681 pm
UUID: 7b1a9e25-af9a-4aea-ae14-dd1944092bfc
Ancestors: Morphic-bf.1320

Let doit/printit attributes preserve the remaining attribtues.

=============== Diff against Morphic-bf.1320 ===============

Item was changed:
  ----- Method: SmalltalkEditor>>handleEmphasisExtra:with: (in category 'editing keys') -----
  handleEmphasisExtra: index with: aKeyboardEvent
  "Handle an extra emphasis menu item"
  | action attribute thisSel |
  action := {
  [attribute := TextDoIt new.
+ thisSel := attribute analyze: self selection].
- thisSel := attribute analyze: self selection asString].
  [attribute := TextPrintIt new.
+ thisSel := attribute analyze: self selection].
- thisSel := attribute analyze: self selection asString].
  [attribute := TextLink new.
  thisSel := attribute analyze: self selection asString with: 'Comment'].
  [attribute := TextLink new.
  thisSel := attribute analyze: self selection asString with: 'Definition'].
  [attribute := TextLink new.
  thisSel := attribute analyze: self selection asString with: 'Hierarchy'].
  [attribute := TextLink new.
  thisSel := attribute analyze: self selection asString].
  [attribute := TextURL new.
  thisSel := attribute analyze: self selection asString].
  ["Edit hidden info"
  thisSel := self hiddenInfo. "includes selection"
  attribute := TextEmphasis normal].
  ["Copy hidden info"
  self copyHiddenInfo.
  ^true]. "no other action"
  } at: index.
  action value.
 
  thisSel ifNil: [^true]. "Could not figure out what to link to"
 
  attribute ifNotNil: [
  thisSel ifEmpty:[ | oldAttributes |
  "only change emphasisHere while typing"
  oldAttributes := paragraph text attributesAt: self pointIndex.
  emphasisHere := Text addAttribute: attribute toArray: oldAttributes.
  ] ifNotEmpty: [
  self replaceSelectionWith: (thisSel asText addAttribute: attribute).
  ]
  ].
  ^true!