Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 02 Apr 2016 11:06:59 +0100
branchjv
changeset 5647 a072d911671f
parent 5616 60d4ad0cccfb (current diff)
parent 5620 8d7c0790a41f (diff)
child 5648 83d019d51deb
Merge
GenericToolbarIconLibrary.st
ListView.st
--- a/DialogBox.st	Sat Mar 26 06:44:39 2016 +0100
+++ b/DialogBox.st	Sat Apr 02 11:06:59 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -2462,7 +2464,67 @@
      The matchPattern is set to pattern initially.
      Return the string, or nil if cancel was pressed."
 
-    |box defaultDir defaultNm dir enteredName|
+    ^ self
+        requestFileName:titleString 
+        default:defaultName 
+        ok:okText abort:abortText 
+        pattern:pattern 
+        orFilters:nil 
+            "argument #filtersOrNil is window specific,
+             it is an array of arrays with filter (*.zip) and its description (ZIP compressed archive file)
+             to support a call with just #filtersOrNil and no #patternOrNil the pattern will be extracted from the #filtersOrNil for linux"
+
+        fromDirectory:aDirectoryPathOrNil 
+        forSave:forSave 
+        whenBoxCreatedEvaluate:boxCreatedCallback
+!
+
+requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback
+    "launch a Dialog, which allows user to enter a filename.
+     The files presented initially are those in aDirectoryPathOrNil, or the
+     last fileBox directory (default: current directory) (if a nil path is given).
+     The box will show okText in its okButton, abortText in the abortButton.
+     The matchPattern is set to pattern initially.
+     Return the string, or nil if cancel was pressed."
+
+    ^ self
+        requestFileName:titleString 
+        default:defaultName 
+        ok:okText 
+        abort:abortText 
+        pattern:pattern 
+        fromDirectory:aDirectoryPathOrNil 
+        forSave:false 
+        whenBoxCreatedEvaluate:boxCreatedCallback
+
+    "
+     Dialog 
+        requestFileName:'enter a fileName:'
+        default:''
+        ok:'yeah' 
+        abort:'oh, no' 
+        pattern:'rc*'
+        fromDirectory:'/etc'  
+    "
+
+    "Modified: / 24-08-2010 / 17:28:57 / sr"
+    "Modified: / 27-10-2010 / 11:21:44 / cg"
+!
+
+requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:patternOrNil orFilters:filtersOrNil fromDirectory:aDirectoryPathOrNil forSave:forSave whenBoxCreatedEvaluate:boxCreatedCallback
+    "launch a Dialog, which allows user to enter a filename.
+     The files presented initially are those in aDirectoryPathOrNil, or the
+     last fileBox directory (default: current directory) (if a nil path is given).
+     The box will show okText in its okButton, abortText in the abortButton.
+     The matchPattern is set to pattern initially.
+     Return the string, or nil if cancel was pressed."
+
+    "argument #filtersOrNil is window specific,
+     it is an array of arrays with filter (*.zip) and its description (ZIP compressed archive file)
+     to support a call with just #filtersOrNil and no #patternOrNil the pattern will be extracted from the #filtersOrNil for linux"
+
+    |box defaultDir defaultNm dir enteredName
+     pattern|
 
     Screen current nativeFileDialogs ifTrue:[
         OperatingSystem isMSWINDOWSlike ifTrue:[
@@ -2473,11 +2535,20 @@
                     title:titleString 
                     inDirectory:aDirectoryPathOrNil
                     initialAnswer:defaultName
-                    filter:pattern
+                    pattern:patternOrNil
+                    orFilters:filtersOrNil
                     extension:nil
             ].
         ].
     ].
