Merge jv
authorMerge Script
Fri, 15 Apr 2016 06:50:58 +0200
branchjv
changeset 5665 a28ccea0dc36
parent 5660 d6040b3f1a37 (current diff)
parent 5664 a8ecef1ff7e2 (diff)
child 5667 abf48da94d00
Merge
ListView.st
SelectionInListView.st
--- a/ListView.st	Wed Apr 13 09:24:13 2016 +0100
+++ b/ListView.st	Fri Apr 15 06:50:58 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -2502,7 +2500,7 @@
     lineSpacing := 2.
     "/ q&d temporary hack.
     "/ X11 fonts are currently so ugly... add more spacing.
-    device platformName = #X11 ifTrue:[
+    device platformName == #X11 ifTrue:[
         lineSpacing := lineSpacing + 3.
     ].
     fgColor := DefaultForegroundColor.
--- a/ObjectView.st	Wed Apr 13 09:24:13 2016 +0100
+++ b/ObjectView.st	Fri Apr 15 06:50:58 2016 +0200
@@ -675,7 +675,7 @@
     |sel|
 
     sel := self getClipboardObject.
-    ((Screen current platformName ~= 'X11')
+    ((Screen current platformName == #X11)
      or:[(device getSelectionOwnerOf:#CLIPBOARD) == self drawableId])
     ifTrue:[
         "
--- a/SelectionInListView.st	Wed Apr 13 09:24:13 2016 +0100
+++ b/SelectionInListView.st	Fri Apr 15 06:50:58 2016 +0200
@@ -2486,40 +2486,42 @@
     |oldSelection|
 
     enabled ifFalse:[
-        ^ self
+        ^ false
     ].
 
-    keyActionStyle notNil ifTrue:[
-        "/ this item selectable ?
-        (selectConditionBlock notNil 
-         and:[(selectConditionBlock value:index) not]) ifTrue:[^ self].
-
-        keyActionStyle == #pass ifTrue:[
-            ^ super keyPress:key x:x y:y
+    keyActionStyle isNil ifTrue:[^ false].
+    
+    "/ this item selectable ?
+    (selectConditionBlock notNil 
+     and:[(selectConditionBlock value:index) not]) ifTrue:[^ false].
+
+    keyActionStyle == #pass ifTrue:[
+        super keyPress:key x:x y:y.
+        ^ false.
+    ].
+
+    (self multipleSelectOk and:[shifted]) ifTrue:[
+        oldSelection := selection copy.
+        (self isInSelection:index) ifTrue:[
+            self removeFromSelection:index
+        ] ifFalse:[
+            self addToSelection:index.
+            self makeLineVisible:index.
         ].
-
-        (self multipleSelectOk and:[shifted]) ifTrue:[
-            oldSelection := selection copy.
-            (self isInSelection:index) ifTrue:[
-                self removeFromSelection:index
-            ] ifFalse:[
-                self addToSelection:index.
-                self makeLineVisible:index.
-            ].
-            (selection ~= oldSelection) ifTrue:[
-                self selectionChangedFrom:oldSelection.
-            ].
+        (selection ~= oldSelection) ifTrue:[
+            self selectionChangedFrom:oldSelection.
+        ].
+    ] ifFalse:[
+        self multipleSelectOk ifTrue:[
+            self selection:(OrderedCollection with:index)
         ] ifFalse:[
-            self multipleSelectOk ifTrue:[
-                self selection:(OrderedCollection with:index)
-            ] ifFalse:[
-                self selection:index.
-            ].    
-            keyActionStyle == #selectAndDoubleClick ifTrue:[
-                self doubleClicked
-            ]
+            self selection:index.
+        ].    
+        keyActionStyle == #selectAndDoubleClick ifTrue:[
+            self doubleClicked
         ]
     ].
+    ^ true
 
     "Modified: / 4.2.2000 / 14:51:25 / cg"
 !
@@ -2678,7 +2680,9 @@
                 s notNil ifTrue:[
                     (s string withoutSeparators asLowercase startsWith:searchPrefix) ifTrue:[
                         searchIndex = selection ifTrue:[^ self].
-                        ^ self key:key select:searchIndex x:x y:y shifted:false
+                        (selectConditionBlock isNil or:[(selectConditionBlock value:searchIndex)]) ifTrue:[
+                            ^ self key:key select:searchIndex x:x y:y shifted:false
+                        ].
                     ].
                 ].
                 backSearch ifTrue:[
@@ -2917,7 +2921,7 @@
     #hack.
     "/ q&d temporary hack.
     "/ X11 fonts are currently so ugly... add more spacing.
-    device platformName = #X11 ifTrue:[
+    device platformName == #X11 ifTrue:[
         lineSpacing := lineSpacing + 3.
     ].
     hilightFgColor isNil ifTrue:[