DirectoryView.st
author Stefan Vogel <sv@exept.de>
Tue, 20 Feb 2018 21:52:40 +0100
changeset 3541 23028559b7b2
parent 3491 c1333ee85336
child 3556 5513f508bcf2
permissions -rw-r--r--
#OTHER by stefan changed: #commonPostBuild rename #useAlienInfoLabeloHolder methodto #useAlienInfoLabel to avoid recursion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
     1
"
502
624dc714fd69 copyright changed
tz
parents: 474
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
2137dff405f0 initial checkin
tz
parents:
diff changeset
     4
2137dff405f0 initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
2137dff405f0 initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
2137dff405f0 initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
2137dff405f0 initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
2137dff405f0 initial checkin
tz
parents:
diff changeset
     9
 other person. No title to or ownership of the software is
2137dff405f0 initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
2137dff405f0 initial checkin
tz
parents:
diff changeset
    11
"
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    12
"{ Package: 'stx:libtool2' }"
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    13
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
    14
"{ NameSpace: Smalltalk }"
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
    15
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    16
ApplicationModel subclass:#DirectoryView
2137dff405f0 initial checkin
tz
parents:
diff changeset
    17
	instanceVariableNames:'directory selectedFileFilter readTask monitoring
2137dff405f0 initial checkin
tz
parents:
diff changeset
    18
		monitoringTimeBlock fileDoubleClickAction fileSelectAction
2137dff405f0 initial checkin
tz
parents:
diff changeset
    19
		fileFilterSelectAction fileAttributes'
2137dff405f0 initial checkin
tz
parents:
diff changeset
    20
	classVariableNames:''
2137dff405f0 initial checkin
tz
parents:
diff changeset
    21
	poolDictionaries:''
2101
11e04dde2975 category change
Claus Gittinger <cg@exept.de>
parents: 1627
diff changeset
    22
	category:'Interface-Dialogs'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    23
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    24
2137dff405f0 initial checkin
tz
parents:
diff changeset
    25
Object subclass:#FileRow
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
    26
	instanceVariableNames:'fileName size modified iconKey imageFromFile group owner
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
    27
		permissions baseName'
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    28
	classVariableNames:'MaxImageFileSize'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    29
	poolDictionaries:''
2137dff405f0 initial checkin
tz
parents:
diff changeset
    30
	privateIn:DirectoryView
2137dff405f0 initial checkin
tz
parents:
diff changeset
    31
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    32
2137dff405f0 initial checkin
tz
parents:
diff changeset
    33
!DirectoryView class methodsFor:'documentation'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    34
2137dff405f0 initial checkin
tz
parents:
diff changeset
    35
copyright
2137dff405f0 initial checkin
tz
parents:
diff changeset
    36
"
502
624dc714fd69 copyright changed
tz
parents: 474
diff changeset
    37
 COPYRIGHT (c) 1997 by eXept Software AG
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    38
              All Rights Reserved
2137dff405f0 initial checkin
tz
parents:
diff changeset
    39
2137dff405f0 initial checkin
tz
parents:
diff changeset
    40
 This software is furnished under a license and may be used
2137dff405f0 initial checkin
tz
parents:
diff changeset
    41
 only in accordance with the terms of that license and with the
2137dff405f0 initial checkin
tz
parents:
diff changeset
    42
 inclusion of the above copyright notice. This software may not
2137dff405f0 initial checkin
tz
parents:
diff changeset
    43
 be provided or otherwise made available to, or used by, any
2137dff405f0 initial checkin
tz
parents:
diff changeset
    44
 other person. No title to or ownership of the software is
2137dff405f0 initial checkin
tz
parents:
diff changeset
    45
 hereby transferred.
2137dff405f0 initial checkin
tz
parents:
diff changeset
    46
"
2137dff405f0 initial checkin
tz
parents:
diff changeset
    47
2137dff405f0 initial checkin
tz
parents:
diff changeset
    48
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    49
2137dff405f0 initial checkin
tz
parents:
diff changeset
    50
documentation
2137dff405f0 initial checkin
tz
parents:
diff changeset
    51
"
2351
ac44cbdf95c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2101
diff changeset
    52
    this is somewhat outdated. However, it is still used by the image editor and
ac44cbdf95c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2101
diff changeset
    53
    some other resource editors.
ac44cbdf95c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2101
diff changeset
    54
    It has the advantage of showing the file-contents...
3316
db4749aa5c60 #OTHER by mawalch
mawalch
parents: 3303
diff changeset
    55
    ...but the disadvantage of having an ugly layout and user interface.
502
624dc714fd69 copyright changed
tz
parents: 474
diff changeset
    56
624dc714fd69 copyright changed
tz
parents: 474
diff changeset
    57
    [author:]
624dc714fd69 copyright changed
tz
parents: 474
diff changeset
    58
        Thomas Zwick
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    59
"
2137dff405f0 initial checkin
tz
parents:
diff changeset
    60
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
    61
2137dff405f0 initial checkin
tz
parents:
diff changeset
    62
!DirectoryView class methodsFor:'instance creation'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    63
516
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    64
openOnDirectory: aDirectoryString
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    65
    "open a DirectoryView for a aDirectoryString"
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    66
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    67
    ^ (self new directory: aDirectoryString) open
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    68
516
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    69
    "
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    70
     self openOnDirectory: '/etc'
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    71
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    72
516
d336effde882 Fix #openOnDirectory: and copyright.
Stefan Vogel <sv@exept.de>
parents: 502
diff changeset
    73
    "Modified: / 28.1.1998 / 15:44:53 / stefan"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
    74
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
    75
2137dff405f0 initial checkin
tz
parents:
diff changeset
    76
!DirectoryView class methodsFor:'interface specs'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
    77
823
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    78
windowSpec
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    79
    "This resource specification was automatically generated
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    80
     by the UIPainter of ST/X."
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    81
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    82
    "Do not manually edit this!! If it is corrupted,
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    83
     the UIPainter may not be able to read the specification."
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    84
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    85
    "
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    86
     UIPainter new openOnClass:DirectoryView andSelector:#windowSpec
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    87
     DirectoryView new openInterface:#windowSpec
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    88
     DirectoryView open
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    89
    "
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    90
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    91
    <resource: #canvas>
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
    92
