AbstractFileBrowser.st
changeset 4973 e4b72eec43d3
parent 4963 7ce6eae41e33
child 4974 6cebe0a963e5
equal deleted inserted replaced
4972:900a778786bc 4973:e4b72eec43d3
  2342 !
  2342 !
  2343 
  2343 
  2344 copyFileList
  2344 copyFileList
  2345     "copy the fileList to the clipBoard"
  2345     "copy the fileList to the clipBoard"
  2346 
  2346 
  2347     |itemList|
  2347     |fileList|
  2348 
  2348 
  2349     itemList := self 
  2349     fileList := self 
  2350                     applicationNamed:#DirectoryContentsBrowser 
  2350                     applicationNamed:#DirectoryContentsBrowser 
  2351                     do:[:app | app browserItemList].
  2351                     do:[:app | app browserFileList].
  2352     self copyItemListToClipBoard:itemList.
  2352     self copyFileListToClipBoard:fileList.
  2353 !
  2353 !
  2354 
  2354 
  2355 copyItemListToClipBoard:itemList
  2355 copyFileListToClipBoard:fileList
  2356     "copy the itemList to the clipBoard"
  2356     "copy the itemList to the clipBoard"
  2357 
  2357 
  2358     |stream|
  2358     |stream|
  2359 
  2359 
  2360     itemList isEmpty ifTrue:[^ self].
  2360     fileList isEmpty ifTrue:[^ self].
  2361 
  2361 
  2362     stream := WriteStream on:''.
  2362     stream := WriteStream on:''.
  2363     itemList do:[:item |
  2363     fileList do:[:item |
  2364         stream nextPutLine:(item fileName asString).
  2364         stream nextPutLine:(item fileName asString).
  2365     ].
  2365     ].
  2366     self window setTextSelection:stream contents.
  2366     self window setTextSelection:stream contents.
  2367     stream close.
  2367     stream close.
  2368 !
  2368 !
  2369 
  2369 
  2370 copySelectedFilenames
  2370 copySelectedFilenames
  2371     "copy the selected fileNames to the clipBoard"
  2371     "copy the selected fileNames to the clipBoard"
  2372 
  2372 
  2373     |itemList|
  2373     |fileList|
  2374 
  2374 
  2375     itemList := self 
  2375     fileList := self 
  2376                     applicationNamed:#DirectoryContentsBrowser 
  2376                     applicationNamed:#DirectoryContentsBrowser 
  2377                     do:[:appl | appl selectedItems].
  2377                     do:[:appl | appl selectedFileNames].
  2378 
  2378 
  2379     self copyItemListToClipBoard:itemList.
  2379     self copyFileListToClipBoard:fileList.
  2380 !
  2380 !
  2381 
  2381 
  2382 doAddTerminal
  2382 doAddTerminal
  2383     |dir directories|
  2383     |dir directories|
  2384 
  2384 
  6356 ! !
  6356 ! !
  6357 
  6357 
  6358 !AbstractFileBrowser class methodsFor:'documentation'!
  6358 !AbstractFileBrowser class methodsFor:'documentation'!
  6359 
  6359 
  6360 version
  6360 version
  6361     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.154 2003-06-12 11:19:54 cg Exp $'
  6361     ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.155 2003-06-12 15:40:03 penk Exp $'
  6362 ! !
  6362 ! !