FileBrowser.st
changeset 18631 5b036fc7ea93
parent 18607 0b179997cbc0
child 18733 246603dcd00e
--- a/FileBrowser.st	Fri Mar 01 15:43:57 2019 +0100
+++ b/FileBrowser.st	Fri Mar 01 15:44:52 2019 +0100
@@ -521,7 +521,7 @@
     "/ add the history items ...
 
     bookmarks := self directoryBookmarks.
-    bookmarks size > 0 ifTrue:[
+    bookmarks size ~~ 0 ifTrue:[
         menu addSeparator.
         bookmarks do:[:dirName |
             menu addItem:((MenuItem 
@@ -533,7 +533,8 @@
     ].
     ^ menu
 
-    "Modified: / 17.8.1998 / 10:13:05 / cg"
+    "Modified: / 17-08-1998 / 10:13:05 / cg"
+    "Modified: / 01-03-2019 / 15:43:16 / Claus Gittinger"
 !
 
 cvsMenuSpec
@@ -952,7 +953,7 @@
 
     "/ add the history items ...
 
-    self directoryHistory size > 0 ifTrue:[
+    self directoryHistory size ~~ 0 ifTrue:[
         m := Menu new.
 
         self directoryHistory do:[:item |
@@ -968,7 +969,8 @@
 
     ^ m
 
-    "Modified: / 17.8.1998 / 10:13:05 / cg"
+    "Modified: / 17-08-1998 / 10:13:05 / cg"
+    "Modified: / 01-03-2019 / 15:43:19 / Claus Gittinger"
 !
 
 menuPopUp
@@ -1610,9 +1612,11 @@
     ^ [ |cvsDir|
 
         currentDirectory notNil
-        and:[fileListView selection size > 0
+        and:[fileListView selection size ~~ 0
         and:[(cvsDir := currentDirectory construct:'CVS') exists
         and:[cvsDir isDirectory]]]]
+
+    "Modified: / 01-03-2019 / 15:41:17 / Claus Gittinger"
 !
 
 canRemoveFromClassPath
@@ -1678,9 +1682,11 @@
 !
 
 hasASN1AndSelection
-    ^ [ fileListView selection size > 0
+    ^ [ fileListView selection size ~~ 0
         and:[OSI::ASN1Parser notNil 
         and:[OSI::ASN1Parser isLoaded]]]
+
+    "Modified: / 01-03-2019 / 15:42:01 / Claus Gittinger"
 !
 
 hasBookmarks
@@ -1694,11 +1700,11 @@
     |bookmarks|
 
     bookmarks := self class directoryBookmarks.
-    ^ bookmarks size > 0
+    ^ bookmarks size ~~ 0
       and:[ bookmarks includes:(currentDirectory pathName) ]
 
-    "Created: / 14.8.1998 / 19:17:02 / cg"
-    "Modified: / 14.8.1998 / 19:17:17 / cg"
+    "Created: / 14-08-1998 / 19:17:02 / cg"
+    "Modified: / 01-03-2019 / 15:42:25 / Claus Gittinger"
 !
 
 hasCBrowser
@@ -1732,12 +1738,13 @@
 !
 
 hasJavaAndSelection
-    ^ [ fileListView selection size > 0
+    ^ [ fileListView selection size ~~ 0
         and:[JavaClassReader notNil 
         and:[JavaClassReader isLoaded]]]
 
-    "Modified: / 17.10.1998 / 16:57:14 / cg"
-    "Created: / 17.10.1998 / 22:58:03 / cg"
+    "Modified: / 17-10-1998 / 16:57:14 / cg"
+    "Created: / 17-10-1998 / 22:58:03 / cg"
+    "Modified: / 01-03-2019 / 15:42:29 / Claus Gittinger"
 !
 
 hasMD5
@@ -1750,17 +1757,19 @@
 !
 
 hasMP3PlayerAndSelection
-    ^ [ fileListView selection size > 0
+    ^ [ fileListView selection size ~~ 0
         and:[ self hasMP3Player value]]
+
+    "Modified: / 01-03-2019 / 15:42:32 / Claus Gittinger"
 !
 
 hasSelection
     "aspect holding true, if a file is selected"
 
-    ^ [fileListView selection size > 0]
-
-    "Created: / 4.8.1998 / 14:10:31 / cg"
-    "Modified: / 4.8.1998 / 14:10:57 / cg"
+    ^ [fileListView selection size ~~ 0]
+
+    "Created: / 04-08-1998 / 14:10:31 / cg"
+    "Modified: / 01-03-2019 / 15:42:35 / Claus Gittinger"
 !
 
 hasSnapshotSelection
@@ -1776,10 +1785,10 @@
 !
 
 hasVisitHistory
-    ^ [self directoryHistory size > 0]
-
-    "Created: / 14.8.1998 / 19:17:02 / cg"
-    "Modified: / 14.8.1998 / 19:17:17 / cg"
+    ^ [self directoryHistory size ~~ 0]
+
+    "Created: / 14-08-1998 / 19:17:02 / cg"
+    "Modified: / 01-03-2019 / 15:42:39 / Claus Gittinger"
 !
 
 hasZipFileSelected
@@ -2786,7 +2795,7 @@
                             sameContentsAs:nil 
                             in:currentDirectory.
                     ] ifFalse:[
-                        (contentsPattern size > 0 or:[namePatterns size > 0]) ifTrue:[
+                        (contentsPattern size ~~ 0 or:[namePatterns size ~~ 0]) ifTrue:[
                             self 
                                 doFindFileNamed:namePatterns
                                 ignoreCase:ignoreCaseInName value
@@ -2845,8 +2854,9 @@
         ].
     ].
 
-    "Created: / 15.10.1998 / 11:32:57 / cg"
-    "Modified: / 15.10.1998 / 12:41:09 / cg"
+    "Created: / 15-10-1998 / 11:32:57 / cg"
+    "Modified: / 15-10-1998 / 12:41:09 / cg"
+    "Modified: / 01-03-2019 / 15:41:49 / Claus Gittinger"
 !
 
 fileGet
@@ -3126,7 +3136,7 @@
     |sel|
 
     sel := fileListView selection.
-    sel size > 0 ifTrue:[
+    sel size ~~ 0 ifTrue:[
         sel := sel collect:[:rawIndex | fileList at:rawIndex].
         "/ do not ask, if shift is pressed
         self sensor shiftDown ifTrue:[
@@ -3135,6 +3145,8 @@
             self confirmAndRemove:sel
         ].
     ]
+
+    "Modified: / 01-03-2019 / 15:41:53 / Claus Gittinger"
 !
 
 fileRename
@@ -3331,7 +3343,7 @@
     sel := self getSelectedFileName.
 
     orgName1 := ''.
-    (sel size > 0) ifTrue:[
+    (sel size ~~ 0) ifTrue:[
         hardOrSoftSymbol == #soft ifTrue:[
             orgName1 := sel
         ] ifFalse:[
@@ -3359,7 +3371,7 @@
 
     box addAbortAndOkButtons.
 
-    orgName1 size > 0 ifTrue:[
+    orgName1 size ~~ 0 ifTrue:[
         box focusOnField:if2.
     ].
     box show.
@@ -3407,7 +3419,8 @@
         ].
     ].
 
-    "Modified: / 13.8.1998 / 21:47:01 / cg"
+    "Modified: / 13-08-1998 / 21:47:01 / cg"
+    "Modified: / 01-03-2019 / 15:42:58 / Claus Gittinger"
 !
 
 newSoftLink
@@ -3482,7 +3495,7 @@
         sel := self getSelectedFileName.
 
         orgName1 := ''.
-        (sel size > 0
+        (sel size ~~ 0
         and:[lastFileDiffDirectory notNil
         and:[lastFileDiffDirectory asFilename isDirectory]]) ifTrue:[
             f := lastFileDiffDirectory asFilename construct:sel.
@@ -3564,9 +3577,10 @@
         ]
     ].
 
-    "Created: / 7.12.1995 / 20:33:58 / cg"
-    "Modified: / 18.9.1997 / 17:31:46 / stefan"
-    "Modified: / 5.5.1999 / 16:04:10 / cg"
+    "Created: / 07-12-1995 / 20:33:58 / cg"
+    "Modified: / 18-09-1997 / 17:31:46 / stefan"
+    "Modified: / 05-05-1999 / 16:04:10 / cg"
+    "Modified: / 01-03-2019 / 15:42:54 / Claus Gittinger"
 !
 
 openEditor
@@ -4512,7 +4526,7 @@
 
     log notNil ifTrue:[
         sel := fileListView selection.
-        sel size > 0 ifTrue:[
+        sel size ~~ 0 ifTrue:[
             sel := sel collect:[:rawIndex | fileList at:rawIndex].
             sel do:[:fn |
                 self
@@ -4526,6 +4540,8 @@
             self doExecuteCommand:('cvs commit -l -m ''' , log , '''') replace:false
         ]
     ]
+
+    "Modified: / 01-03-2019 / 15:41:21 / Claus Gittinger"
 !
 
 cvsCommitSelection
@@ -4552,7 +4568,7 @@
 
     log notNil ifTrue:[
         sel := fileListView selection.
-        sel size > 0 ifTrue:[
+        sel size ~~ 0 ifTrue:[
             sel := sel collect:[:rawIndex | fileList at:rawIndex].
             sel do:[:fn |
                 self
@@ -4564,7 +4580,8 @@
         ].
     ]
 
-    "Modified: / 16.12.1998 / 17:30:31 / cg"
+    "Modified: / 16-12-1998 / 17:30:31 / cg"
+    "Modified: / 01-03-2019 / 15:41:27 / Claus Gittinger"
 !
 
 cvsRemoveFileAndContainer
@@ -4574,7 +4591,7 @@
     |sel q|
 
     sel := fileListView selection.
-    sel size > 0 ifTrue:[
+    sel size ~~ 0 ifTrue:[
         sel := sel collect:[:rawIndex | fileList at:rawIndex].
         sel size > 1 ifTrue:[
             q := resources string:'Remove %1 selected files and their CVS containers ?' with:(sel size)
@@ -4589,7 +4606,8 @@
         ]
     ]
 
-    "Modified: / 16.12.1998 / 17:30:31 / cg"
+    "Modified: / 16-12-1998 / 17:30:31 / cg"
+    "Modified: / 01-03-2019 / 15:41:31 / Claus Gittinger"
 !
 
 cvsUpdateDirectoryLocal
@@ -4616,13 +4634,15 @@
     |sel|
 
     sel := fileListView selection.
-    sel size > 0 ifTrue:[
+    sel size ~~ 0 ifTrue:[
         sel := sel collect:[:rawIndex | fileList at:rawIndex].
         sel do:[:fn |
             self
                 doExecuteCommand:('cvs upd ' , fn) replace:false
         ]
     ].
+
+    "Modified: / 01-03-2019 / 15:41:35 / Claus Gittinger"
 !
 
 doRemoveAndRemoveFromCVS:filesToRemove
@@ -5043,7 +5063,7 @@
                           ).
     ].
 
-    (directoryHistory := self class directoryHistory) size > 0 ifTrue:[
+    (directoryHistory := self class directoryHistory) size ~~ 0 ifTrue:[
         items := items copyWith:#('-').
         items := items ,
                  (directoryHistory 
@@ -5084,8 +5104,9 @@
     ].
     ^menu.
 
-    "Modified: / 21.7.1998 / 16:43:25 / cg"
-    "Created: / 14.8.1998 / 12:10:02 / cg"
+    "Modified: / 21-07-1998 / 16:43:25 / cg"
+    "Created: / 14-08-1998 / 12:10:02 / cg"
+    "Modified: / 01-03-2019 / 15:42:43 / Claus Gittinger"
 !
 
 pathChanged:newPath
@@ -5238,13 +5259,14 @@
     (sel size > 1) ifTrue:[
         self onlyOneSelection
     ] ifFalse:[
-        sel size > 0 ifTrue:[
+        sel size ~~ 0 ifTrue:[
             ^ fileList at:sel first ifAbsent:nil
         ]
     ].
     ^ nil
 
-    "Modified: / 3.10.1998 / 18:21:23 / cg"
+    "Modified: / 03-10-1998 / 18:21:23 / cg"
+    "Modified: / 01-03-2019 / 15:41:57 / Claus Gittinger"
 !
 
 onlyOneSelection
@@ -5547,7 +5569,7 @@
                              an expose event ...
                             "
                             access critical:[                        
-                                lines size > 0 ifTrue:[
+                                lines size ~~ 0 ifTrue:[
                                     stillReplacing ifTrue:[
                                         lines do:[:line |
                                             codeView at:lnr put:line withTabsExpanded.
@@ -5635,9 +5657,10 @@
         self warn:'text quite large now - please cut off some lines'
     ]
 
-    "Modified: / 21.9.1995 / 11:18:46 / claus"
-    "Modified: / 6.3.1998 / 17:32:03 / stefan"
-    "Modified: / 15.10.1998 / 12:37:52 / cg"
+    "Modified: / 21-09-1995 / 11:18:46 / claus"
+    "Modified: / 06-03-1998 / 17:32:03 / stefan"
+    "Modified: / 15-10-1998 / 12:37:52 / cg"
+    "Modified: / 01-03-2019 / 15:41:42 / Claus Gittinger"
 !
 
 imageAction:aFilename
@@ -7125,7 +7148,7 @@
              numVisible dirSuffix prevWidth t|
 
             dirSuffix := Filename directorySuffix.
-            dirSuffix size > 0 ifTrue:[
+            dirSuffix size ~~ 0 ifTrue:[
                 dirSuffix := '.' , dirSuffix asLowercase.
             ].
 
@@ -7440,10 +7463,11 @@
         self scheduleCheckBlock.
     ]
 
-    "Modified: / 21.9.1995 / 11:40:23 / claus"
-    "Modified: / 28.4.1997 / 22:30:30 / dq"
-    "Modified: / 18.9.1997 / 18:28:30 / stefan"
-    "Modified: / 15.11.2001 / 23:49:03 / cg"
+    "Modified: / 21-09-1995 / 11:40:23 / claus"
+    "Modified: / 28-04-1997 / 22:30:30 / dq"
+    "Modified: / 18-09-1997 / 18:28:30 / stefan"
+    "Modified: / 15-11-2001 / 23:49:03 / cg"
+    "Modified: / 01-03-2019 / 15:43:09 / Claus Gittinger"
 ! !
 
 !FileBrowser methodsFor:'queries'!