1346
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    93
    ^ 
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    94
     #(#FullSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    95
        #name: #windowSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    96
        #window: 
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    97
       #(#WindowSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    98
          #label: 'Directory View'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
    99
          #name: 'Directory View'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   100
          #min: #(#Point 10 10)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   101
          #max: #(#Point 1152 900)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   102
          #bounds: #(#Rectangle 13 23 413 323)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   103
        )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   104
        #component: 
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   105
       #(#SpecCollection
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   106
          #collection: #(
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   107
           #(#DataSetSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   108
              #name: 'filesDataSetView'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   109
              #layout: #(#LayoutFrame 0 0.0 24 0.0 -2 1.0 0 1.0)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   110
              #model: #selectionOfFile
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   111
              #menu: #fileListMenu
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   112
              #hasHorizontalScrollBar: true
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   113
              #hasVerticalScrollBar: true
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   114
              #miniScrollerHorizontal: true
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   115
              #dataList: #listOfFiles
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   116
              #useIndex: false
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   117
              #has3Dsepartors: false
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   118
              #doubleClickSelector: #fileDoubleClicked
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   119
              #columnHolder: #fileAttributeColumns
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   120
              #valueChangeSelector: #fileSelected
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   121
              #verticalSpacing: 1
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   122
            )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   123
           #(#ComboBoxSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   124
              #name: 'formatComboBox'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   125
              #layout: #(#LayoutFrame 63 0.0 0 0 0 1.0 22 0)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   126
              #model: #selectionOfFileFilter
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   127
              #immediateAccept: false
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   128
              #acceptOnTab: false
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   129
              #acceptOnPointerLeave: false
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   130
              #comboList: #listOfFileFilters
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   131
            )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   132
           #(#LabelSpec
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   133
              #label: 'Filter: '
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   134
              #name: 'filterLabel'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   135
              #layout: #(#LayoutFrame 0 0 0 0 62 0 22 0)
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   136
              #adjust: #right
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   137
            )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   138
           )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   139
         
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   140
        )
823
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
   141
      )
1346
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   142
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   143
    "Modified: / 11.2.2000 / 00:11:43 / cg"
823
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
   144
! !
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
   145
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
   146
!DirectoryView class methodsFor:'list specs'!
47e7d348e01a *** empty log message ***
tz
parents: 820
diff changeset
   147
820
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   148
tableColumnsForFileAttributes
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   149
    "This resource specification was automatically generated
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   150
     by the DataSetBuilder of ST/X."
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   151
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   152
    "Do not manually edit this!! If it is corrupted,
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   153
     the DataSetBuilder may not be able to read the specification."
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   154
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   155
    "
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   156
     DataSetBuilder new openOnClass:DirectoryView andSelector:#tableColumnsForFileAttributes
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   157
    "
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   158
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   159
    <resource: #tableColumns>
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   160
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   161
820
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   162
    ^ #(
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   163
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   164
           #label: ''
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   165
           #width: 30
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   166
           #height: 22
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   167
           #printSelector: #iconOn:
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   168
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   169
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   170
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   171
           #label: 'File name'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   172
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   173
           #minWidth: 150
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   174
           #model: #baseName
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   175
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   176
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   177
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   178
           #label: 'Size'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   179
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   180
           #width: 70
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   181
           #model: #size
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   182
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   183
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   184
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   185
           #label: 'Modified'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   186
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   187
           #model: #modified
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   188
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   189
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   190
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   191
           #label: 'Permissions'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   192
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   193
           #width: 85
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   194
           #model: #permissions
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   195
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   196
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   197
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   198
           #label: 'Owner'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   199
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   200
           #width: 50
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   201
           #model: #owner
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   202
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   203
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   204
        #(#DataSetColumnSpec
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   205
           #label: 'Group'
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   206
           #labelAlignment: #left
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   207
           #width: 50
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   208
           #model: #group
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   209
           #canSelect: false
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   210
       )
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   211
     )
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   212
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   213
1346
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   214
!DirectoryView class methodsFor:'menu specs'!
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   215
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   216
fileListMenu
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   217
    "This resource specification was automatically generated
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   218
     by the MenuEditor of ST/X."
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   219
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   220
    "Do not manually edit this!! If it is corrupted,
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   221
     the MenuEditor may not be able to read the specification."
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   222
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   223
    "
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   224
     MenuEditor new openOnClass:DirectoryView andSelector:#fileListMenu
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   225
     (Menu new fromLiteralArrayEncoding:(DirectoryView fileListMenu)) startUp
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   226
    "
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   227
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   228
    <resource: #menu>
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   229
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   230
    ^ 
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   231
     #(#Menu
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   232
        #(
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   233
         #(#MenuItem
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   234
            #label: 'Update'
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   235
            #translateLabel: true
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   236
            #value: #updateFileList
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   237
          )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   238
         )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   239
        nil
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   240
        nil
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   241
      )
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   242
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   243
    "Created: / 11.2.2000 / 00:11:39 / cg"
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   244
! !
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   245
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   246
!DirectoryView methodsFor:'accessing'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   247
2137dff405f0 initial checkin
tz
parents:
diff changeset
   248
directory: aDirectory
2137dff405f0 initial checkin
tz
parents:
diff changeset
   249
2137dff405f0 initial checkin
tz
parents:
diff changeset
   250
    directory := aDirectory asFilename asAbsoluteFilename name
2137dff405f0 initial checkin
tz
parents:
diff changeset
   251
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   252
2137dff405f0 initial checkin
tz
parents:
diff changeset
   253
fileAttributes: anArray
2137dff405f0 initial checkin
tz
parents:
diff changeset
   254
2137dff405f0 initial checkin
tz
parents:
diff changeset
   255
    fileAttributes := anArray
2137dff405f0 initial checkin
tz
parents:
diff changeset
   256
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   257
2137dff405f0 initial checkin
tz
parents:
diff changeset
   258
fileDoubleClickAction: anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   259
2137dff405f0 initial checkin
tz
parents:
diff changeset
   260
    fileDoubleClickAction := anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   261
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   262
2137dff405f0 initial checkin
tz
parents:
diff changeset
   263
fileFilterSelectAction: anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   264
2137dff405f0 initial checkin
tz
parents:
diff changeset
   265
    fileFilterSelectAction := anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   266
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   267
2137dff405f0 initial checkin
tz
parents:
diff changeset
   268
fileSelectAction: anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   269
2137dff405f0 initial checkin
tz
parents:
diff changeset
   270
    fileSelectAction := anActionBlock
2137dff405f0 initial checkin
tz
parents:
diff changeset
   271
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   272
2137dff405f0 initial checkin
tz
parents:
diff changeset
   273
listOfFileFilters: aCollection
2137dff405f0 initial checkin
tz
parents:
diff changeset
   274
2137dff405f0 initial checkin
tz
parents:
diff changeset
   275
    self listOfFileFilters contents: aCollection.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   276
    self selectionOfFileFilter value: (self listOfFileFilters at: 1 ifAbsent: [nil]).
