Merge jv
authorMerge Script
Wed, 07 Oct 2015 06:51:59 +0200
branchjv
changeset 18814 8e75e91e5e67
parent 18810 5bd0f1b3f948 (current diff)
parent 18813 b213982a4cb8 (diff)
child 18817 080a64087e21
Merge
OrderedCollection.st
UserPreferences.st
--- a/OrderedCollection.st	Mon Oct 05 09:09:03 2015 +0100
+++ b/OrderedCollection.st	Wed Oct 07 06:51:59 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -293,6 +291,19 @@
     "Modified: / 12.11.1997 / 17:56:05 / cg"
 !
 
+at:anInteger ifAbsent:exceptionValue
+    "return the element at index, anInteger.
+     If the index is invalid, return the value from exceptionValue"
+
+    |idx "{ Class: SmallInteger }"|
+
+    idx := anInteger + firstIndex - 1.
+    ((anInteger < 1) or:[idx > lastIndex]) ifTrue:[
+        ^ exceptionValue value
+    ].
+    ^ contentsArray basicAt:idx
+!
+
 at:anInteger put:anObject
     "set the element at index, to be anInteger.
      Return anObject (sigh)."
@@ -2175,10 +2186,10 @@
 !OrderedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.120 2015-05-20 10:16:35 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.120 2015-05-20 10:16:35 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/UserPreferences.st	Mon Oct 05 09:09:03 2015 +0100
+++ b/UserPreferences.st	Wed Oct 07 06:51:59 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1998 by eXept Software AG
 	      All Rights Reserved
@@ -1876,6 +1874,87 @@
     "Modified: / 11.9.1998 / 00:09:59 / cg"
 !
 
+fontPreferences
+    "experimental"
+
+    ^ self at:#fontPreferences
+
+    "
+     UserPreferences current fontPreferences
+     UserPreferences current fontPreferences:nil
+    "
+!
+
+fontPreferences:aDictionary
+    "experimental"
+
+    |fn getFont|
+    
+    self at:#fontPreferences put:aDictionary.
+
+    aDictionary isNil ifTrue:[^ self].
+
+    getFont := 
+        [:key|
+            |s fn|
+            
+            s := aDictionary at:key ifAbsent:nil.
+            s notNil ifTrue:[
+                fn := Object readFrom:s.
+                self useXftFontsOnly ifTrue:[
+                    fn := XftFontDescription for:fn
+                ]    
+            ].
+            fn
+        ].
+    
+    fn := getFont value:#Other.
+    fn notNil ifTrue:[    
+        SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn].
+    ].
+    
+    fn := getFont value:#Label.
+    fn notNil ifTrue:[    
+        Label defaultFont:fn.
+        CheckBox defaultFont:fn.
+    ].
+    
+    fn := getFont value:#Button.
+    fn notNil ifTrue:[    
+        Button defaultFont:fn.
+        Toggle defaultFont:fn.
+    ].
+    
+    fn := getFont value:#Text.
+    fn notNil ifTrue:[    
+        TextView withAllSubclasses do:[:cls | cls defaultFont:fn].
+    ].
+    
+    fn := getFont value:#InputField.
+    fn notNil ifTrue:[    
+        EditField withAllSubclasses do:[:cls | cls defaultFont:fn].
+    ].
+    
+    fn := getFont value:#List.
+    fn notNil ifTrue:[    
+        SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn].
+    ].
+    
+    fn := getFont value:#Tooltip.
+    fn notNil ifTrue:[    
+        ActiveHelpView withAllSubclasses do:[:cls | cls defaultFont:fn].
+    ].
+    
+    fn := getFont value:#Menu.
+    fn notNil ifTrue:[    
+        ListView defaultFont:fn.
+        MenuView defaultFont:fn.
+        MenuPanel defaultFont:fn.
+        NoteBookView defaultFont:fn.
+        PullDownMenu defaultFont:fn.
+    ].
+!
+
 forceWindowsIntoMonitorBounds
     "if true, windows are forced to be placed into a monitor's bounds completely;
      if false, they may be placed as to cross a boundary. This only affects initial placement,