Here it is. Please, can someone see it? I did two things: 1) I removed the popup because I has no sense in my opinion. I just set the default font is there is no one. Is there a risk in what I did? This is the first time I play with Fonts so perhaps I am doing something wrong.
2) The test was green, even when there was the popup. It was a matter of the font size. However, I don't like my solution. I would love to know where those defaults fonts came from but I don't know. Does someone know how can I do this? see the changes to understand what I am saying ;) Finally, I will then change it again because I don't like how this test is done. I think it should implement the setUp and tearDown methods and move code there. But I will do this later on. I continue with my Seaside tutorial at ESGU ;) best Mariano 2009/9/1 Stéphane Ducasse <[email protected]> > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >
'From Pharo1.0beta of 16 May 2008 [Latest update: #10424] on 1 September 2009 at 11:32:46 am'! !Preferences class methodsFor: 'fonts' stamp: 'M 8/30/2009 13:21'! 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 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) ]]. defaultFontsSpec do: [:triplet | self perform: triplet first with: (((map at: triplet second) fontOfPointSize: triplet third) emphasized: (emphases at: triplet second))]! ! !StandardSystemFontsTest methodsFor: 'testing' stamp: 'M 8/30/2009 13:21'! testRestoreDefaultFonts self saveStandardSystemFontsDuring: [ Preferences restoreDefaultFonts. self assert: #standardDefaultTextFont familyName: 'Accuny' pointSize: 9. self assert: #standardListFont familyName: 'Accuny' pointSize: 9. self assert: #standardMenuFont familyName: 'Accuny' pointSize: 9. self assert: #windowTitleFont familyName: 'Accuny' pointSize: 12. self assert: #standardBalloonHelpFont familyName: 'Accuny' pointSize: 10. self assert: #standardCodeFont familyName: 'Accuny' pointSize: 9. self assert: #standardButtonFont familyName: 'Accuny' pointSize: 9]! !
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
