drag&drop:allow dropping st-files from the windows explorer
authorClaus Gittinger <cg@exept.de>
Wed, 18 Oct 2006 13:10:37 +0200
changeset 7422 b4d123daf81a
parent 7421 dc9068ea610b
child 7423 e92bcc3c8e0e
drag&drop:allow dropping st-files from the windows explorer
Tools_BrowserList.st
--- a/Tools_BrowserList.st	Wed Oct 18 13:08:08 2006 +0200
+++ b/Tools_BrowserList.st	Wed Oct 18 13:10:37 2006 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libtool' }"
 
 "{ NameSpace: Tools }"
@@ -662,6 +661,32 @@
     "Modified: / 13.11.2001 / 11:30:19 / cg"
 ! !
 
+!BrowserList methodsFor:'drag & drop'!
+
+dropClassFiles:files
+    files do:[:fn |
+        (Dialog confirm:(resources string:'FileIn %1 ?' with:fn baseName allBold)) ifTrue:[
+            Smalltalk fileIn:fn logged:true.
+        ]
+    ].
+
+    "Created: / 17-10-2006 / 18:24:36 / cg"
+!
+
+objectsAreClassFiles:objects
+    (objects conform:[:anObject | anObject isFilename]) ifTrue:[
+        |files|
+
+        files := objects.
+        ^ files conform:[:aFilename | aFilename exists
+                                      and:[ aFilename suffix = 'st'
+                                      and:[ aFilename isRegularFile ]]]
+    ].
+    ^ false
+
+    "Created: / 17-10-2006 / 18:25:40 / cg"
+! !
+
 !BrowserList methodsFor:'generators'!
 
 inGeneratorHolder
@@ -1259,5 +1284,5 @@
 !BrowserList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.16 2006-08-21 10:22:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.17 2006-10-18 11:10:37 cg Exp $'
 ! !