+
+    patternOrNil isNil ifTrue:[
+        "extract the pattern from #filtersOrNil"
+        pattern := self patternForFilters:filtersOrNil.
+    ] ifFalse:[
+        pattern := patternOrNil.
+    ].
+
     UserPreferences current useNewFileDialog ifTrue:[
         FileDialog notNil ifTrue:[
             ^ FileDialog 
@@ -2545,38 +2616,6 @@
     "Created: / 27-10-2010 / 11:21:05 / cg"
 !
 
-requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback
-    "launch a Dialog, which allows user to enter a filename.
-     The files presented initially are those in aDirectoryPathOrNil, or the
-     last fileBox directory (default: current directory) (if a nil path is given).
-     The box will show okText in its okButton, abortText in the abortButton.
-     The matchPattern is set to pattern initially.
-     Return the string, or nil if cancel was pressed."
-
-    ^ self
-        requestFileName:titleString 
-        default:defaultName 
-        ok:okText 
-        abort:abortText 
-        pattern:pattern 
-        fromDirectory:aDirectoryPathOrNil 
-        forSave:false 
-        whenBoxCreatedEvaluate:boxCreatedCallback
-
-    "
-     Dialog 
-        requestFileName:'enter a fileName:'
-        default:''
-        ok:'yeah' 
-        abort:'oh, no' 
-        pattern:'rc*'
-        fromDirectory:'/etc'  
-    "
-
-    "Modified: / 24-08-2010 / 17:28:57 / sr"
-    "Modified: / 27-10-2010 / 11:21:44 / cg"
-!
-
 requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean
     "launch a Dialog, which allows user to enter a filename.
      The files presented initially are those in aDirectoryPathOrNil, or the
@@ -2856,7 +2895,7 @@
                     title:titleString 
                     inDirectory:aDirectoryPath
                     initialAnswer:defaultName
-                    filter:pattern
+                    pattern:pattern
                     extension:nil
             ]
         ].
@@ -3428,7 +3467,7 @@
                         title:title 
                         inDirectory:directoryOrNil
                         initialAnswer:default
-                        filter:nil
+                        pattern:nil
                         extension:nil
                 ]
             ].
@@ -6260,6 +6299,22 @@
     "
 
     "Modified: / 16.6.1998 / 12:36:15 / cg"
+!
+
+patternForFilters:filtersOrNil
+    "argument #filtersOrNil is window specific,
+     it is an array of arrays with filter (*.zip) and its description (ZIP compressed archive file)
+     to support a call with just #filtersOrNil and no #patternOrNil the pattern will be extracted from the #filtersOrNil for linux
+
+     which is done here"
+
+    filtersOrNil isEmptyOrNil ifTrue:[
+        ^ nil
+    ].
+
+    ^ (filtersOrNil 
+        collect:[:each | each last])
+            asStringWith:'; '      
 ! !
 
 !DialogBox class methodsFor:'smalltalk dialogs'!
--- a/GenericToolbarIconLibrary.st	Sat Mar 26 06:44:39 2016 +0100
+++ b/GenericToolbarIconLibrary.st	Sat Apr 02 11:06:59 2016 +0100
@@ -702,39 +702,6 @@
         ]
 !
 
