AbstractLauncherApplication.st
changeset 2845 e7d49909cab3
parent 2838 141a4b203b92
child 2854 ac97ea47bb08
equal deleted inserted replaced
2844:9b5742ab47d6 2845:e7d49909cab3
   119 ! !
   119 ! !
   120 
   120 
   121 !AbstractLauncherApplication class methodsFor:'queries'!
   121 !AbstractLauncherApplication class methodsFor:'queries'!
   122 
   122 
   123 isVisualStartable
   123 isVisualStartable
   124     "return true, if this application can be started via #open"
   124     "return true, if this application can be started via #open.
       
   125      (to allow start of a change browser via double-click in the browser)"
   125 
   126 
   126     "/ assume all my subclasses can
   127     "/ assume all my subclasses can
   127     ^ self ~~ AbstractLauncherApplication
   128     ^ self ~~ AbstractLauncherApplication
   128 
   129 
   129     "
   130     "
  2793     resources := requestor class classResources.
  2794     resources := requestor class classResources.
  2794 
  2795 
  2795     "
  2796     "
  2796      get list of supported languages from the launchers resources ...
  2797      get list of supported languages from the launchers resources ...
  2797     "
  2798     "
       
  2799 
  2798     listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
  2800     listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
  2799     listOfLanguages := listOfLanguages asOrderedCollection.
  2801     listOfLanguages := listOfLanguages asOrderedCollection.
  2800 
  2802 
  2801     translatedLanguages := listOfLanguages collect:[:lang | |item|
  2803     translatedLanguages := listOfLanguages collect:[:lang | |item|
  2802                                         item := resources at:lang.
  2804                                         item := resources at:lang.
  2812                                             item at:2
  2814                                             item at:2
  2813                                         ] ifFalse:[
  2815                                         ] ifFalse:[
  2814                                             nil
  2816                                             nil
  2815                                         ]
  2817                                         ]
  2816                                 ].
  2818                                 ].
  2817     flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]].
  2819     flags := flags collect:[:nm | |img d| nm notNil ifTrue:[
  2818 
  2820                                             img := Image fromFile:nm.
  2819     languageList := translatedLanguages with:flags collect:[:lang :flag |
  2821                                             img isNil ifTrue:[
  2820                                 LabelAndIcon icon:flag string:lang.
  2822                                                 d := Smalltalk getPackageDirectoryForPackage:'stx:goodies'.
  2821                         ].
  2823                                                 img := Image fromFile:(d construct:nm).
       
  2824                                             ].
       
  2825                                         ] ifFalse:[
       
  2826                                             nil
       
  2827                                         ]
       
  2828                            ].
       
  2829     listOfLanguages := listOfLanguages collect:[:nm | nm copyFrom:'LANG_' size + 1].
       
  2830     languageList := translatedLanguages with:flags collect:[:lang :flag | LabelAndIcon icon:flag string:lang.].
  2822 
  2831 
  2823     box := ListSelectionBox title:(resources at:'LANG_MSG' default:'select a language') withCRs.
  2832     box := ListSelectionBox title:(resources at:'LANG_MSG' default:'select a language') withCRs.
  2824     box label:(resources string:'Language selection').
  2833     box label:(resources string:'Language selection').
  2825     box list:languageList.
  2834     box list:languageList.
  2826     box initialText:(Language , '-' , LanguageTerritory).
  2835     box initialText:(Language , '-' , LanguageTerritory).
  5776 ! !
  5785 ! !
  5777 
  5786 
  5778 !AbstractLauncherApplication class methodsFor:'documentation'!
  5787 !AbstractLauncherApplication class methodsFor:'documentation'!
  5779 
  5788 
  5780 version
  5789 version
  5781     ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.133 2000-11-13 11:19:08 cg Exp $'
  5790     ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.134 2000-11-15 12:36:59 cg Exp $'
  5782 ! !
  5791 ! !