DirectoryView.st
author Claus Gittinger <cg@exept.de>
Mon, 08 Aug 2016 14:06:59 +0200
changeset 3317 88b892a4012d
parent 3316 db4749aa5c60
child 3354 05ab9a73a9a6
permissions -rw-r--r--
#FEATURE by cg class: ImageEditor changed: #colorMapMode: #findColorMapMode converting masked image to an alpha image
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| 
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   529
                    (oldListOfFiles detect: [:fileRow| fileRow fileName = fileName] ifNone: nil) isNil
31dc0e6c143e class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 2999
diff changeset
   530
                    ifTrue: [
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
    ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   557
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   558
2137dff405f0 initial checkin
tz
parents:
diff changeset
   559
!DirectoryView methodsFor:'selection'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   560
2137dff405f0 initial checkin
tz
parents:
diff changeset
   561
selectedFileFilter
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
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   566
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   567
selectedFileFilter:aString
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   568
    "change the file filter"
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   569
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   570
    |listOfFileFilters nArgs|
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   571
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   572
    aString = selectedFileFilter ifTrue:[^ self].
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   573
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   574
    listOfFileFilters := self listOfFileFilters.
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
    "/ what is this for ?
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   577
    aString size == 0 ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   578
        listOfFileFilters remove: selectedFileFilter ifAbsent: nil
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   579
    ].
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   580
    selectedFileFilter := aString.
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   581
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   582
    ((listOfFileFilters includes: selectedFileFilter) not
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   583
    and:[selectedFileFilter notEmpty])
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   584
    ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   585
        listOfFileFilters addFirst: selectedFileFilter
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   586
    ].
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   587
    ((listOfFileFilters includes: selectedFileFilter)
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   588
    and:[fileFilterSelectAction notNil]) 
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   589
    ifTrue: [
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   590
        (nArgs := fileFilterSelectAction numArgs) == 0
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   591
        ifTrue: [
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   592
            fileFilterSelectAction value
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   593
        ] ifFalse:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   594
            nArgs == 1 ifTrue:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   595
                fileFilterSelectAction value: selectedFileFilter
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   596
            ] ifFalse:[
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   597
                self error:'bad numArgs of fileFilter action block'
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   598
            ]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   599
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
   600
    ].       
2137dff405f0 initial checkin
tz
parents:
diff changeset
   601
    self readDirectory.
999
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   602
3dc1bc073981 fixed filter for caseless fileSystems (win32)
Claus Gittinger <cg@exept.de>
parents: 991
diff changeset
   603
    "Modified: / 23.9.1998 / 16:53:05 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   604
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   605
3035
5a1ce9362a65 class: DirectoryView
Claus Gittinger <cg@exept.de>
parents: 3018
diff changeset
   606
!DirectoryView methodsFor:'startup & release'!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   607
2137dff405f0 initial checkin
tz
parents:
diff changeset
   608
closeRequest
2137dff405f0 initial checkin
tz
parents:
diff changeset
   609
2137dff405f0 initial checkin
tz
parents:
diff changeset
   610
    self release.
2137dff405f0 initial checkin
tz
parents:
diff changeset
   611
2137dff405f0 initial checkin
tz
parents:
diff changeset
   612
    super closeRequest
2137dff405f0 initial checkin
tz
parents:
diff changeset
   613
2137dff405f0 initial checkin
tz
parents:
diff changeset
   614
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
   615
2137dff405f0 initial checkin
tz
parents:
diff changeset
   616
!DirectoryView::FileRow class methodsFor:'resources'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   617
2137dff405f0 initial checkin
tz
parents:
diff changeset
   618
HFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   619
2137dff405f0 initial checkin
tz
parents:
diff changeset
   620
    ^self hFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   621
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   622
2137dff405f0 initial checkin
tz
parents:
diff changeset
   623
MakefileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   624
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   625
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   626
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   627
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   628
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   629
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   630
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   631
     self MakefileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   632
     ImageEditor openOnClass:self andSelector:#MakefileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   633
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   634
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   635
2137dff405f0 initial checkin
tz
parents:
diff changeset
   636
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   637
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   638
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   639
        constantNamed:'DirectoryView::FileRow MakefileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   640
        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
   641
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   642
            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
   643
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   644
2137dff405f0 initial checkin
tz
parents:
diff changeset
   645
binaryFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   646
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   647
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   648
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   649
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   650
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   651
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   652
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   653
     self binaryFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   654
     ImageEditor openOnClass:self andSelector:#binaryFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   655
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   656
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   657
2137dff405f0 initial checkin
tz
parents:
diff changeset
   658
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   659
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   660
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   661
        constantNamed:'DirectoryView::FileRow binaryFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   662
        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
   663
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   664
            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
   665
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   666
2137dff405f0 initial checkin
tz
parents:
diff changeset
   667
cFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   668
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   669
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   670
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   671
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   672
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   673
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   674
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   675
     self cFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   676
     ImageEditor openOnClass:self andSelector:#cFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   677
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   678
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   679
2137dff405f0 initial checkin
tz
parents:
diff changeset
   680
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   681
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   682
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   683
        constantNamed:'DirectoryView::FileRow cFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   684
        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
   685
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   686
            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
   687
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   688
2137dff405f0 initial checkin
tz
parents:
diff changeset
   689
exeFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   690
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   691
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   692
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   693
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   694
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   695
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   696
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   697
     self exeFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   698
     ImageEditor openOnClass:self andSelector:#exeFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   699
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   700
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   701
2137dff405f0 initial checkin
tz
parents:
diff changeset
   702
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   703
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   704
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   705
        constantNamed:'DirectoryView::FileRow exeFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   706
        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
   707
UUUUUUTb')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   708
            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
   709
            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
   710
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   711
2137dff405f0 initial checkin
tz
parents:
diff changeset
   712
fileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   713
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   714
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   715
    ImageEditor openOnClass:self andSelector:#fileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   716
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   717
2137dff405f0 initial checkin
tz
parents:
diff changeset
   718
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   719
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   720
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   721
        constantNamed:#'DirectoryView::FileRow fileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   722
        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
   723
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   724
2137dff405f0 initial checkin
tz
parents:
diff changeset
   725
hFileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   726
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   727
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   728
    ImageEditor openOnClass:self andSelector:#hFileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   729
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   730
2137dff405f0 initial checkin
tz
parents:
diff changeset
   731
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   732
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   733
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   734
        constantNamed:#'DirectoryView::FileRow hFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   735
        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
   736
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   737
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   738
htmlFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   739
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   740
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   741
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   742
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   743
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   744
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   745
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   746
     self htmlFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   747
     ImageEditor openOnClass:self andSelector:#htmlFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   748
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   749
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   750
2137dff405f0 initial checkin
tz
parents:
diff changeset
   751
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   752
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   753
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   754
        constantNamed:'DirectoryView::FileRow htmlFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   755
        ifAbsentPut:[(Depth4Image width:20 height:19) bits:(ByteArray fromPackedString:'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   756
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
   757
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
   758
DQDQDQDQDQDQDP@a')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   759
            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
   760
            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
   761
!
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   762
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   763
imageFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   764
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   765
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   766
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   767
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   768
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   769
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   770
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   771
     self imageFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   772
     ImageEditor openOnClass:self andSelector:#imageFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   773
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   774
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   775
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   776
    <resource: #image>
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   777
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   778
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   779
        constantNamed:'DirectoryView::FileRow imageFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   780
        ifAbsentPut:[(Depth4Image width:20 height:19) bits:(ByteArray fromPackedString:'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   781
@@@@@@@@@@@@@@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
   782
@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
   783
@@@@@@@@@@@@@@@a')
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   784
            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
   785
            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
   786
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   787
2137dff405f0 initial checkin
tz
parents:
diff changeset
   788
imgFileIcon
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   789
    "Generated by the Image Editor"
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   790
    "
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   791
    ImageEditor openOnClass:self andSelector:#imgFileIcon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   792
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   793
2137dff405f0 initial checkin
tz
parents:
diff changeset
   794
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   795
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   796
    ^Icon
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   797
        constantNamed:#'DirectoryView::FileRow imgFileIcon'
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   798
        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
   799
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   800
2137dff405f0 initial checkin
tz
parents:
diff changeset
   801
linkedFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   802
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   803
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   804
    ImageEditor openOnClass:self andSelector:#linkedFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   805
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   806
2137dff405f0 initial checkin
tz
parents:
diff changeset
   807
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   808
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   809
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   810
        constantNamed:#'DirectoryView::FileRow linkedFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   811
        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
   812
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   813
2137dff405f0 initial checkin
tz
parents:
diff changeset
   814
lockedFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   815
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   816
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   817
    ImageEditor openOnClass:self andSelector:#lockedFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   818
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   819
2137dff405f0 initial checkin
tz
parents:
diff changeset
   820
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   821
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   822
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   823
        constantNamed:#'DirectoryView::FileRow lockedFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   824
        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
   825
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   826
2137dff405f0 initial checkin
tz
parents:
diff changeset
   827
protoFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   828
2137dff405f0 initial checkin
tz
parents:
diff changeset
   829
    ^self MakefileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
   830
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   831
2137dff405f0 initial checkin
tz
parents:
diff changeset
   832
rcFileIcon
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   833
    "Generated by the Image Editor"
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   834
    "
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   835
    ImageEditor openOnClass:self andSelector:#rcFileIcon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   836
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   837
2137dff405f0 initial checkin
tz
parents:
diff changeset
   838
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   839
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   840
    ^Icon
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   841
        constantNamed:#'DirectoryView::FileRow rcFileIcon'
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
   842
        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
   843
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   844
2137dff405f0 initial checkin
tz
parents:
diff changeset
   845
sFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   846
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   847
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   848
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   849
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   850
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   851
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   852
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   853
     self sFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   854
     ImageEditor openOnClass:self andSelector:#sFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   855
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   856
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   857
2137dff405f0 initial checkin
tz
parents:
diff changeset
   858
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   859
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   860
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   861
        constantNamed:'DirectoryView::FileRow sFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   862
        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
   863
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   864
            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
   865
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   866
2137dff405f0 initial checkin
tz
parents:
diff changeset
   867
stFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   868
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   869
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   870
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   871
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   872
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   873
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   874
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   875
     self stFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   876
     ImageEditor openOnClass:self andSelector:#stFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   877
     Icon flushCachedIcons
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   878
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   879
2137dff405f0 initial checkin
tz
parents:
diff changeset
   880
    <resource: #image>
590
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   881
c2f5cd223be2 read routine changed (monitoring will be added later)
tz
parents: 516
diff changeset
   882
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   883
        constantNamed:'DirectoryView::FileRow stFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   884
        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
   885
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   886
            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
   887
!
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   888
2137dff405f0 initial checkin
tz
parents:
diff changeset
   889
stcFileIcon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   890
    "This resource specification was automatically generated
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   891
     by the ImageEditor of ST/X."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   892
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   893
    "Do not manually edit this!! If it is corrupted,
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   894
     the ImageEditor may not be able to read the specification."
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   895
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   896
    "
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   897
     self stcFileIcon inspect
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   898
     ImageEditor openOnClass:self andSelector:#stcFileIcon
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   899
     Icon flushCachedIcons
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   900
    "
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   901
2137dff405f0 initial checkin
tz
parents:
diff changeset
   902
    <resource: #image>
644
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   903
3a1a1cae7428 image format updated
tz
parents: 638
diff changeset
   904
    ^Icon
3298
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   905
        constantNamed:'DirectoryView::FileRow stcFileIcon'
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   906
        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
   907
            colorMapFromArray:#[255 255 255 0 0 0]
d388699ae421 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3044
diff changeset
   908
            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
   909
! !
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   910
2137dff405f0 initial checkin
tz
parents:
diff changeset
   911
!DirectoryView::FileRow methodsFor:'accessing'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   912
2137dff405f0 initial checkin
tz
parents:
diff changeset
   913
baseName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   914
2137dff405f0 initial checkin
tz
parents:
diff changeset
   915
    ^baseName ? (baseName := fileName baseName)
2137dff405f0 initial checkin
tz
parents:
diff changeset
   916
2137dff405f0 initial checkin
tz
parents:
diff changeset
   917
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
fileName
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
2137dff405f0 initial checkin
tz
parents:
diff changeset
   930
fileName: aFileName
2137dff405f0 initial checkin
tz
parents:
diff changeset
   931
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   932
    fileName := aFileName
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   933
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   934
2137dff405f0 initial checkin
tz
parents:
diff changeset
   935
group
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
2137dff405f0 initial checkin
tz
parents:
diff changeset
   940
iconOn:aGC
2137dff405f0 initial checkin
tz
parents:
diff changeset
   941
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   942
    |icon|
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   943
    iconKey isNil 
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   944
    ifTrue: 
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   945
    [
614
41cd940faa45 faster dir reading
tz
parents: 607
diff changeset
   946
        self validateAttributes.
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   947
        (imageFromFile isNil and: [iconKey == #imageFileIcon])
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   948
            ifTrue:  [icon := self retrieveImageFromFileAndRegisterOn: aGC]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   949
    ].
645
9f422fbbd801 care for imageFromFile being uninitialized
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   950
    imageFromFile == true
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   951
        ifFalse: [icon := aGC registerImage: (self class perform: iconKey) key: iconKey]
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   952
        ifTrue:  [icon := aGC registeredImageAt: iconKey].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   953
    ^icon
645
9f422fbbd801 care for imageFromFile being uninitialized
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   954
9f422fbbd801 care for imageFromFile being uninitialized
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   955
    "Modified: / 18.2.1998 / 18:01:52 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   956
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   957
2137dff405f0 initial checkin
tz
parents:
diff changeset
   958
modified
2137dff405f0 initial checkin
tz
parents:
diff changeset
   959
2137dff405f0 initial checkin
tz
parents:
diff changeset
   960
    ^modified
2137dff405f0 initial checkin
tz
parents:
diff changeset
   961
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   962
2137dff405f0 initial checkin
tz
parents:
diff changeset
   963
owner
2137dff405f0 initial checkin
tz
parents:
diff changeset
   964
2137dff405f0 initial checkin
tz
parents:
diff changeset
   965
    ^owner
2137dff405f0 initial checkin
tz
parents:
diff changeset
   966
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   967
2137dff405f0 initial checkin
tz
parents:
diff changeset
   968
permissions
2137dff405f0 initial checkin
tz
parents:
diff changeset
   969
2137dff405f0 initial checkin
tz
parents:
diff changeset
   970
    ^permissions
2137dff405f0 initial checkin
tz
parents:
diff changeset
   971
!
2137dff405f0 initial checkin
tz
parents:
diff changeset
   972
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   973
retrieveImageFromFileAndRegisterOn: aGC
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   974
    "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
   975
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   976
    |image maxImageFileSize|
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   977
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   978
    maxImageFileSize := MaxImageFileSize ? 20000.
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   979
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   980
    imageFromFile := false.       
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   981
    (image := aGC registeredImageAt: fileName name asSymbol) isNil
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   982
    ifTrue:[            
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   983
        size < maxImageFileSize ifTrue:[     
2999
a173c8753a07 exception access
Claus Gittinger <cg@exept.de>
parents: 2938
diff changeset
   984
            Error handle: [:ex|]
1385
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   985
            do:[   
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   986
                (image := Image fromFile: fileName name) notNil ifTrue:[
cbe7e7763105 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   987
                    image extent y > 22 ifTrue:[         
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   988
                        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
   989
                    ].
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
   990
                    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
   991
                ]
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
        ].
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
    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
   996
    ^image
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
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
   999
size
607
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1000
    size isNumber ifFalse:[^ size].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1001
    size < 1000        ifTrue: [^ size printString].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1002
    size < (100*1024)  ifTrue: [^(((size/1024) * 10) asInteger/10) asFloat printString, ' Kb'].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1003
    size < (1000*1024) ifTrue: [^(((size/1024)) asInteger) printString, ' Kb'].
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1004
    ^(((size/1048576) * 10) asInteger/10) asFloat printString, ' Mb'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1005
607
8b6cd53f93b8 geometry
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1006
    "Modified: / 6.2.1998 / 03:38:45 / cg"
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1007
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1008
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1009
!DirectoryView::FileRow methodsFor:'private'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1010
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1011
validateAttributes
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1012
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1013
    |info mode suffix| 
638
a82372d61cf8 avoid rereading of file images + multiple listings of same filter matching files
tz
parents: 620
diff changeset
  1014
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1015
    permissions := String new:9 withAll:$-.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1016
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1017
    (info := fileName info) isNil ifTrue:[
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1018
        iconKey := #lockedFileIcon.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1019
        size    := owner := group := '?'.
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1020
        ^ self
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1021
    ].        
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1022
    size   := info size.
1627
e14aa2449e97 change modified to modificationTime
penk
parents: 1385
diff changeset
  1023
    modified := info modificationTime printString.
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1024
    owner  := OperatingSystem getUserNameFromID: info uid.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1025
    group  := OperatingSystem getGroupNameFromID: info gid.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1026
    mode   := info mode.
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1027
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1028
    1 to:9 by:3 do:[:i|
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1029
        #((0 $x) (1 $w) (2 $r)) do:
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1030
        [:m|
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1031
            (mode bitAt:i + m first) == 1 ifTrue:[permissions at: 10 - m first - i put: m last]
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1032
        ]
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1033
    ].
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1034
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1035
    fileName isReadable ifFalse:[
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1036
        ^iconKey := #lockedFileIcon
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1037
    ].
2938
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1038
    info type == #symbolicLink ifTrue:[
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1039
        ^ iconKey := #linkedFileIcon
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1040
    ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1041
    suffix := fileName suffix.
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1042
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1043
    ((DirectoryView::FileRow class implements: (iconKey := (suffix, 'FileIcon') asSymbol))
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1044
        or: [DirectoryView::FileRow class implements: (iconKey := (fileName baseName, 'Icon') asSymbol)]
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1045
    ) ifFalse:[
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1046
        iconKey := #fileIcon.
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1047
        ((suffix = 'o') or:[suffix = 'so']) ifTrue: [
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1048
            ^iconKey := #binaryFileIcon
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1049
        ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1050
        (Image isImageFileSuffix:suffix) ifTrue: [
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1051
            ^iconKey := #imageFileIcon
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1052
        ].
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1053
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1054
        fileName isExecutableProgram ifTrue:[
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1055
            ^iconKey := #exeFileIcon
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1056
        ]
8e9207531826 | replaced by or:
Claus Gittinger <cg@exept.de>
parents: 2878
diff changeset
  1057
    ]
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1058
! !
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1059
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1060
!DirectoryView class methodsFor:'documentation'!
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1061
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1062
version
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1063
    ^ '$Header$'
3299
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1064
!
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1065
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1066
version_CVS
13b7e24a9074 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 3298
diff changeset
  1067
    ^ '$Header$'
424
2137dff405f0 initial checkin
tz
parents:
diff changeset
  1068
! !
2999
a173c8753a07 exception access
Claus Gittinger <cg@exept.de>
parents: 2938
diff changeset
  1069