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