--- a/Tools__BrowserList.st Sun Jan 29 12:56:58 2012 +0000
+++ b/Tools__BrowserList.st Sun Jan 29 15:33:37 2012 +0000
@@ -105,14 +105,17 @@
<resource: #image>
- ^Icon
- constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkedIcon'
- ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?07?C?<O?0??@@@@@@b') ; colorMapFromArray:#[0 0 0 33 161 33]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
-?????<@C0@O@D<@30GOH8<7C38OG@<HC0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+ ^ MenuPanel iconIndicationOn
+
+"/ ^Icon
+"/ constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkedIcon'
+"/ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?07?C?<O?0??@@@@@@b') ; colorMapFromArray:#[0 0 0 33 161 33]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+"/?????<@C0@O@D<@30GOH8<7C38OG@<HC0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+"/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+"/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
"Created: / 06-11-2008 / 16:32:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 04-12-2011 / 15:35:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
nameSpaceIcon
@@ -166,14 +169,17 @@
<resource: #image>
- ^Icon
- constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkFrameForm'
- ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?0??C?<O?0??@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
-?????<@C0@O@@<@C0@O@@<@C0@O@@<@C0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+ ^MenuPanel iconIndicationOff
+
+"/ ^Icon
+"/ constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkFrameForm'
+"/ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?0??C?<O?0??@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+"/?????<@C0@O@@<@C0@O@@<@C0@O@@<@C0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+"/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+"/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
"Created: / 06-11-2008 / 16:32:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 04-12-2011 / 15:35:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!BrowserList methodsFor:'accessing'!
@@ -1501,7 +1507,24 @@
keyPress:key x:x y:y view:aView
+ | v |
+
aView == listView ifTrue:[
+
+ "Forward the event to the view under pointer.
+ Therefore, the seach is started only iff the
+ pointer points to the list. Based on experience,
+ this improves usability because: does not require
+ to click in the list to focus it (which may change
+ the selection)"
+ (v := aView windowGroup pointerView) ~~ aView ifTrue:[
+ v notNil ifTrue:[
+ aView windowGroup focusView: v.
+ v sensor keyPress:key x:x y:y view:v.
+ ^self.
+ ].
+ ].
+
searchWindow isNil ifTrue:[
key isCharacter ifTrue:[
searchHolder setValue: key asString.
@@ -1596,8 +1619,11 @@
filter
- ^[:entry|
- entry asString startsWith: searchHolder value
+ | pattern |
+ pattern := StringPattern fromString: searchHolder value.
+
+ ^[:entry :relax|
+ pattern match: entry asString trimSeparators relax: relax
]
"Created: / 27-07-2011 / 22:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -1679,7 +1705,15 @@
| filter filteredList |
filter := self filter.
- filteredList := listHolder value select:[:each|filter value: each].
+
+ filteredList := listHolder value select:[:each|filter value: each value: 1].
+ filteredList isEmpty ifTrue:[
+ filteredList := listHolder value select:[:each|filter value: each value: 2].
+ filteredList isEmpty ifTrue:[
+ filteredList := listHolder value select:[:each|filter value: each value: 3].
+ ]].
+
+
listView listHolder == listHolder ifTrue:[
listView listHolder: (ValueHolder with: filteredList)
] ifFalse:[
@@ -1731,5 +1765,5 @@
!BrowserList class methodsFor:'documentation'!
version_CVS
- ^ '§Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.36 2011/08/02 08:24:50 vrany Exp §'
-! !
\ No newline at end of file
+ ^ '§Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.39 2011/12/04 14:57:04 vrany Exp §'
+! !