SmallSense__PackageSearchDialog.st
changeset 344 88d012c17762
parent 343 b3d22e8c0a05
child 346 88c1d211f9be
--- a/SmallSense__PackageSearchDialog.st	Thu Jun 19 11:33:05 2014 +0100
+++ b/SmallSense__PackageSearchDialog.st	Thu Jun 19 13:15:27 2014 +0100
@@ -9,6 +9,20 @@
 	category:'SmallSense-Core-Interface-Search'
 !
 
+!PackageSearchDialog methodsFor:'change & update'!
+
+updateAcceptedValue
+    "Dialog has been accepted (OK pressed). Update accepted value"
+
+    matchingObjectsMultiselect ifTrue:[
+        acceptedValue := matchingObjectsSelectionHolder value collect:[:e|e name].
+    ] ifFalse:[ 
+        acceptedValue := matchingObjectsSelectionHolder value name.
+    ].
+
+    "Created: / 19-06-2014 / 12:00:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PackageSearchDialog methodsFor:'queries'!
 
 canSelect:selection
@@ -22,9 +36,10 @@
 matchingObjectPOsFor:objects
 
     objects sort: [ :a :b | a < b ].
-    ^ objects collect:[ :e | PackagePO new name: e ].
+    ^ objects collect:[ :e | PO forPackage: e ].
 
     "Created: / 05-05-2014 / 23:54:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 19-06-2014 / 12:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 matchingObjectsForPattern:pattern inEnvironment:environment
@@ -35,7 +50,7 @@
         | pkg |
 
         pkg := cls package.
-        ((pkg notNil and:[ pkg ~~ PackageId noProjectID ])
+        ((pkg notNil and:[ pkg ~~ PackageId noProjectID and:[ pkg ~= '__temporary__'] ])
             and:[(filter isNil or:[ filter value: pkg ])
             and:[pattern isNil or:[pattern match: pkg]]]) ifTrue:[ packages add: pkg ].
     ].
@@ -50,5 +65,6 @@
     ^ packages asArray.
 
     "Created: / 05-05-2014 / 23:53:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 19-06-2014 / 12:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !