The Trunk: Tools-mt.664.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-mt.664.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.664.mcz

==================== Summary ====================

Name: Tools-mt.664
Author: mt
Time: 21 January 2016, 3:20:55.039876 pm
UUID: 7640e095-75e6-4add-add8-6bf4748f802e
Ancestors: Tools-ul.663

Fixes drop behavior in File List. Ignore things that are not files or folders. However, move/copy folders might still work on Unix-based systems only.

=============== Diff against Tools-ul.663 ===============

Item was changed:
  ----- Method: FileList>>buildDirectoryTreeWith: (in category 'toolbuilder') -----
  buildDirectoryTreeWith: builder
  | treeSpec |
  treeSpec := builder pluggableTreeSpec new.
  treeSpec
  model: self ;
  roots: #rootDirectoryList ;
  hasChildren: #hasMoreDirectories: ;
  getChildren: #subDirectoriesOf: ;
  getSelectedPath: #selectedPath ;
  setSelected: #setDirectoryTo: ;
  getSelected: #directory;
  label: #directoryNameOf: ;
  menu: #volumeMenu: ;
  autoDeselect: false.
  SystemBrowser browseWithDragNDrop ifTrue:
  [ treeSpec
+ dragItem: #dragFromDirectoryList: ;
+ dropItem: #drop:ontoDirectory:shouldCopy: ;
+ dropAccept: #wantsDraggedObject: ].
- dragItem: #dragFromDirectoryList: ;
- dropItem: #drop:ontoDirectory:shouldCopy: ].
  ^ treeSpec!

Item was added:
+ ----- Method: FileList>>wantsDraggedObject: (in category 'drag''n''drop') -----
+ wantsDraggedObject: anObject
+
+ ^ (anObject isKindOf: DirectoryEntry) or: [anObject isKindOf: FileDirectory]!