-standaloneStartupIcon
-    <resource: #image>
-    "This resource specification was automatically generated
-     by the ImageEditor of ST/X."
-    "Do not manually edit this!! If it is corrupted,
-     the ImageEditor may not be able to read the specification."
-    "
-     self standaloneStartupIcon inspect
-     ImageEditor openOnClass:self andSelector:#standaloneStartupIcon
-     Icon flushCachedIcons"
-    
-    ^ Icon constantNamed:'GenericToolbarIconLibrary standaloneStartupIcon'
-        ifAbsentPut:[
-            (Depth8Image new)
-                width:13;
-                height:11;
-                photometric:(#palette);
-                bitsPerSample:(#[ 8 ]);
-                samplesPerPixel:(1);
-                bits:(ByteArray 
-                            fromPackedString:'
-@@@A@ @@@@@@@@@@@@@@@0PEA @@@@@@@@@@@@LGB@$J@@@@@@@@@@@AB00MC <P@@@@@@@@@1DRD1PUE!!\X@@@@@@LYF!!([D10]G @@@@@CG2@!!DRHDE0@@
-@@@@@2LTIBT&G @@@@@@@@L''J@P)J @@@@@@@@@CJ20X@@@@@@@@@@@@@0H@@@@@@@@@@@@b');
-                colorMapFromArray:#[ 0 0 0 32 104 24 208 216 208 47 120 24 47 112 24 128 168 128 224 232 224 191 224 176 95 160 80 47 104 24 159 184 144 159 216 136 160 216 136 144 208 136 64 136 56 79 136 64 191 200 176 127 200 96 111 200 88 112 200 88 143 208 120 127 192 104 63 120 48 96 144 88 207 200 200 96 192 64 95 192 64 95 192 56 111 184 88 48 104 48 176 192 176 112 216 88 127 224 96 128 216 104 96 176 88 143 224 104 128 200 120 64 136 48 64 120 56 128 208 120 95 168 80 143 160 136 239 224 224 47 136 40 127 168 120 ];
-                mask:((ImageMask new)
-                            width:13;
-                            height:11;
-                            bits:(ByteArray fromPackedString:'L@@<@C8@O8@?8C? O<@? C<@O@@0@@@a');
-                            yourself);
-                yourself
-        ]
-!
-
 worldIcon25_25
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
@@ -16253,6 +16220,61 @@
         ]
 !
 
+standaloneStartupHeadlessIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self standaloneStartupHeadlessIcon inspect
+     ImageEditor openOnClass:self andSelector:#standaloneStartupHeadlessIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'GenericToolbarIconLibrary standaloneStartupHeadlessIcon'
+        ifAbsentPut:[(Depth8Image width:13 height:11) bits:(ByteArray fromPackedString:'
+@@@A@ @@@@@@@@@@@@@@@0PEA @@@@@@@@@@@@LGB@$J@@@@@@@@@@@AB00MC <P@@@@@@@@@1DRD1PUE!!\X@@@@@@LYF!!([D10]G @@@@@CG2@!!DRHDE0@@
+@@@@@2LTIBT&G @@@@@@@@L''J@P\JP@@@@@@@@@CJ",X@@@@@@@@@@@@@0H@@@@@@@@@@@@b') colorMapFromArray:#[0 0 0 74 74 74 212 212 212 88 88 88 83 83 83 152 152 152 228 228 228 209 209 209 132 132 132 78 78 78 172 172 172 190 190 190 191 191 191 181 181 181 106 106 106 111 111 111 194 194 194 167 167 167 162 162 162 162 162 162 179 179 179 163 163 163 95 95 95 124 124 124 202 202 202 150 150 150 150 150 150 149 149 149 152 152 152 81 81 81 185 185 185 172 172 172 182 182 182 178 178 178 143 143 143 187 187 187 170 170 170 105 105 105 96 96 96 175 175 175 137 137 137 228 228 228 99 99 99 150 150 150] mask:((ImageMask width:13 height:11) bits:(ByteArray fromPackedString:'L@@<@C8@O8@?8C? O<@? C<@O@@0@@@a'); yourself); yourself]
+!
+
+standaloneStartupIcon
+    <resource: #image>
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+    "
+     self standaloneStartupIcon inspect
+     ImageEditor openOnClass:self andSelector:#standaloneStartupIcon
+     Icon flushCachedIcons"
+    
+    ^ Icon constantNamed:'GenericToolbarIconLibrary standaloneStartupIcon'
+        ifAbsentPut:[
+            (Depth8Image new)
+                width:13;
+                height:11;
+                photometric:(#palette);
+                bitsPerSample:(#[ 8 ]);
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'
+@@@A@ @@@@@@@@@@@@@@@0PEA @@@@@@@@@@@@LGB@$J@@@@@@@@@@@AB00MC <P@@@@@@@@@1DRD1PUE!!\X@@@@@@LYF!!([D10]G @@@@@CG2@!!DRHDE0@@
+@@@@@2LTIBT&G @@@@@@@@L''J@P)J @@@@@@@@@CJ20X@@@@@@@@@@@@@0H@@@@@@@@@@@@b');
+                colorMapFromArray:#[ 0 0 0 32 104 24 208 216 208 47 120 24 47 112 24 128 168 128 224 232 224 191 224 176 95 160 80 47 104 24 159 184 144 159 216 136 160 216 136 144 208 136 64 136 56 79 136 64 191 200 176 127 200 96 111 200 88 112 200 88 143 208 120 127 192 104 63 120 48 96 144 88 207 200 200 96 192 64 95 192 64 95 192 56 111 184 88 48 104 48 176 192 176 112 216 88 127 224 96 128 216 104 96 176 88 143 224 104 128 200 120 64 136 48 64 120 56 128 208 120 95 168 80 143 160 136 239 224 224 47 136 40 127 168 120 ];
+                mask:((ImageMask new)
+                            width:13;
+                            height:11;
+                            bits:(ByteArray fromPackedString:'L@@<@C8@O8@?8C? O<@? C<@O@@0@@@a');
+                            yourself);
+                yourself
+        ]
+!
+
 startableClassBrowserIcon
     <resource: #image>
     "This resource specification was automatically generated
--- a/ListView.st	Sat Mar 26 06:44:39 2016 +0100
+++ b/ListView.st	Sat Apr 02 11:06:59 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -482,12 +484,13 @@
     DefaultForegroundColor := StyleSheet colorAt:'text.foregroundColor' default:Color black.
     DefaultBackgroundColor := StyleSheet colorAt:'text.backgroundColor' default:Color white.
     DefaultFont := StyleSheet fontAt:'text.font'.
-    DefaultTabPositions := StyleSheet at:'text.tabPositions'.
-    DefaultTabPositions isNil ifTrue:[DefaultTabPositions := self defaultTabPositions].
+    "/ that's not style, but a personal setting
+    "/ DefaultTabPositions := StyleSheet at:'text.tabPositions'.
+    "/ DefaultTabPositions isNil ifTrue:[DefaultTabPositions := self defaultTabPositions].
     DefaultLeftMargin := 0.5.
     DefaultTopMargin := 0.5.
 
-    "Modified: 20.10.1997 / 15:05:30 / cg"
+    "Modified: / 31-03-2016 / 10:49:45 / cg"
 !
 
 userDefaultTabPositions
--- a/Workspace.st	Sat Mar 26 06:44:39 2016 +0100
+++ b/Workspace.st	Sat Apr 02 11:06:59 2016 +0100
@@ -1805,7 +1805,7 @@
     nameOfVariable notEmptyOrNil ifTrue:[
         browserClass := UserPreferences systemBrowserClass.
         self windowGroup withWaitCursorDo:[
-            |cls privateClass|
+            |cls nonMeta privateClass|
 
             (nameOfVariable startsWith:'#') ifTrue:[
                 sym := (nameOfVariable copyFrom:2) asSymbolIfInterned.
@@ -1813,12 +1813,17 @@
             ] ifFalse:[
                 "/ is it a class variable?
                 ((cls := self editedClass) notNil
-                and:[ (cls theNonMetaclass allClassVarNames includes:nameOfVariable) ]) ifTrue:[
-                    browserClass
-                        browseRefsTo:nameOfVariable
-                        classVars:true
-                        in:(cls theNonMetaclass whichClassDefinesClassVar:nameOfVariable) withAllSubclasses
-                        modificationsOnly:false.
+                and:[ ((nonMeta := cls theNonMetaclass) allClassVarNames includes:nameOfVariable) ]) ifTrue:[
+                    nonMeta isSharedPool ifTrue:[
+                        "/ class is a pool - browse all references to it.
+                        browserClass browseReferendsOf:(nonMeta name,':',nameOfVariable)
+                    ] ifFalse:[
+                        browserClass
+                            browseRefsTo:nameOfVariable
+                            classVars:true
+                            in:(nonMeta whichClassDefinesClassVar:nameOfVariable) withAllSubclasses
+                            modificationsOnly:false.
+                    ].
                 ] ifFalse:[
                     "/ is it a private class?
                     (cls notNil
@@ -1863,8 +1868,8 @@
         ].
     ].
 
-    "Created: / 5.11.2001 / 17:32:23 / cg"
-    "Modified: / 5.11.2001 / 17:32:38 / cg"
+    "Created: / 05-11-2001 / 17:32:23 / cg"
+    "Modified: / 30-03-2016 / 20:33:17 / cg"
 !
 
 browseSendersOfIt