AbstractFileBrowser.st
changeset 19476 0a3d41765245
parent 19431 67fede974175
child 19480 7992ea4a3c52
equal deleted inserted replaced
19475:75c5a1bfdf90 19476:0a3d41765245
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2002 by eXept Software AG
     4  COPYRIGHT (c) 2002 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
  3004                                 (decodedChar between:0 and:31) ifTrue:[
  3006                                 (decodedChar between:0 and:31) ifTrue:[
  3005                                     "/ the 'nul', 'soh' .. 'gs' chars in unicodePage 2400
  3007                                     "/ the 'nul', 'soh' .. 'gs' chars in unicodePage 2400
  3006                                     "/ are perfect here, but usually not available in the font
  3008                                     "/ are perfect here, but usually not available in the font
  3007                                     "/ and we have currently no way of knowing if they are...
  3009                                     "/ and we have currently no way of knowing if they are...
  3008                                     "/ (could let the font draw into a bitmap and check if there is something...)
  3010                                     "/ (could let the font draw into a bitmap and check if there is something...)
  3009                                     "/ For now, write a dot.·
  3011                                     "/ For now, write a dot.·
  3010                                     "/ charPrinted := (Character value:(byte + 16r2400))
  3012                                     "/ charPrinted := (Character value:(byte + 16r2400))
  3011                                 ].
  3013                                 ].
  3012                             ].
  3014                             ].
  3013                         ].
  3015                         ].
  3014                         asciiString := String with:charPrinted.
  3016                         asciiString := String with:charPrinted.
  5882     "/ add the bookmark items ...
  5884     "/ add the bookmark items ...
  5883     bookmarks := self class directoryBookmarks.
  5885     bookmarks := self class directoryBookmarks.
  5884     bookmarks notEmptyOrNil ifTrue:[
  5886     bookmarks notEmptyOrNil ifTrue:[
  5885         menu addSeparator.
  5887         menu addSeparator.
  5886         bookmarks do:[:dirName |
  5888         bookmarks do:[:dirName |
  5887             menu addItem:(MenuItem 
  5889             menu 
  5888                             label:dirName asString 
  5890                 addItemLabel:dirName asString 
  5889                             itemValue:[
  5891                 value:[
  5890                                 (self currentSelectedDirectories includes:dirName) ifFalse:[
  5892                     (self currentSelectedDirectories includes:dirName) ifFalse:[
  5891                                     self setCurrentFileName:dirName.
  5893                         self setCurrentFileName:dirName.
  5892                                 ].
  5894                     ].
  5893                             ]).
  5895                 ].
  5894         ].
  5896         ].
  5895     ].
  5897     ].
  5896     menu findGuiResourcesIn:self.
  5898     menu findGuiResourcesIn:self.
  5897     ^ menu
  5899     ^ menu
  5898 
  5900 
  6071     histCopy isEmpty ifTrue:[^ nil].
  6073     histCopy isEmpty ifTrue:[^ nil].
  6072 
  6074 
  6073     menu := Menu new.
  6075     menu := Menu new.
  6074 
  6076 
  6075     histCopy do:[:aFile| 
  6077     histCopy do:[:aFile| 
  6076         menu addItem:(MenuItem 
  6078         menu 
  6077                         label:aFile asString 
  6079             addItemLabel:aFile asString 
  6078                         itemValue:[
  6080             value:[ self setCurrentFileName:(aFile path asFilename) ].
  6079                             self setCurrentFileName:(aFile path asFilename).
       
  6080                         ]).
       
  6081     ].
  6081     ].
  6082     menu addSeparator.
  6082     menu addSeparator.
  6083 
  6083 
  6084     "/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear History').
  6084     "/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear History').
  6085     text := (resources string:'Clear History').
  6085     text := (resources string:'Clear History').
  9164                 redefKind := 'class'.
  9164                 redefKind := 'class'.
  9165                 isRedef := true.
  9165                 isRedef := true.
  9166             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
  9166             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
  9167                 label := msg := 'Breakpoint/Halt in fileIn'.
  9167                 label := msg := 'Breakpoint/Halt in fileIn'.
  9168                 sender := ex suspendedContext.
  9168                 sender := ex suspendedContext.
  9169                 msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
  9169                 msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
  9170             ] ifFalse:[
  9170             ] ifFalse:[
  9171                 label := 'Error in fileIn'.
  9171                 label := 'Error in fileIn'.
  9172                 msg := 'error in fileIn: %1'
  9172                 msg := 'error in fileIn: %1'
  9173             ]]].
  9173             ]]].
  9174 
  9174