2137dff405f0 initial checkin
tz
parents:
diff changeset
   277
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   278
2137dff405f0 initial checkin
tz
parents:
diff changeset
   279
monitoring: aBoolean
2137dff405f0 initial checkin
tz
parents:
diff changeset
   280
2137dff405f0 initial checkin
tz
parents:
diff changeset
   281
    aBoolean
2137dff405f0 initial checkin
tz
parents:
diff changeset
   282
    ifTrue:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   283
    [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   284
        monitoringTimeBlock := [self readDirectory].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   285
        self readDirectory.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   286
    ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   287
    ifFalse:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   288
    [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   289
        monitoring ifTrue:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   290
        [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   291
            Processor removeTimedBlock:monitoringTimeBlock.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   292
            monitoringTimeBlock := nil
2137dff405f0 initial checkin
tz
parents:
diff changeset
   293
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   294
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   295
2137dff405f0 initial checkin
tz
parents:
diff changeset
   296
    monitoring := aBoolean.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   297
2137dff405f0 initial checkin
tz
parents:
diff changeset
   298
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   299
2137dff405f0 initial checkin
tz
parents:
diff changeset
   300
!DirectoryView methodsFor:'aspects'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   301
2137dff405f0 initial checkin
tz
parents:
diff changeset
   302
fileAttributeColumns
2137dff405f0 initial checkin
tz
parents:
diff changeset
   303
2137dff405f0 initial checkin
tz
parents:
diff changeset
   304
    |holder|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   305
    (holder := builder bindingAt:#fileAttributeColumns) isNil ifTrue:[
2137dff405f0 initial checkin
tz
parents:
diff changeset
   306
        |fileAttributeColumns|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   307
        builder aspectAt:#fileAttributeColumns put:(holder := List new).
820
e967a1359d77 table columns formatted
tz
parents: 652
diff changeset
   308
        fileAttributeColumns := self class tableColumnsForFileAttributes collect: [:i| i decodeAsLiteralArray].
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   309
        holder add: fileAttributeColumns first.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   310
        fileAttributeColumns do:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   311
        [:col|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   312
            (fileAttributes includes: col label) ifTrue: [holder add: col]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   313
        ].
591
efb80a288277 labels inseted
tz
parents: 590
diff changeset
   314
        holder do: [:col| col label: ' ', col label]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   315
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   316
    ^ holder
2137dff405f0 initial checkin
tz
parents:
diff changeset
   317
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   318
2137dff405f0 initial checkin
tz
parents:
diff changeset
   319
listOfFileFilters
2137dff405f0 initial checkin
tz
parents:
diff changeset
   320
2137dff405f0 initial checkin
tz
parents:
diff changeset
   321
    |holder|          
2137dff405f0 initial checkin
tz
parents:
diff changeset
   322
    (holder := builder bindingAt:#listOfFileFilters) isNil ifTrue:[
2137dff405f0 initial checkin
tz
parents:
diff changeset
   323
        builder aspectAt:#listOfFileFilters put:(holder :=  List with: '*').
2137dff405f0 initial checkin
tz
parents:
diff changeset
   324
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   325
    ^ holder
2137dff405f0 initial checkin
tz
parents:
diff changeset
   326
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   327
2137dff405f0 initial checkin
tz
parents:
diff changeset
   328
listOfFiles
2137dff405f0 initial checkin
tz
parents:
diff changeset
   329
2137dff405f0 initial checkin
tz
parents:
diff changeset
   330
    |holder|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   331
    (holder := builder bindingAt:#listOfFiles) isNil ifTrue:[
2137dff405f0 initial checkin
tz
parents:
diff changeset
   332
        builder aspectAt:#listOfFiles put:(holder :=  List new).
2137dff405f0 initial checkin
tz
parents:
diff changeset
   333
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   334
    ^ holder
2137dff405f0 initial checkin
tz
parents:
diff changeset
   335
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   336
2137dff405f0 initial checkin
tz
parents:
diff changeset
   337
selectionOfFile
2137dff405f0 initial checkin
tz
parents:
diff changeset
   338
2137dff405f0 initial checkin
tz
parents:
diff changeset
   339
    |holder|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   340
    (holder := builder bindingAt:#selectionOfFile) isNil ifTrue:[
2137dff405f0 initial checkin
tz
parents:
diff changeset
   341
        builder aspectAt:#selectionOfFile put:(holder :=  ValueHolder new).
2137dff405f0 initial checkin
tz
parents:
diff changeset
   342
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   343
    ^ holder
2137dff405f0 initial checkin
tz
parents:
diff changeset
   344
2137dff405f0 initial checkin
tz
parents:
diff changeset
   345
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   346
2137dff405f0 initial checkin
tz
parents:
diff changeset
   347
selectionOfFileFilter
2137dff405f0 initial checkin
tz
parents:
diff changeset
   348
2137dff405f0 initial checkin
tz
parents:
diff changeset
   349
    |holder|
2137dff405f0 initial checkin
tz
parents:
diff changeset
   350
    (holder := builder bindingAt:#selectionOfFileFilter) isNil ifTrue:[
2137dff405f0 initial checkin
tz
parents:
diff changeset
   351
        builder aspectAt:#selectionOfFileFilter put:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   352
        (holder := AspectAdaptor new subject:self; forAspect:#selectedFileFilter).
2137dff405f0 initial checkin
tz
parents:
diff changeset
   353
        selectedFileFilter := '*'.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   354
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   355
    ^ holder
2137dff405f0 initial checkin
tz
parents:
diff changeset
   356
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   357
2137dff405f0 initial checkin
tz
parents:
diff changeset
   358
!DirectoryView methodsFor:'callbacks'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   359
2137dff405f0 initial checkin
tz
parents:
diff changeset
   360
fileDoubleClicked
2137dff405f0 initial checkin
tz
parents:
diff changeset
   361
      
473
396ab247a5af be sure that file is selected
tz
parents: 451
diff changeset
   362
    (fileDoubleClickAction notNil and: [self selectionOfFile value notNil]) 
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   363
    ifTrue: 
2137dff405f0 initial checkin
tz
parents:
diff changeset
   364
    [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   365
        fileDoubleClickAction numArgs = 0
2137dff405f0 initial checkin
tz
parents:
diff changeset
   366
        ifTrue:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   367
        [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   368
            fileDoubleClickAction value
2137dff405f0 initial checkin
tz
parents:
diff changeset
   369
        ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   370
        fileDoubleClickAction numArgs = 1
2137dff405f0 initial checkin
tz
parents:
diff changeset
   371
        ifTrue:
451
a8da4f1924a4 evaluate actions with complete path
tz
parents: 424
diff changeset
   372
        [                
a8da4f1924a4 evaluate actions with complete path
tz
parents: 424
diff changeset
   373
            fileDoubleClickAction value: (directory asFilename construct: self selectionOfFile value baseName) name
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   374
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   375
    ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   376
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   377
2137dff405f0 initial checkin
tz
parents:
diff changeset
   378
fileSelected
2137dff405f0 initial checkin
tz
parents:
diff changeset
   379
      
473
396ab247a5af be sure that file is selected
tz
parents: 451
diff changeset
   380
    (fileSelectAction notNil and: [self selectionOfFile value notNil]) 
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   381
    ifTrue: 
2137dff405f0 initial checkin
tz
parents:
diff changeset
   382
    [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   383
        fileSelectAction numArgs = 0
2137dff405f0 initial checkin
tz
parents:
diff changeset
   384
        ifTrue:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   385
        [
2137dff405f0 initial checkin
tz
parents:
diff changeset
   386
            fileSelectAction value
2137dff405f0 initial checkin
tz
parents:
diff changeset
   387
        ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   388
        fileSelectAction numArgs = 1
2137dff405f0 initial checkin
tz
parents:
diff changeset
   389
        ifTrue:
2137dff405f0 initial checkin
tz
parents:
diff changeset
   390
        [
451
a8da4f1924a4 evaluate actions with complete path
tz
parents: 424
diff changeset
   391
            fileSelectAction value: (directory asFilename construct: self selectionOfFile value baseName) name
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   392
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   393
    ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   394
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   395
2137dff405f0 initial checkin
tz
parents:
diff changeset
   396
!DirectoryView methodsFor:'initialization'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   397
2137dff405f0 initial checkin
tz
parents:
diff changeset
   398
initialize
2137dff405f0 initial checkin
tz
parents:
diff changeset
   399
2137dff405f0 initial checkin
tz
parents:
diff changeset
   400
    super initialize.
874
ab93fcd829c5 create builder
Claus Gittinger <cg@exept.de>
parents: 828
diff changeset
   401
    self createBuilder.
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   402
3044
482172c551b3 class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   403
    directory :=  (directory ? '.') asFilename asAbsoluteFilename directoryName.
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   404
    monitoring := false.
593
17f3d679fa72 better size info
tz
parents: 591
diff changeset
   405
    fileAttributes := #('File name' 'Size' 'Modified').
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   406
    self selectionOfFileFilter value: (self listOfFileFilters at: 1 ifAbsent: [nil]).
2137dff405f0 initial checkin
tz
parents:
diff changeset
   407
874
ab93fcd829c5 create builder
Claus Gittinger <cg@exept.de>
parents: 828
diff changeset
   408
    "Modified: / 20.6.1998 / 14:46:10 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   409
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   410
2878
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   411
!DirectoryView methodsFor:'initialize-release'!
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   412
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   413
release
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   414
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   415
    monitoring ifTrue:
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   416
    [
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   417
        Processor removeTimedBlock:monitoringTimeBlock.
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   418
        monitoringTimeBlock := nil
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   419
    ].
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   420
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   421
    super release
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   422
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   423
! !
241be37ce37b category of: #release
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
   424
1346
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   425
!DirectoryView methodsFor:'menu actions'!
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   426
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   427
updateFileList
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   428
    DirectoryContents flushCache.
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   429
    self readDirectory
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   430
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   431
    "Created: / 11.2.2000 / 00:12:46 / cg"
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   432
    "Modified: / 11.2.2000 / 00:14:32 / cg"
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   433
! !
0793db434b21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 999
diff changeset
   434
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   435
!DirectoryView methodsFor:'private'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   436
2137dff405f0 initial checkin
tz
parents:
diff changeset
   437
readDirectory
2439
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   438
    |allDirectories allFiles foundFiles filterList dir newContents|    
828
12090f74be53 care for non-existing directory
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   439
2439
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   440
    allFiles := OrderedCollection new.
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   441
    allDirectories := OrderedCollection new.
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   442
    foundFiles := OrderedCollection new.
991
9454c462dad4 fixed file filter (must use selected filter; not all filters)
Claus Gittinger <cg@exept.de>
parents: 979
diff changeset
   443
    "/ filterList := self listOfFileFilters value.
9454c462dad4 fixed file filter (must use selected filter; not all filters)
Claus Gittinger <cg@exept.de>
parents: 979
diff changeset
   444
    filterList := self selectedFileFilter asCollectionOfSubstringsSeparatedBy:$;.
9454c462dad4 fixed file filter (must use selected filter; not all filters)
Claus Gittinger <cg@exept.de>
parents: 979
diff changeset
   445
    filterList := filterList collect:[:pattern | pattern withoutSeparators].
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   446
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   447
    self withCursor:Cursor read do:[ 
828
12090f74be53 care for non-existing directory
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   448
        (dir := DirectoryContents directoryNamed: directory) notNil ifTrue:[
979
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   449
"/            dir filesAndBasenamesDo:[:file :name|      
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   450
"/                filterList do:[:filter|
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   451
"/                    ((filter match:name) and:[(foundFiles includes: name) not])
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   452
"/                    ifTrue:[
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   453
"/                        foundFiles add: name
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   454
"/                    ].
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   455
"/                ].
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   456
"/            ].
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   457
            dir filesAndBasenamesDo:[:file :name|      
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   458
                allFiles add: name
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   459
            ].
2439
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   460
            dir directoriesAndBasenamesDo:[:file :name|      
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   461
                allDirectories add: name
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   462
            ].
991
9454c462dad4 fixed file filter (must use selected filter; not all filters)
Claus Gittinger <cg@exept.de>
parents: 979
diff changeset
   463
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   464
            Filename isCaseSensitive ifFalse:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   465
                filterList do:[:filter|
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   466
                    |lcFilter|
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   467
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   468
                    lcFilter := filter asLowercase.
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   469
                    foundFiles
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   470
                        addAll:(allFiles 
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   471
                                    select:[:name | lcFilter match:name asLowercase]
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   472
                                ).
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   473
                ]
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   474
            ] ifTrue:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   475
                filterList do:[:filter|
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   476
                    foundFiles
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   477
                        addAll:(allFiles 
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   478
                                    select:[:name | filter match:name]
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   479
                                ).
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   480
                ]
979
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   481
            ].
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   482
2439
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   483
            foundFiles sort.
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   484
            allDirectories sort.
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   485
979
2ee26d9ee7c4 tuned #readDirectory
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   486
            dir := directory asFilename.
2439
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   487
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   488
            newContents := OrderedCollection new.
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   489
            newContents addAll:(allDirectories collect:[:name| FileRow new fileName:(dir construct:name)]).
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   490
            newContents addAll:(foundFiles collect:[:name| FileRow new fileName:(dir construct:name)]).
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   491
9f6c2575f2b1 fixed entry callback and net-drive handling
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
   492
            self listOfFiles contents:newContents
828
12090f74be53 care for non-existing directory
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   493
        ]
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   494
    ]
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   495
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   496
    "Modified: / 23.9.1998 / 17:00:42 / cg"
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   497
!
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   498
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   499
readMonitoringDirectory
3303
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   500
    "this is a very ugly piece of code - 
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   501
     left in as a bad example of how to make ST look slow...
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   502
     DO NOT USE IT, but read to learn"
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   503
     
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   504
    |readBlock|
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   505
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   506
    readTask notNil ifTrue: [readTask terminate].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   507
    readBlock :=
2137dff405f0 initial checkin
tz
parents:
diff changeset
   508
        [
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   509
            |dir currentFilenames oldListOfFiles listOfFiles|
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   510
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   511
            dir := directory asFilename.
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   512
            currentFilenames := OrderedCollection new.
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   513
            (dir isReadable and:[dir isExecutable]) ifTrue: [
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   514
                self listOfFileFilters value do:
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   515
                [:filter|
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   516
                    (dir filesMatchingWithoutDotDirs: filter) do: [:aFileName|
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   517
                        |file|
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   518
                        (file := dir construct: aFileName) isDirectory ifFalse: [
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   519
                            currentFilenames add: file
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   520
                        ]
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   521
                    ].
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   522
                ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   523
            ].
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   524
            listOfFiles := self listOfFiles.
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   525
            
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   526
            oldListOfFiles := listOfFiles copy.
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   527
            (currentFilenames asSortedCollection: [:f1 :f2| f1 baseName < f2 baseName]) asSet 
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   528
                do: [:fileName| 
3354
05ab9a73a9a6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3316
diff changeset
   529
                    (oldListOfFiles contains:[:fileRow | fileRow fileName = fileName ])
05ab9a73a9a6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3316
diff changeset
   530
                    ifFalse: [
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   531
                        |nearestFileRow newRow r|
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   532
                        
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   533
                        newRow := FileRow new fileName: fileName asFilename.
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   534
                        "/ cg: how stupid is that?
3303
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   535
                        nearestFileRow := listOfFiles indexOf: (listOfFiles detect: [:fileRow| fileRow baseName > fileName baseName] ifNone: nil).
d3836d28d2c0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3299
diff changeset
   536
                        "/ nearestFileRow := listOfFiles findFirst:[:fileRow | fileRow baseName > fileName baseName].
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   537
                        nearestFileRow = 0
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   538
                            ifTrue: [listOfFiles add: newRow]
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   539
                            ifFalse: [listOfFiles add: newRow beforeIndex: nearestFileRow].
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   540
                        monitoring ifTrue: [self selectionOfFile value: r].
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   541
                    ]
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   542
                ].
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   543
                
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   544
            listOfFiles 
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   545
                reverseDo: [:fileRow|
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   546
                    (currentFilenames includes: fileRow fileName)
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
   547
                    ifFalse: [listOfFiles remove: fileRow]
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   548
                ]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   549
        ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
   550
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   551
    monitoring ifTrue: [
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   552
        readTask := readBlock forkAt: Processor userBackgroundPriority.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   553
        Processor addTimedBlock: monitoringTimeBlock afterSeconds: 1
3018
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   554
    ] ifFalse: [
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   555
        Cursor wait showWhile: [readBlock value]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   556
    ]
3354
05ab9a73a9a6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3316
diff changeset
   557
05ab9a73a9a6 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3316
diff changeset
   558
    "Modified: / 19-11-2016 / 20:34:14 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   559
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   560
2137dff405f0 initial checkin
tz
parents:
diff changeset
   561
!DirectoryView methodsFor:'selection'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   562
2137dff405f0 initial checkin
tz
parents:
diff changeset
   563
selectedFileFilter
2137dff405f0 initial checkin
tz
parents:
diff changeset
   564
2137dff405f0 initial checkin
tz
parents:
diff changeset
   565
    ^selectedFileFilter
2137dff405f0 initial checkin
tz
parents:
diff changeset
   566
2137dff405f0 initial checkin
tz
parents:
diff changeset
   567
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   568
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   569
selectedFileFilter:aString
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   570
    "change the file filter"
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   571
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   572
    |listOfFileFilters nArgs|
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   573
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   574
    aString = selectedFileFilter ifTrue:[^ self].
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   575
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   576
    listOfFileFilters := self listOfFileFilters.
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   577
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   578
    "/ what is this for ?
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   579
    aString size == 0 ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   580
        listOfFileFilters remove: selectedFileFilter ifAbsent: nil
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   581
    ].
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   582
    selectedFileFilter := aString.
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   583
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   584
    ((listOfFileFilters includes: selectedFileFilter) not
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   585
    and:[selectedFileFilter notEmpty])
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   586
    ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   587
        listOfFileFilters addFirst: selectedFileFilter
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   588
    ].
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   589
    ((listOfFileFilters includes: selectedFileFilter)
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   590
    and:[fileFilterSelectAction notNil]) 
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   591
    ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   592
        (nArgs := fileFilterSelectAction numArgs) == 0
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   593
        ifTrue: [
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   594
            fileFilterSelectAction value
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   595
        ] ifFalse:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   596
            nArgs == 1 ifTrue:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   597
                fileFilterSelectAction value: selectedFileFilter
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   598
            ] ifFalse:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   599
                self error:'bad numArgs of fileFilter action block'
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   600
            ]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   601
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   602
    ].       
2137dff405f0 initial checkin
tz
parents:
diff changeset
   603
    self readDirectory.
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   604
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   605
    "Modified: / 23.9.1998 / 16:53:05 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   606
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   607
3035
5a1ce9362a65 class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 3018
diff changeset
   608
!DirectoryView methodsFor:'startup & release'!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   609
2137dff405f0 initial checkin
tz
parents:
diff changeset
   610
closeRequest
2137dff405f0 initial checkin
tz
parents:
diff changeset
   611
2137dff405f0 initial checkin
tz
parents:
diff changeset
   612
    self release.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   613
2137dff405f0 initial checkin
tz
parents:
diff changeset
   614
    super closeRequest
2137dff405f0 initial checkin
tz
parents:
diff changeset
   615
2137dff405f0 initial checkin
tz
parents:
diff changeset
   616
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   617
2137dff405f0 initial checkin
tz
parents:
diff changeset
   618
!DirectoryView::FileRow class methodsFor:'resources'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   619
2137dff405f0 initial checkin
tz
parents:
diff changeset
   620
HFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   621
2137dff405f0 initial checkin
tz
parents:
diff changeset
   622
    ^self hFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   623
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   624
2137dff405f0 initial checkin
tz
parents:
diff changeset
   625
MakefileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   626
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   627
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   628
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   629
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   630
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   631
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   632
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   633
     self MakefileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   634
     ImageEditor openOnClass:self andSelector:#MakefileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   635
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   636
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   637
2137dff405f0 initial checkin
tz
parents:
diff changeset
   638
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   639
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   640
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   641
        constantNamed:'DirectoryView::FileRow MakefileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   642
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 @@0 @@0 @@0)IV0/U$0)]&0)UT;)UV4 @@0 @@0???0???0')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   643
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   644
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   645
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   646
2137dff405f0 initial checkin
tz
parents:
diff changeset
   647
binaryFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   648
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   649
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   650
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   651
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   652
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   653
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   654
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   655
     self binaryFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   656
     ImageEditor openOnClass:self andSelector:#binaryFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   657
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   658
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   659
2137dff405f0 initial checkin
tz
parents:
diff changeset
   660
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   661
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   662
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   663
        constantNamed:'DirectoryView::FileRow binaryFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   664
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???3 @_7 @W4#&S0&6Q0&6_3&6O5&6@0#&@9 @@0&\@2&6@0&6@0&6@1&6@8&\@0 @@0???0???1')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   665
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   666
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   667
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   668
2137dff405f0 initial checkin
tz
parents:
diff changeset
   669
cFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   670
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   671
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   672
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   673
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   674
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   675
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   676
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   677
     self cFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   678
     ImageEditor openOnClass:self andSelector:#cFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   679
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   680
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   681
2137dff405f0 initial checkin
tz
parents:
diff changeset
   682
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   683
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   684
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   685
        constantNamed:'DirectoryView::FileRow cFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   686
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 @@0 @@0 \@0 "@0  @0  @0&"@;&\@4 @@0 @@0???0???0')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   687
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   688
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   689
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   690
2137dff405f0 initial checkin
tz
parents:
diff changeset
   691
exeFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   692
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   693
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   694
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   695
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   696
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   697
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   698
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   699
     self exeFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   700
     ImageEditor openOnClass:self andSelector:#exeFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   701
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   702
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   703
2137dff405f0 initial checkin
tz
parents:
diff changeset
   704
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   705
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   706
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   707
        constantNamed:'DirectoryView::FileRow exeFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   708
        ifAbsentPut:[(Depth2Image width:20 height:19) bits:(ByteArray fromPackedString:'UUUUUUU@@@@UUT@@@AEUP@@@DEU@@@@PET@@@AUUQUUUP@UF**)@ATUUUT@EQ???P@UG??=@AT_??4@EQ???P@UG??=@AT_??4@EQUUUP@U@@@@@AUUUUUUU
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   709
UUUUUUTb')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   710
            colorMapFromArray:#[255 255 255 0 0 0 0 127 127 170 170 170]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   711
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   712
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   713
2137dff405f0 initial checkin
tz
parents:
diff changeset
   714
fileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   715
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   716
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   717
    ImageEditor openOnClass:self andSelector:#fileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   718
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   719
2137dff405f0 initial checkin
tz
parents:
diff changeset
   720
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   721
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   722
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   723
        constantNamed:#'DirectoryView::FileRow fileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   724
        ifAbsentPut:[(Depth1Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 @@0 @@0 @@0 @@0 @@0 @@0 @@; @@4 @@0 @@0???0???0') ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0') ; yourself); yourself]
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   725
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   726
2137dff405f0 initial checkin
tz
parents:
diff changeset
   727
hFileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   728
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   729
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   730
    ImageEditor openOnClass:self andSelector:#hFileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   731
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   732
2137dff405f0 initial checkin
tz
parents:
diff changeset
   733
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   734
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   735
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   736
        constantNamed:#'DirectoryView::FileRow hFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   737
        ifAbsentPut:[(Depth1Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8  @0  @0 ,@0 2@0 "@0 "@0&"@;&"@4 @@0 @@0???0???0'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   738
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   739
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   740
htmlFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   741
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   742
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   743
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   744
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   745
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   746
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   747
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   748
     self htmlFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   749
     ImageEditor openOnClass:self andSelector:#htmlFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   750
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   751
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   752
2137dff405f0 initial checkin
tz
parents:
diff changeset
   753
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   754
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   755
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   756
        constantNamed:'DirectoryView::FileRow htmlFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   757
        ifAbsentPut:[(Depth4Image width:20 height:19) bits:(ByteArray fromPackedString:'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   758
DQDQDQDQDQDQDQ????????DQDQD_???????1@QDQG???L3L3<P@QDQ??L3=DL3D@@QD_?3L?P3L1DQDQG?L3MCP3L1DQDQ?3QCQCMCP??1D_<4P4QDL4O?<Q
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   759
G?L4QDL3MD??DQ?3L3QCL3S??1D_<3L4QDL4O?<QG?<3QDQCMO??DQ??L4QDP4S??1D_??=D??S???<QG???????????DQ???????????1DQDQDQDQDQDQDQ
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   760
DQDQDQDQDQDQDP@a')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   761
            colorMapFromArray:#[255 255 255 0 0 0 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   762
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   763
!
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   764
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   765
imageFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   766
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   767
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   768
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   769
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   770
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   771
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   772
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   773
     self imageFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   774
     ImageEditor openOnClass:self andSelector:#imageFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   775
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   776
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   777
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   778
    <resource: #image>
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   779
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   780
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   781
        constantNamed:'DirectoryView::FileRow imageFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   782
        ifAbsentPut:[(Depth4Image width:20 height:19) bits:(ByteArray fromPackedString:'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   783
@@@@@@@@@@@@@@DQDQDQDQ@@@@@ADQDQDQDPD@@@@QDQDQDQDAD@@@DQDQDQDQ@QD@@ADQDQDQDP@@@@@TQG]4)G50@@@@EDQ7^$+W4QDP@AQD]7R$_WDQD@
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   784
@SL6Y#$61!!DQ@@D3M&ZS''F0QDP@AL3Y&NS[FDQD@@RH%UR %-QDQ@@D"IUVB"5,QDP@AH"UUJBV5DQD@@QDQDQDQDQDQ@@DQDQDQDQDQDP@@@@@@@@@@@@@@
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   785
@@@@@@@@@@@@@@@a')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   786
            colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   787
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   788
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   789
2137dff405f0 initial checkin
tz
parents:
diff changeset
   790
imgFileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   791
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   792
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   793
    ImageEditor openOnClass:self andSelector:#imgFileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   794
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   795
2137dff405f0 initial checkin
tz
parents:
diff changeset
   796
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   797
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   798
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   799
        constantNamed:#'DirectoryView::FileRow imgFileIcon'
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   800
        ifAbsentPut:[(Depth1Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8  @0 @@0!!-F0 **0 **0 **0&**;&*&4 @B0 @N0???0???0'); colorMap:((OrderedCollection new add:(Color white); add:(Color black); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   801
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   802
2137dff405f0 initial checkin
tz
parents:
diff changeset
   803
linkedFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   804
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   805
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   806
    ImageEditor openOnClass:self andSelector:#linkedFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   807
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   808
2137dff405f0 initial checkin
tz
parents:
diff changeset
   809
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   810
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   811
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   812
        constantNamed:#'DirectoryView::FileRow linkedFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   813
        ifAbsentPut:[(Depth2Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUU@@@@UUT@@@AEUP@@@DEU@@@@PET@@@AUUP@@@AUU@@@@@AT@@@@ EP@@@B U@@@**!!T@@J**EP@B B UB*(@HATJ*@@@EP@@@@@U@@@@@AUUUUUUUUUUUUUTb') ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0') ; yourself); yourself]
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   814
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   815
2137dff405f0 initial checkin
tz
parents:
diff changeset
   816
lockedFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   817
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   818
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   819
    ImageEditor openOnClass:self andSelector:#lockedFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   820
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   821
2137dff405f0 initial checkin
tz
parents:
diff changeset
   822
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   823
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   824
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   825
        constantNamed:#'DirectoryView::FileRow lockedFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   826
        ifAbsentPut:[(Depth2Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUU(@@@UUT(@@AEUP(@@DEU@(@@PET@(@IUUP@(B!!UU@@((@AT@@*@@EP@B(@@U@@((@AT@J@(@EPB @(@U@(@@(ATJ@@@(ER @@@(U(@@@@)UUUUUUUUUUUUUTb') ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0') ; yourself); yourself]
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   827
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   828
2137dff405f0 initial checkin
tz
parents:
diff changeset
   829
protoFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   830
2137dff405f0 initial checkin
tz
parents:
diff changeset
   831
    ^self MakefileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   832
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   833
2137dff405f0 initial checkin
tz
parents:
diff changeset
   834
rcFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   835
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   836
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   837
    ImageEditor openOnClass:self andSelector:#rcFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   838
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   839
2137dff405f0 initial checkin
tz
parents:
diff changeset
   840
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   841
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   842
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   843
        constantNamed:#'DirectoryView::FileRow rcFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   844
        ifAbsentPut:[(Depth1Image new) width: 20; height: 19; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 @@0 @@0 ) 0 2P0 "@0 "@0&"P;&!! 4 @@0 @@0???0???0') ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); yourself)); mask:((ImageMask new) width: 20; height: 19; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0') ; yourself); yourself]
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   845
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   846
2137dff405f0 initial checkin
tz
parents:
diff changeset
   847
sFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   848
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   849
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   850
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   851
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   852
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   853
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   854
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   855
     self sFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   856
     ImageEditor openOnClass:self andSelector:#sFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   857
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   858
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   859
2137dff405f0 initial checkin
tz
parents:
diff changeset
   860
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   861
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   862
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   863
        constantNamed:'DirectoryView::FileRow sFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   864
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 @@0 @@0 X@0  @0 0@0 X@0&H@;&0@4 @@0 @@0???0???0')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   865
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   866
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   867
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   868
2137dff405f0 initial checkin
tz
parents:
diff changeset
   869
stFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   870
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   871
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   872
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   873
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   874
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   875
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   876
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   877
     self stFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   878
     ImageEditor openOnClass:self andSelector:#stFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   879
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   880
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   881
2137dff405f0 initial checkin
tz
parents:
diff changeset
   882
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   883
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   884
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   885
        constantNamed:'DirectoryView::FileRow stFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   886
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 A@0 A@0 [00 !!@0 1@0 Y@0&I@;&004 @@0 @@0???0???0')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   887
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   888
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   889
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   890
2137dff405f0 initial checkin
tz
parents:
diff changeset
   891
stcFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   892
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   893
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   894
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   895
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   896
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   897
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   898
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   899
     self stcFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   900
     ImageEditor openOnClass:self andSelector:#stcFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   901
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   902
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   903
2137dff405f0 initial checkin
tz
parents:
diff changeset
   904
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   905
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   906
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   907
        constantNamed:'DirectoryView::FileRow stcFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   908
        ifAbsentPut:[(Depth1Image width:20 height:19) bits:(ByteArray fromPackedString:'???9 @_0 @W2 @S0 @Q0 @_0 @O8 B@0 B@0 _L0 "R0 2P0 ZP0&JR;&3L4 @@0 @@0???0???0')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   909
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   910
            mask:((ImageMask width:20 height:19) bits:(ByteArray fromPackedString:'??0@??8@??<@??>@???@??? ???0???0???0???0???0???0???0???0???0???0???0???0_??0'); yourself); yourself]
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   911
! !
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   912
2137dff405f0 initial checkin
tz
parents:
diff changeset
   913
!DirectoryView::FileRow methodsFor:'accessing'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   914
2137dff405f0 initial checkin
tz
parents:
diff changeset
   915
baseName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   916
2137dff405f0 initial checkin
tz
parents:
diff changeset
   917
    ^baseName ? (baseName := fileName baseName)
2137dff405f0 initial checkin
tz
parents:
diff changeset
   918
2137dff405f0 initial checkin
tz
parents:
diff changeset
   919
2137dff405f0 initial checkin
tz
parents:
diff changeset
   920
2137dff405f0 initial checkin
tz
parents:
diff changeset
   921
2137dff405f0 initial checkin
tz
parents:
diff changeset
   922
2137dff405f0 initial checkin
tz
parents:
diff changeset
   923
2137dff405f0 initial checkin
tz
parents:
diff changeset
   924
2137dff405f0 initial checkin
tz
parents:
diff changeset
   925
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   926
2137dff405f0 initial checkin
tz
parents:
diff changeset
   927
fileName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   928
2137dff405f0 initial checkin
tz
parents:
diff changeset
   929
    ^fileName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   930
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   931
2137dff405f0 initial checkin
tz
parents:
diff changeset
   932
fileName: aFileName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   933
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   934
    fileName := aFileName
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   935
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   936
2137dff405f0 initial checkin
tz
parents:
diff changeset
   937
group
2137dff405f0 initial checkin
tz
parents:
diff changeset
   938
2137dff405f0 initial checkin
tz
parents:
diff changeset
   939
    ^group
2137dff405f0 initial checkin
tz
parents:
diff changeset
   940
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   941
2137dff405f0 initial checkin
tz
parents:
diff changeset
   942
iconOn:aGC
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   943
    |icon|
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   944
    
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   945
    iconKey isNil ifTrue: [
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   946
        self validateAttributes.
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   947
        (imageFromFile isNil and: [iconKey == #imageFileIcon]) ifTrue:  [
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   948
            icon := self retrieveImageFromFileAndRegisterOn: aGC
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   949
        ]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   950
    ].
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   951
    imageFromFile == true ifFalse: [
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   952
        icon := aGC registerImage: (self class perform: iconKey) key: iconKey
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   953
    ] ifTrue:  [
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   954
        icon := aGC registeredImageAt: iconKey
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   955
    ].
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   956
    ^ icon
645
9f422fbbd801 care for imageFromFile being uninitialized
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   957
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   958
    "Modified: / 18-02-1998 / 18:01:52 / cg"
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   959
    "Modified (format): / 13-09-2017 / 09:57:53 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   960
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   961
2137dff405f0 initial checkin
tz
parents:
diff changeset
   962
modified
2137dff405f0 initial checkin
tz
parents:
diff changeset
   963
2137dff405f0 initial checkin
tz
parents:
diff changeset
   964
    ^modified
2137dff405f0 initial checkin
tz
parents:
diff changeset
   965
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   966
2137dff405f0 initial checkin
tz
parents:
diff changeset
   967
owner
2137dff405f0 initial checkin
tz
parents:
diff changeset
   968
2137dff405f0 initial checkin
tz
parents:
diff changeset
   969
    ^owner
2137dff405f0 initial checkin
tz
parents:
diff changeset
   970
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   971
2137dff405f0 initial checkin
tz
parents:
diff changeset
   972
permissions
2137dff405f0 initial checkin
tz
parents:
diff changeset
   973
2137dff405f0 initial checkin
tz
parents:
diff changeset
   974
    ^permissions
2137dff405f0 initial checkin
tz
parents:
diff changeset
   975
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   976
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   977
retrieveImageFromFileAndRegisterOn: aGC
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   978
    "retrieve a bitmap image - but only if it is smaller than some limit (currently 20k)"
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   979
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   980
    |image maxImageFileSize|
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   981
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   982
    maxImageFileSize := MaxImageFileSize ? 20000.
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   983
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   984
    imageFromFile := false.       
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
   985
    (image := aGC registeredImageAt: fileName name asSymbol) isNil ifTrue:[            
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   986
        size < maxImageFileSize ifTrue:[     
2999
a173c8753a07 exception access
Claus Gittinger <cg@exept.de>
parents: 2938
diff changeset
   987
            Error handle: [:ex|]
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   988
            do:[   
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   989
                (image := Image fromFile: fileName name) notNil ifTrue:[
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   990
                    image extent y > 22 ifTrue:[         
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   991
                        image := image magnifiedBy: 22/image extent y
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   992
                    ].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   993
                    image := aGC registerImage: image key: fileName name asSymbol.
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   994
                ]
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   995
            ] 
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   996
        ].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   997
    ].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   998
    image notNil ifTrue: [imageFromFile := true. iconKey := fileName name asSymbol].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   999
    ^image
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1000
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1001
    "Modified (format): / 13-09-2017 / 09:58:19 / cg"
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
  1002
!
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
  1003
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1004
size
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1005
    size isNil ifTrue:[
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1006
        self validateAttributes.
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1007
    ].
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1008
    
607
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1009
    size isNumber ifFalse:[^ size].
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1010
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1011
    "/ ^ UnitConverter fileSizeStringFor:size.
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1012
    
607
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1013
    size < 1000        ifTrue: [^ size printString].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1014
    size < (100*1024)  ifTrue: [^(((size/1024) * 10) asInteger/10) asFloat printString, ' Kb'].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1015
    size < (1000*1024) ifTrue: [^(((size/1024)) asInteger) printString, ' Kb'].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1016
    ^(((size/1048576) * 10) asInteger/10) asFloat printString, ' Mb'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1017
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1018
    "Modified: / 13-09-2017 / 09:58:42 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1019
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1020
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1021
!DirectoryView::FileRow methodsFor:'private'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1022
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1023
validateAttributes
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1024
    |info mode suffix| 
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
  1025
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1026
    permissions := '---------' copy.
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1027
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1028
    (info := fileName info) isNil ifTrue:[
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1029
        iconKey := #lockedFileIcon.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1030
        size    := owner := group := '?'.
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1031
        ^ self
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1032
    ].        
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1033
    size   := info fileSize.
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
  1034
    modified := info modificationTime printString.
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1035
    owner  := OperatingSystem getUserNameFromID: info uid.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1036
    group  := OperatingSystem getGroupNameFromID: info gid.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1037
    mode   := info mode.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1038
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1039
    1 to:9 by:3 do:[:i|
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1040
        #((0 $x) (1 $w) (2 $r)) do:
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1041
        [:m|
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1042
            (mode bitAt:i + m first) == 1 ifTrue:[permissions at: 10 - m first - i put: m last]
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1043
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1044
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1045
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1046
    fileName isReadable ifFalse:[
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1047
        ^ iconKey := #lockedFileIcon
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1048
    ].
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1049
    info type == #symbolicLink ifTrue:[
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1050
        ^ iconKey := #linkedFileIcon
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1051
    ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1052
    suffix := fileName suffix.
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1053
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1054
    ((self class respondsTo:(iconKey := (suffix, 'FileIcon') asSymbol))
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1055
        or: [self class respondsTo: (iconKey := (fileName baseName, 'Icon') asSymbol)]
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1056
    ) ifFalse:[
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1057
        iconKey := #fileIcon.
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1058
        ((suffix = 'o') or:[suffix = 'so']) ifTrue: [
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1059
            ^ iconKey := #binaryFileIcon
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1060
        ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1061
        (Image isImageFileSuffix:suffix) ifTrue: [
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1062
            ^ iconKey := #imageFileIcon
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1063
        ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1064
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1065
        fileName isExecutableProgram ifTrue:[
3366
70c6139984a6 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1066
            ^ iconKey := #exeFileIcon
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1067
        ]
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1068
    ]
3491
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1069
c1333ee85336 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3366
diff changeset
  1070
    "Modified: / 13-09-2017 / 10:00:42 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1071
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1072
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1073
!DirectoryView class methodsFor:'documentation'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1074
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1075
version
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1076
    ^ '$Header$'
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1077
!
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1078
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1079
version_CVS
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1080
    ^ '$Header$'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1081
! !
2999
a173c8753a07 exception access
Claus Gittinger <cg@exept.de>
parents: 2938
diff changeset
  1082