[squeak-dev] The Trunk: System-ar.145.mcz

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

[squeak-dev] The Trunk: System-ar.145.mcz

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

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

Name: System-ar.145
Author: ar
Time: 7 September 2009, 3:14:28 am
UUID: ae3e27cc-e494-c64e-a8a5-a4ca5fd82d92
Ancestors: System-jmv.144

Fix up Preferences not to call UI methods on TextStyle.

=============== Diff against System-jmv.144 ===============

Item was changed:
  ----- Method: Preferences class>>setDefaultFonts: (in category 'fonts') -----
  setDefaultFonts: defaultFontsSpec
  "Since this is called from menus, we can take the opportunity to prompt for missing font styles."
 
  | fontNames map emphases |
  fontNames := defaultFontsSpec collect: [:array | array second].
  map := IdentityDictionary new.
  emphases := IdentityDictionary new.
+ fontNames do: [:originalName | | decoded style |
- fontNames do: [:originalName | | decoded style response |
  decoded := TextStyle decodeStyleName: originalName.
  style := map at: originalName put: (TextStyle named: decoded second).
  emphases at: originalName put: decoded first.
+ style ifNil: [map at: originalName put: TextStyle default]].
- style ifNil: [
- response := TextStyle modalStyleSelectorWithTitle: 'Choose replacement for text style ', originalName.
- map at: originalName put: (response ifNil: [TextStyle default])]].
 
  defaultFontsSpec do: [:triplet | self
  perform: triplet first
  with: (((map at: triplet second) fontOfPointSize: triplet third) emphasized: (emphases at: triplet second))]!

Item was removed:
- ----- Method: Preferences class>>chooseFontWithPrompt:andSendTo:withSelector:highlight: (in category 'fonts') -----
- chooseFontWithPrompt: aPrompt andSendTo: aReceiver withSelector: aSelector highlight: currentFont
- Smalltalk isMorphic
- ifFalse:
- [TextStyle mvcPromptForFont: aPrompt andSendTo: aReceiver withSelector: aSelector]
- ifTrue:
- [TextStyle promptForFont: aPrompt andSendTo: aReceiver withSelector: aSelector highlight: currentFont]!

Item was removed:
- ----- Method: Preferences class>>chooseFontWithPrompt:andSendTo:withSelector: (in category 'fonts') -----
- chooseFontWithPrompt: aPrompt andSendTo: aReceiver withSelector: aSelector
- self chooseFontWithPrompt: aPrompt andSendTo: aReceiver withSelector: aSelector highlight: nil
- !