Launcher.st
changeset 1799 cb65a8344a4f
parent 1793 77a1d990485e
child 1801 3c3d9231684c
equal deleted inserted replaced
1798:5029c1694394 1799:cb65a8344a4f
  3612             "/ Otherwise, you are left with unreadable menu & button items ...
  3612             "/ Otherwise, you are left with unreadable menu & button items ...
  3613 
  3613 
  3614             oldLanguage := Smalltalk language.
  3614             oldLanguage := Smalltalk language.
  3615             Smalltalk language:language asSymbol.
  3615             Smalltalk language:language asSymbol.
  3616             ResourcePack flushCachedResourcePacks.
  3616             ResourcePack flushCachedResourcePacks.
       
  3617             "/ refetch resources ...
       
  3618             resources := requestor class classResources.
  3617             fontPref := resources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'.
  3619             fontPref := resources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'.
  3618             Smalltalk language:oldLanguage.
  3620             Smalltalk language:oldLanguage.
  3619 
  3621 
  3620             switch := true.
  3622             switch := true.
  3621             enc := MenuView defaultFont encoding.
  3623             enc := MenuView defaultFont encoding.
  3622             (fontPref match:enc) ifFalse:[
  3624             (fontPref match:enc) ifFalse:[
  3623                 "/ look if there is one at all.
  3625                 "/ look if there is one at all.
  3624                 matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
  3626                 matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
  3625                 matchingFonts size == 0 ifTrue:[
  3627                 matchingFonts size == 0 ifTrue:[
       
  3628                     "/ flush and try again - just in case, the font path has changed.
       
  3629                     Screen current flushListOfAvailableFonts.
       
  3630                     matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
       
  3631                 ].
       
  3632                 matchingFonts size == 0 ifTrue:[
  3626                     (Dialog 
  3633                     (Dialog 
  3627                         confirm:(resources 
  3634                         confirm:(resources 
  3628                                     string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
  3635                                     string:'Your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
  3629                                       with:fontPref) withCRs)
  3636                                       with:fontPref) withCRs)
  3630                     ifFalse:[
  3637                     ifFalse:[
  3631                         switch := false
  3638                         switch := false
  3632                     ]
  3639                     ]
  3633                 ] ifFalse:[
  3640                 ] ifFalse:[
  3640                                            default:3.
  3647                                            default:3.
  3641                     answer isNil ifTrue:[
  3648                     answer isNil ifTrue:[
  3642                         switch := false
  3649                         switch := false
  3643                     ] ifFalse:[
  3650                     ] ifFalse:[
  3644                         answer ifTrue:[
  3651                         answer ifTrue:[
  3645                             switch := (self fontBoxForEncoding:fontPref)
  3652                             switch := (requestor fontBoxForEncoding:fontPref)
  3646                         ]
  3653                         ]
  3647                     ].
  3654                     ].
  3648                 ].
  3655                 ].
  3649             ].
  3656             ].
  3650 
  3657 
  3663         addHelpButtonFor:'Launcher/languageSetting.html'.
  3670         addHelpButtonFor:'Launcher/languageSetting.html'.
  3664     box open.
  3671     box open.
  3665     box destroy
  3672     box destroy
  3666 
  3673 
  3667     "Modified: / 9.9.1996 / 22:43:27 / stefan"
  3674     "Modified: / 9.9.1996 / 22:43:27 / stefan"
  3668     "Modified: / 4.5.1998 / 12:38:51 / cg"
  3675     "Modified: / 4.8.1998 / 16:54:32 / cg"
  3669 !
  3676 !
  3670 
  3677 
  3671 memorySettingsFor:requestor
  3678 memorySettingsFor:requestor
  3672     "open a dialog on objectMemory related settings"
  3679     "open a dialog on objectMemory related settings"
  3673 
  3680 
  5610 ! !
  5617 ! !
  5611 
  5618 
  5612 !Launcher class methodsFor:'documentation'!
  5619 !Launcher class methodsFor:'documentation'!
  5613 
  5620 
  5614 version
  5621 version
  5615     ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.364 1998-08-03 21:22:09 cg Exp $'
  5622     ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.365 1998-08-04 14:57:58 cg Exp $'
  5616 ! !
  5623 ! !