The Trunk: System-ar.351.mcz

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

The Trunk: System-ar.351.mcz

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

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

Name: System-ar.351
Author: ar
Time: 21 July 2010, 8:15:56.801 pm
UUID: de412a44-f0a1-1c44-a848-768181babc98
Ancestors: System-eem.350

Add Preferences>>restoreFontsAfter: to restore the fonts after tests that modify the user-selected set of fonts.

=============== Diff against System-eem.350 ===============

Item was added:
+ ----- Method: Preferences class>>restoreFontsAfter: (in category 'fonts') -----
+ restoreFontsAfter: aBlock
+
+ "Restore the currently chosen set of standard fonts after
+ evaluating aBlock. Used for tests that modify the default fonts."
+
+ | standardDefaultTextFont standardListFont standardEToysFont standardMenuFont
+ windowTitleFont standardBalloonHelpFont standardCodeFont standardButtonFont |
+
+ standardDefaultTextFont := Preferences standardDefaultTextFont.
+ standardListFont := Preferences standardListFont.
+ standardEToysFont := Preferences standardEToysFont.
+ standardMenuFont := Preferences standardMenuFont.
+ windowTitleFont := Preferences windowTitleFont.
+ standardBalloonHelpFont := Preferences standardBalloonHelpFont.
+ standardCodeFont := Preferences standardCodeFont.
+ standardButtonFont := Preferences standardButtonFont.
+ ^aBlock ensure: [
+ Preferences setSystemFontTo: standardDefaultTextFont.
+ Preferences setListFontTo: standardListFont.
+ Preferences setEToysFontTo: standardEToysFont.
+ Preferences setMenuFontTo: standardMenuFont.
+ Preferences setWindowTitleFontTo: windowTitleFont.
+ Preferences setBalloonHelpFontTo: standardBalloonHelpFont.
+ Preferences setCodeFontTo: standardCodeFont.
+ Preferences setButtonFontTo: standardButtonFont.
+ ].
+ !