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:[ |
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 |