SettingsDialog.st
author Stefan Vogel <sv@exept.de>
Fri, 10 Aug 2012 12:45:42 +0200
changeset 11739 fe57ab24ba67
parent 10905 7ec7015ab744
child 11982 027f2e7a175e
permissions -rw-r--r--
changed: #saveSettingsAsDefaultSettings #saveSettingsTo:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     1
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     2
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     3
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     4
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     5
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     6
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     8
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     9
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    10
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    11
"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
7021197a578f initial checkin
penk
parents:
diff changeset
    13
7021197a578f initial checkin
penk
parents:
diff changeset
    14
ApplicationModel subclass:#SettingsDialog
7021197a578f initial checkin
penk
parents:
diff changeset
    15
	instanceVariableNames:'requestor subCanvasApplicationHolder help doReload doSave
7021197a578f initial checkin
penk
parents:
diff changeset
    16
		enableReload enableHelp enableOK selectedItem applicationList
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
    17
		categoryIcons lastSelection whyDisabledInfoHolder'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    18
	classVariableNames:'ApplicationList IconList'
7021197a578f initial checkin
penk
parents:
diff changeset
    19
	poolDictionaries:''
7021197a578f initial checkin
penk
parents:
diff changeset
    20
	category:'Interface-Smalltalk'
7021197a578f initial checkin
penk
parents:
diff changeset
    21
!
7021197a578f initial checkin
penk
parents:
diff changeset
    22
7021197a578f initial checkin
penk
parents:
diff changeset
    23
HierarchicalList subclass:#HierarchicalApplicationList
7021197a578f initial checkin
penk
parents:
diff changeset
    24
	instanceVariableNames:''
7021197a578f initial checkin
penk
parents:
diff changeset
    25
	classVariableNames:''
7021197a578f initial checkin
penk
parents:
diff changeset
    26
	poolDictionaries:''
7021197a578f initial checkin
penk
parents:
diff changeset
    27
	privateIn:SettingsDialog
7021197a578f initial checkin
penk
parents:
diff changeset
    28
!
7021197a578f initial checkin
penk
parents:
diff changeset
    29
6688
a191e7822668 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6635
diff changeset
    30
HierarchicalItemWithLabelAndIcon subclass:#ApplicationItem
a191e7822668 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6635
diff changeset
    31
	instanceVariableNames:'application applicationClass nameString'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    32
	classVariableNames:''
7021197a578f initial checkin
penk
parents:
diff changeset
    33
	poolDictionaries:''
7021197a578f initial checkin
penk
parents:
diff changeset
    34
	privateIn:SettingsDialog::HierarchicalApplicationList
7021197a578f initial checkin
penk
parents:
diff changeset
    35
!
7021197a578f initial checkin
penk
parents:
diff changeset
    36
7021197a578f initial checkin
penk
parents:
diff changeset
    37
!SettingsDialog class methodsFor:'documentation'!
7021197a578f initial checkin
penk
parents:
diff changeset
    38
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    39
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    40
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    41
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    42
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    43
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    44
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    45
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    46
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    47
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    48
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    49
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    50
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    51
!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    52
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    53
documentation
7021197a578f initial checkin
penk
parents:
diff changeset
    54
"
6019
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    55
    This is an application which presents a hierarchy of settings applications.
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    56
    It is used (among others) in the launcher's and filebrowser's settings-dialogs.
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    57
    However, it is rather generic and can be setup for any applications setting dialog
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    58
    See class>>examples for more info.
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    59
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    60
    [author:]
7021197a578f initial checkin
penk
parents:
diff changeset
    61
        Christian Penk, eXept Software AG
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    62
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    63
    [see also:]
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    64
        AbstractLauncherApplication defaultSettingsApplicationList 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    65
"
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    66
!
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    67
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    68
examples
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    69
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    70
"
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    71
  start a Settings Dialog with a language Settings Application under root
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    72
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    73
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    74
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    75
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    76
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    77
                withName:'Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    78
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    79
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    80
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    81
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    82
  start a Settings Dialog with a language Settings Application under root/Test
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    83
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    84
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    85
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    86
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    87
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    88
                withName:'Test/Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    89
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    90
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    91
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    92
  start a Settings Dialog with a language Settings Application under root/Test
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    93
  with an other category test icon
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    94
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    95
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    96
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    97
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    98
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    99
                withName:'Test/Language'.
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   100
    settingsApp addIcon:ToolbarIconLibrary start22x22Icon forCategory:'Test'.
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   101
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   102
                                                                [exEnd]
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   103
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   104
  start a Settings Dialog with a language and memory Settings Application 
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   105
  in different categories
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   106
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   107
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   108
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   109
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   110
    settingsApp addIcon:ToolbarIconLibrary start22x22Icon forCategory:'Test'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   111
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   112
                withName:'Test/Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   113
    settingsApp addApplClass:#'AbstractSettingsApplication::MemorySettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   114
                withName:'Test2/Memory'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   115
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   116
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   117
"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   118
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   119
5399
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   120
!SettingsDialog class methodsFor:'initialization'!
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   121
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   122
initialize
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   123
    AbstractSettingsApplication autoload.
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   124
! !
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   125
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   126
!SettingsDialog class methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
   127
7021197a578f initial checkin
penk
parents:
diff changeset
   128
itemClass
7021197a578f initial checkin
penk
parents:
diff changeset
   129
7021197a578f initial checkin
penk
parents:
diff changeset
   130
    ^ SettingsDialog::HierarchicalApplicationList::ApplicationItem
7021197a578f initial checkin
penk
parents:
diff changeset
   131
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   132
7021197a578f initial checkin
penk
parents:
diff changeset
   133
!SettingsDialog class methodsFor:'application icons'!
7021197a578f initial checkin
penk
parents:
diff changeset
   134
7021197a578f initial checkin
penk
parents:
diff changeset
   135
defaultSettingsAppIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   136
7021197a578f initial checkin
penk
parents:
diff changeset
   137
    ^ self settingsIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   138
!
7021197a578f initial checkin
penk
parents:
diff changeset
   139
7021197a578f initial checkin
penk
parents:
diff changeset
   140
settingsIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   141
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   142
     by the ImageEditor of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   143
7021197a578f initial checkin
penk
parents:
diff changeset
   144
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   145
     the ImageEditor may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   146
7021197a578f initial checkin
penk
parents:
diff changeset
   147
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   148
     self settingsIcon inspect
7021197a578f initial checkin
penk
parents:
diff changeset
   149
     ImageEditor openOnClass:self andSelector:#settingsIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   150
     Icon flushCachedIcons
7021197a578f initial checkin
penk
parents:
diff changeset
   151
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   152
7021197a578f initial checkin
penk
parents:
diff changeset
   153
    <resource: #image>
7021197a578f initial checkin
penk
parents:
diff changeset
   154
7021197a578f initial checkin
penk
parents:
diff changeset
   155
    ^Icon
8476
84fa59f05e50 image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents: 8268
diff changeset
   156
        constantNamed:#'SettingsDialog class settingsIcon'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   157
        ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
7021197a578f initial checkin
penk
parents:
diff changeset
   158
@@BP#8>O#8>M  @@@@@@@@@@@@@@@@BJ%9&Y&Y&Y%R^B@@@@@@@@@@@@@@BI&J^(*J"(*JZTIIFQ$YFQ$YH@@@@@ JN#(:N#(:N#(9.V%)ZV%)ZKZP@@@HOU
7021197a578f initial checkin
penk
parents:
diff changeset
   159
4=OS4=OL3,''I0<B;/]F3*TE?@@BC5MKR4-KM,\^:.MJ:-;21/:1D_@@@ =SR4-KM3<+K/<J01,R20+R+QG0@@HOT4-KR/,^?-\[H1(Q^WW"1*4Q<@@BC5MKR
7021197a578f initial checkin
penk
parents:
diff changeset
   160
,-CO1<>/+(X*F1(S,Z1D_@@@ =SR4-J:2,[J0X  TU!!BE+F$GS!!=@HOT,+WK.\J/28\&TV=EKAV1RELG  BC5L7H0-KB/HT TV-CKA8>TG@=_H8M ;[H1+::
7021197a578f initial checkin
penk
parents:
diff changeset
   161
-;8\TWECKBD9)T=0]R40AXOE2;F5-;:/G6)EKBD?ZF5KV#ITJ0M>''*B_''ZF]''5,(KA8)X8ENU#XR@ )L^1$YFQ$YFQ$WBA PE@QMVSDON82S@@@@@@@@@@@@
7021197a578f initial checkin
penk
parents:
diff changeset
   162
@@A_@F)IU#DQMWH@@@@@@@@@@@@@@@@@@F1JWC\LMJI''^ @@@@@@@@@@@@@@@F9GU28ROGI%+VY4@@@@@@@@@@@@@GIFXC(IL9(@^VR*X''\@@@@@@@@@@@AU
7021197a578f initial checkin
penk
parents:
diff changeset
   163
IPXKP@@@@@A3XZ4#@@@@@@@@@@@@# 8AK90@@@@@@GX"T @a') ; colorMapFromArray:#[0 0 0 0 60 60 0 84 84 4 45 45 21 20 15 38 38 38 38 192 192 43 43 43 45 45 45 45 151 151 46 99 99 46 147 147 46 151 151 47 47 47 47 88 88 47 151 151 48 48 48 48 144 144 48 145 145 56 53 38 57 57 49 59 52 40 62 56 43 65 65 53 65 65 65 67 67 54 68 68 68 70 70 70 72 64 47 72 72 35 72 72 72 73 69 48 73 73 73 74 74 74 80 44 10 80 62 43 81 81 24 84 132 132 85 85 76 86 86 36 86 86 86 87 87 49 87 87 77 87 193 193 88 88 88 91 101 101 92 193 193 94 117 117 97 97 97 97 193 193 98 195 195 99 120 120 101 75 31 101 107 89 101 193 193 102 193 193 103 103 103 104 86 69 106 193 193 107 120 120 107 121 121 109 109 109 110 96 70 111 78 42 111 119 119 113 113 60 113 113 113 115 115 115 116 116 56 116 116 116 116 145 145 118 147 147 119 121 85 121 150 150 122 151 151 122 152 148 124 124 124 124 146 139 124 151 149 127 118 78 127 119 78 128 128 128 129 120 112 133 157 157 135 216 216 137 137 137 139 207 207 140 206 206 141 141 141 141 201 201 141 202 202 142 136 75 142 201 201 143 128 88 143 143 88 144 144 144 144 204 204 145 85 24 146 126 100 147 82 13 148 83 17 148 86 24 148 123 91 148 127 98 149 122 89 150 150 150 151 151 151 152 152 152 152 155 155 153 129 100 154 154 154 156 156 156 156 199 199 157 157 157 158 158 158 159 159 159 160 160 160 162 179 179 163 161 159 163 163 162 164 151 101 164 160 156 164 163 161 165 165 150 165 165 165 168 168 168 169 169 62 171 171 171 172 172 71 174 117 58 177 177 177 178 178 89 185 174 113 186 178 115 186 186 115 189 179 116 189 189 115 189 189 132 190 190 139 192 192 142 192 192 192 193 193 154 194 194 194 196 196 155 197 197 159 200 200 168 202 202 174 202 202 202 204 204 102 205 205 97 206 206 149 210 210 144 210 210 149 213 213 103 213 213 213 215 215 164 215 215 215 227 212 124 227 213 140 227 217 124 227 220 124 227 227 124 234 156 79 236 236 197 239 214 144 243 201 148 243 243 146 243 243 155 244 244 147 245 232 157 247 165 83 248 215 149 248 231 149 255 170 86 255 227 156 255 228 156 255 229 156 255 230 156 255 231 156 255 233 168 255 234 156 255 235 156 255 235 193 255 236 156 255 237 156 255 238 156 255 239 156 255 239 168 255 240 156 255 240 168 255 241 156 255 242 156 255 242 168 255 243 156 255 244 156 255 244 168 255 245 156 255 245 193 255 246 156 255 247 156 255 248 156 255 248 168 255 249 156 255 250 156 255 250 168 255 251 156 255 251 168 255 252 156 255 253 156 255 253 168 255 255 156 255 255 168 255 255 193 255 255 200]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'O<@@_>@@???@??? ???0???0???0???0???0???8???8???<???<???<???<???8@B? @A?0@C?8@G=<@G0<@G0\') ; yourself); yourself]
5892
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   164
!
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   165
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   166
settingsIconOld
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   167
    <resource: #programImage>
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   168
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   169
    ^ self settingsIconOld.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   170
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   171
4397
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   172
!SettingsDialog class methodsFor:'defaults'!
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   173
5892
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   174
defaultIcon
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   175
    <resource: #programImage>
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   176
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   177
    ^ ToolbarIconLibrary stxSettings24x24Icon
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   178
!
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   179
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   180
defaultSettingsApplicationList
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   181
    ^ #(          
9859
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   182
        #('Language'                            #'AbstractSettingsApplication::LanguageSettingsAppl'            )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   183
        #('Keyboard Mappings'                   #'AbstractSettingsApplication::KbdMappingSettingsAppl'          )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   184
        #('ViewStyle'                           #'AbstractSettingsApplication::MiscDisplaySettingsAppl'         )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   185
        #('ViewStyle/Style'                     #'AbstractSettingsApplication::StyleSettingsAppl'               )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   186
        #('ViewStyle/Other'                     #'AbstractSettingsApplication::MiscDisplay2SettingsAppl'        )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   187
        #('ViewStyle/Fonts'                     #'AbstractSettingsApplication::FontSettingsAppl'                )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   188
        #('System Messages'                     #'AbstractSettingsApplication::SystemMessageSettingsAppl'       )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   189
        #('Memory'                              #'AbstractSettingsApplication::MemorySettingsAppl'              )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   190
        #('Processor & Scheduler'               #'AbstractSettingsApplication::ProcessorSchedulerSettingsAppl'  )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   191
        #('Tools'                               #'AbstractSettingsApplication::ToolsSettingsAppl'               )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   192
        #('Tools/Editor'                        #'AbstractSettingsApplication::EditSettingsAppl'                )
10905
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   193
        #('Tools/Editor/Code Editor 2'          #'Tools::CodeView2SettingsAppl'                                 )
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   194
        #('Tools/Editor/Syntax Color'           #'AbstractSettingsApplication::SyntaxColorSettingsAppl'         )
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   195
        #('Tools/Editor/Code Format'            #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl'    )
9859
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   196
        #('Tools/System Browser'                #'AbstractSettingsApplication::SystemBrowserSettingsAppl'       )
10905
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   197
        #('Tools/System Browser/Code Generator' #'AbstractSettingsApplication::CodeGeneratorSettingsAppl'       )
9859
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   198
        #('Tools/Changes'                       #'AbstractSettingsApplication::ChangeFileSettingsAppl'          )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   199
        #('Tools/Debugger'                      #'AbstractSettingsApplication::DebuggerSettingsAppl'            )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   200
        #('Tools/Compiler'                      #'AbstractSettingsApplication::GeneralCompilerSettingsAppl'     )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   201
        #('Tools/Compiler/ByteCode'             #'AbstractSettingsApplication::ByteCodeCompilerSettingsAppl'    )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   202
        #('Tools/Compiler/STC'                  #'AbstractSettingsApplication::STCCompilerSettingsAppl'         )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   203
        #('Tools/Compiler/Build'                #'AbstractSettingsApplication::BuildSettingsAppl'         )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   204
        #('Source Code Management'              #'AbstractSettingsApplication::SourceCodeManagementSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   205
        "/ see initializeSettingsList for how the following is expanded...
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   206
        #('Source Code Management/[% managerTypeName]'     
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   207
                                                '[ AbstractSourceCodeManager availableManagers 
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   208
                                                     collect:[:each | each settingsApplicationClass] ]'    
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   209
                                                                                                            '[% defaultIcon]' )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   210
"/        #('Source Code Management/CVS'          #'CVSSourceCodeManagementSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   211
"/        #('Source Code Management/PerForce'     #'P4SourceCodeManagementSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   212
"/        #('Source Code Management/SVN'          #'SVN::SettingsApp' )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   213
"/        #('Source Code Management/Store'        #'StoreSourceCodeManagementSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   214
"/        #('Source Code Management/SmallTeam'    #'SmallTeamSourceCodeManagementSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   215
        #('Printer'                             #'AbstractSettingsApplication::PrinterSettingsAppl'             )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   216
        #('Display'                             #'AbstractSettingsApplication::DisplaySettingsAppl'             )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   217
        #('Communication'                       nil                                                         #communicationIcon)
9275
bff5fac9e455 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9186
diff changeset
   218
9859
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   219
        #('Communication/Logging'               #'AbstractSettingsApplication::CommunicationLoggingSettingsAppl')
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   220
        #('Communication/RDoIt'                 #'AbstractSettingsApplication::RDoItServerSettingsAppl'         )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   221
        #('Communication/OSI Protocol'          #'AbstractSettingsApplication::OsiSettingsAppl'                 )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   222
        #('Communication/Misc'                  #'AbstractSettingsApplication::MiscCommunicationSettingsAppl'   )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   223
        #('Communication/SQLServer'             #'AbstractSettingsApplication::SQLServerSettingsAppl'           )
38ac3e126c5b changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9821
diff changeset
   224
        #('Communication/HTTPServer'            #'AbstractSettingsApplication::HTTPStartServerSettingsApplication'   )
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   225
    ) asOrderedCollection
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   226
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   227
    "Modified: / 16-12-2002 / 18:12:28 / penk"
10396
1fef9bc97b89 - per-tool preference for CodeView2
vrany
parents: 9859
diff changeset
   228
    "Modified: / 26-07-2011 / 10:42:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10905
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   229
    "Modified: / 25-11-2011 / 15:28:42 / cg"
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   230
!
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   231
4397
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   232
expandParents
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   233
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   234
    ^ true
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   235
!
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   236
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   237
resourcePackName
7873
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   238
    "return the name which is used as the fileNameBase of my resource file.
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   239
     Here, use the same resources as the Launcher"
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   240
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   241
    ^ AbstractLauncherApplication resourcePackName
4397
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   242
! !
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   243
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   244
!SettingsDialog class methodsFor:'interface specs'!
7021197a578f initial checkin
penk
parents:
diff changeset
   245
7021197a578f initial checkin
penk
parents:
diff changeset
   246
windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   247
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   248
     by the UIPainter of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   249
7021197a578f initial checkin
penk
parents:
diff changeset
   250
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   251
     the UIPainter may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   252
7021197a578f initial checkin
penk
parents:
diff changeset
   253
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   254
     UIPainter new openOnClass:SettingsDialog andSelector:#windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   255
     SettingsDialog new openInterface:#windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   256
     SettingsDialog open
7021197a578f initial checkin
penk
parents:
diff changeset
   257
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   258
7021197a578f initial checkin
penk
parents:
diff changeset
   259
    <resource: #canvas>
7021197a578f initial checkin
penk
parents:
diff changeset
   260
7021197a578f initial checkin
penk
parents:
diff changeset
   261
    ^ 
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   262
     #(FullSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   263
        name: windowSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   264
        window: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   265
       (WindowSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   266
          label: 'Settings Dialog'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   267
          name: 'Settings Dialog'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   268
          min: (Point 10 10)
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   269
          bounds: (Rectangle 0 0 789 642)
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   270
          menu: mainMenu
5892
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   271
          icon: defaultIcon
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   272
        )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   273
        component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   274
       (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   275
          collection: (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   276
           (VariableHorizontalPanelSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   277
              name: 'VariableHorizontalPanel1'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   278
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   279
              showHandle: true
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   280
              snapMode: both
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   281
              component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   282
             (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   283
                collection: (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   284
                 (ViewSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   285
                    name: 'Box1'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   286
                    component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   287
                   (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   288
                      collection: (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   289
                       (HierarchicalListViewSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   290
                          name: 'HierarchicalListView1'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   291
                          layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1)
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   292
                          model: selectedItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   293
                          hasHorizontalScrollBar: true
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   294
                          hasVerticalScrollBar: true
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   295
                          listModel: applicationList
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   296
                          useIndex: false
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   297
                          highlightMode: label
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   298
                          showLeftIndicators: false
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   299
                          indicatorSelector: doIndicatorClick:
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   300
                        )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   301
                       (HorizontalPanelViewSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   302
                          name: 'HorizontalPanel2'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   303
                          layout: (LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   304
                          visibilityChannel: loadAndSaveSettingsItemVisible
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   305
                          horizontalLayout: fitSpace
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   306
                          verticalLayout: center
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   307
                          horizontalSpace: 3
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   308
                          verticalSpace: 3
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   309
                          component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   310
                         (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   311
                            collection: (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   312
                             (ActionButtonSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   313
                                label: 'Save'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   314
                                name: 'Button3'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   315
                                translateLabel: true
7719
5ecbb0ae6799 tabability
Claus Gittinger <cg@exept.de>
parents: 7613
diff changeset
   316
                                tabable: true
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   317
                                model: saveSettingsWithoutAskingForFile
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   318
                                extent: (Point 126 22)
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   319
                              )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   320
                             (ActionButtonSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   321
                                label: 'Load From...'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   322
                                name: 'Button2'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   323
                                translateLabel: true
7719
5ecbb0ae6799 tabability
Claus Gittinger <cg@exept.de>
parents: 7613
diff changeset
   324
                                tabable: true
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   325
                                model: loadSettingsFromFile
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   326
                                extent: (Point 126 22)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   327
                              )
7021197a578f initial checkin
penk
parents:
diff changeset
   328
                             )
7021197a578f initial checkin
penk
parents:
diff changeset
   329
                           
7021197a578f initial checkin
penk
parents:
diff changeset
   330
                          )
7021197a578f initial checkin
penk
parents:
diff changeset
   331
                        )
7021197a578f initial checkin
penk
parents:
diff changeset
   332
                       )
7021197a578f initial checkin
penk
parents:
diff changeset
   333
                     
7021197a578f initial checkin
penk
parents:
diff changeset
   334
                    )
7021197a578f initial checkin
penk
parents:
diff changeset
   335
                  )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   336
                 (ViewSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   337
                    name: 'Box2'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   338
                    component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   339
                   (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   340
                      collection: (
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   341
                       (ViewSpec
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   342
                          name: 'DisabledSettingsBox'
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   343
                          layout: (LayoutFrame 0 0 0 0 0 1 0 1)
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   344
                          initiallyInvisible: true
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   345
                          component: 
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   346
                         (SpecCollection
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   347
                            collection: (
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   348
                             (LabelSpec
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   349
                                label: 'whyDisabledLabel'
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   350
                                name: 'whyDisabledLabel'
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   351
                                layout: (LayoutFrame 0 0 0 0 0 1 0 1)
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   352
                                translateLabel: true
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   353
                                labelChannel: whyDisabledInfoHolder
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   354
                              )
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   355
                             )
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   356
                           
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   357
                          )
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   358
                        )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   359
                       (SubCanvasSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   360
                          name: 'SubCanvas'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   361
                          layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1)
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   362
                          level: -1
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   363
                          hasHorizontalScrollBar: false
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   364
                          hasVerticalScrollBar: false
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   365
                          clientHolder: subCanvasApplicationHolder
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   366
                          createNewBuilder: false
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   367
                          postBuildCallback: postBuildSubCanvas:
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   368
                        )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   369
                       (HorizontalPanelViewSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   370
                          name: 'HorizontalPanel1'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   371
                          layout: (LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   372
                          horizontalLayout: fitSpace
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   373
                          verticalLayout: center
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   374
                          horizontalSpace: 3
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   375
                          verticalSpace: 3
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   376
                          component: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   377
                         (SpecCollection
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   378
                            collection: (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   379
                             (ActionButtonSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   380
                                label: 'Apply'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   381
                                name: 'Apply'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   382
                                translateLabel: true
7719
5ecbb0ae6799 tabability
Claus Gittinger <cg@exept.de>
parents: 7613
diff changeset
   383
                                tabable: true
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   384
                                model: doSave
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   385
                                enableChannel: enableOK
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   386
                                extent: (Point 168 22)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   387
                              )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   388
                             (ActionButtonSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   389
                                label: 'Discard'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   390
                                name: 'Reload'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   391
                                translateLabel: true
7719
5ecbb0ae6799 tabability
Claus Gittinger <cg@exept.de>
parents: 7613
diff changeset
   392
                                tabable: true
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   393
                                model: doReload
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   394
                                enableChannel: enableReload
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   395
                                extent: (Point 169 22)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   396
                              )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   397
                             (ActionButtonSpec
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   398
                                label: 'Help'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   399
                                name: 'Help'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   400
                                translateLabel: true
7719
5ecbb0ae6799 tabability
Claus Gittinger <cg@exept.de>
parents: 7613
diff changeset
   401
                                tabable: true
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   402
                                model: help
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   403
                                enableChannel: enableHelp
6024
ab51dc9ad449 *** empty log message ***
ca
parents: 6020
diff changeset
   404
                                extent: (Point 169 22)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   405
                              )
7021197a578f initial checkin
penk
parents:
diff changeset
   406
                             )
7021197a578f initial checkin
penk
parents:
diff changeset
   407
                           
7021197a578f initial checkin
penk
parents:
diff changeset
   408
                          )
7021197a578f initial checkin
penk
parents:
diff changeset
   409
                        )
7021197a578f initial checkin
penk
parents:
diff changeset
   410
                       )
7021197a578f initial checkin
penk
parents:
diff changeset
   411
                     
7021197a578f initial checkin
penk
parents:
diff changeset
   412
                    )
7021197a578f initial checkin
penk
parents:
diff changeset
   413
                  )
7021197a578f initial checkin
penk
parents:
diff changeset
   414
                 )
7021197a578f initial checkin
penk
parents:
diff changeset
   415
               
7021197a578f initial checkin
penk
parents:
diff changeset
   416
              )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   417
              handles: (Any 0.3375 1.0)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   418
            )
7021197a578f initial checkin
penk
parents:
diff changeset
   419
           )
7021197a578f initial checkin
penk
parents:
diff changeset
   420
         
7021197a578f initial checkin
penk
parents:
diff changeset
   421
        )
7021197a578f initial checkin
penk
parents:
diff changeset
   422
      )
7021197a578f initial checkin
penk
parents:
diff changeset
   423
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   424
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   425
!SettingsDialog class methodsFor:'menu actions'!
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   426
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
   427
askForFileAndSaveSettings
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   428
    |fileName resources|
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   429
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   430
    resources := self classResources.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   431
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   432
    fileName := Dialog 
9608
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   433
        requestFileNameForSave:(resources string:'Save Settings in File') 
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   434
        default:'settings.stx'
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   435
        ok:(resources string:'Save') 
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   436
        abort:(resources string:'Cancel') 
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   437
        pattern:'*.stx'
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   438
        fromDirectory:'.'.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   439
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   440
    fileName size ~~ 0 ifTrue:[
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   441
        "not canceled"
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   442
        self saveSettingsTo:fileName.
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   443
    ]
9608
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   444
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   445
    "Modified: / 27-10-2010 / 11:24:54 / cg"
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   446
!
14296f826d27 next step
penk
parents: 4740
diff changeset
   447
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   448
saveSettingsAsDefaultSettings
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   449
    | file |
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   450
11739
fe57ab24ba67 changed:
Stefan Vogel <sv@exept.de>
parents: 10905
diff changeset
   451
    file := Filename currentDirectory construct:UserPreferences defaultSettingsFilename.
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   452
    self saveSettingsTo:file.
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   453
!
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   454
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   455
saveSettingsTo:file
14296f826d27 next step
penk
parents: 4740
diff changeset
   456
    [
14296f826d27 next step
penk
parents: 4740
diff changeset
   457
        UserPreferences current saveIn:file.
14296f826d27 next step
penk
parents: 4740
diff changeset
   458
    ] on:StreamError do:[:ex|
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   459
        self warn:(self resources 
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   460
                stringWithCRs:'Cannot save settings into: %1\(%2)' 
11739
fe57ab24ba67 changed:
Stefan Vogel <sv@exept.de>
parents: 10905
diff changeset
   461
                with:(file asAbsoluteFilename asString) 
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   462
                with:ex description).
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   463
    ]
14296f826d27 next step
penk
parents: 4740
diff changeset
   464
!
14296f826d27 next step
penk
parents: 4740
diff changeset
   465
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
   466
saveSettingsWithoutAskingForFile
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   467
    self saveSettingsAsDefaultSettings.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   468
! !
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   469
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   470
!SettingsDialog class methodsFor:'menu specs'!
7021197a578f initial checkin
penk
parents:
diff changeset
   471
7021197a578f initial checkin
penk
parents:
diff changeset
   472
mainMenu
7021197a578f initial checkin
penk
parents:
diff changeset
   473
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   474
     by the MenuEditor of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   475
7021197a578f initial checkin
penk
parents:
diff changeset
   476
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   477
     the MenuEditor may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   478
7021197a578f initial checkin
penk
parents:
diff changeset
   479
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   480
     MenuEditor new openOnClass:SettingsDialog andSelector:#mainMenu
7021197a578f initial checkin
penk
parents:
diff changeset
   481
     (Menu new fromLiteralArrayEncoding:(SettingsDialog mainMenu)) startUp
7021197a578f initial checkin
penk
parents:
diff changeset
   482
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   483
7021197a578f initial checkin
penk
parents:
diff changeset
   484
    <resource: #menu>
7021197a578f initial checkin
penk
parents:
diff changeset
   485
7021197a578f initial checkin
penk
parents:
diff changeset
   486
    ^ 
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   487
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   488
        (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   489
         (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   490
            label: '&File'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   491
            translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   492
            submenu: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   493
           (Menu
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   494
              (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   495
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   496
                  label: '&Load From...'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   497
                  itemValue: loadSettingsFromFile
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   498
                  translateLabel: true
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   499
                  isVisible: loadAndSaveSettingsItemVisible
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   500
                )
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   501
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   502
                  label: '-'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   503
                  isVisible: loadAndSaveSettingsItemVisible
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   504
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   505
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   506
                  label: 'Save'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   507
                  itemValue: saveSettingsWithoutAskingForFile
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   508
                  translateLabel: true
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   509
                  isVisible: loadAndSaveSettingsItemVisible
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   510
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   511
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   512
                  label: '&Save As...'
7473
3c436374677d *** empty log message ***
sr
parents: 7172
diff changeset
   513
                  itemValue: askForFileAndSaveSettings
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   514
                  translateLabel: true
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   515
                  isVisible: loadAndSaveSettingsItemVisible
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   516
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   517
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   518
                  label: '-'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   519
                  isVisible: loadAndSaveSettingsItemVisible
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   520
                )
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   521
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   522
                  label: 'E&xit'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   523
                  itemValue: closeRequest
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   524
                  translateLabel: true
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   525
                )
7021197a578f initial checkin
penk
parents:
diff changeset
   526
               )
7021197a578f initial checkin
penk
parents:
diff changeset
   527
              nil
7021197a578f initial checkin
penk
parents:
diff changeset
   528
              nil
7021197a578f initial checkin
penk
parents:
diff changeset
   529
            )
7021197a578f initial checkin
penk
parents:
diff changeset
   530
          )
7021197a578f initial checkin
penk
parents:
diff changeset
   531
         )
7021197a578f initial checkin
penk
parents:
diff changeset
   532
        nil
7021197a578f initial checkin
penk
parents:
diff changeset
   533
        nil
7021197a578f initial checkin
penk
parents:
diff changeset
   534
      )
7021197a578f initial checkin
penk
parents:
diff changeset
   535
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   536
7021197a578f initial checkin
penk
parents:
diff changeset
   537
!SettingsDialog methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
   538
7021197a578f initial checkin
penk
parents:
diff changeset
   539
requestor
7021197a578f initial checkin
penk
parents:
diff changeset
   540
    "return the 'requestor' of the SettingsDialog"
7021197a578f initial checkin
penk
parents:
diff changeset
   541
7021197a578f initial checkin
penk
parents:
diff changeset
   542
    ^ requestor
7021197a578f initial checkin
penk
parents:
diff changeset
   543
!
7021197a578f initial checkin
penk
parents:
diff changeset
   544
7021197a578f initial checkin
penk
parents:
diff changeset
   545
requestor:something
7021197a578f initial checkin
penk
parents:
diff changeset
   546
    requestor := something.
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   547
!
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   548
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   549
rootItem
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   550
    ^ self applicationList root.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   551
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   552
    "Created: / 03-11-2007 / 14:23:01 / cg"
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   553
!
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   554
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   555
rootItemLabel
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   556
    ^ self rootItem label.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   557
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   558
    "Modified: / 03-11-2007 / 14:23:18 / cg"
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   559
!
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   560
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   561
rootItemLabel:aString
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   562
    self rootItem label:aString.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   563
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   564
    "Modified: / 03-11-2007 / 14:23:16 / cg"
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   565
!
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   566
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   567
showRoot:aBoolean
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   568
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   569
    self applicationList showRoot:aBoolean.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   570
    aBoolean ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   571
        self applicationList root children do:[:e|e expand].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   572
    ]
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   573
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   574
    "Modified: / 15-10-2011 / 12:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   575
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   576
7021197a578f initial checkin
penk
parents:
diff changeset
   577
!SettingsDialog methodsFor:'actions'!
7021197a578f initial checkin
penk
parents:
diff changeset
   578
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   579
changeLabelTo:aLabel application:aApplication
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   580
    | item |
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   581
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   582
    item := self getItemByApplication:aApplication.
5043
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   583
    item notNil ifTrue:[
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   584
        item label:aLabel.
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   585
        item changed.
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   586
    ].
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   587
!
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   588
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   589
destroyAll
6389
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   590
    self applicationList do:[:applItem |
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   591
        |application|
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   592
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   593
        applItem isCategory ifFalse:[
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   594
            (application := applItem application) notNil ifTrue:[
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   595
                application close.
9f4010737320 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6325
diff changeset
   596
            ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   597
        ].
7021197a578f initial checkin
penk
parents:
diff changeset
   598
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
   599
!
7021197a578f initial checkin
penk
parents:
diff changeset
   600
7021197a578f initial checkin
penk
parents:
diff changeset
   601
doIndicatorClick:index 
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   602
    "handle a click on the indicator"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   603
7021197a578f initial checkin
penk
parents:
diff changeset
   604
    (self applicationList at:index) toggleExpand
7021197a578f initial checkin
penk
parents:
diff changeset
   605
!
7021197a578f initial checkin
penk
parents:
diff changeset
   606
7021197a578f initial checkin
penk
parents:
diff changeset
   607
doReload
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   608
    |item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   609
7021197a578f initial checkin
penk
parents:
diff changeset
   610
    item := self selectedItem value.
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   611
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   612
        ^ self
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   613
    ].
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   614
    item application readSettings
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   615
!
7021197a578f initial checkin
penk
parents:
diff changeset
   616
7021197a578f initial checkin
penk
parents:
diff changeset
   617
doSave
7021197a578f initial checkin
penk
parents:
diff changeset
   618
    | item |
7021197a578f initial checkin
penk
parents:
diff changeset
   619
7021197a578f initial checkin
penk
parents:
diff changeset
   620
    item := self selectedItem value.
7021197a578f initial checkin
penk
parents:
diff changeset
   621
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self].
4388
4302767e1720 ressources from AbstractLauncherApplication
penk
parents: 4384
diff changeset
   622
    self withWaitCursorDo:[
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   623
        item application saveSettingsIfUnsavedChangesArePresent.
4388
4302767e1720 ressources from AbstractLauncherApplication
penk
parents: 4384
diff changeset
   624
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   625
!
7021197a578f initial checkin
penk
parents:
diff changeset
   626
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   627
expandItemForApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   628
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   629
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   630
    item := self applicationList detect:[:item | item application = aApplication] ifNone:[nil].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   631
    item notNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   632
        item expand
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   633
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   634
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   635
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   636
help
8034
0e1c05cd4bfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7972
diff changeset
   637
    |item |
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   638
7021197a578f initial checkin
penk
parents:
diff changeset
   639
    item := self selectedItem value.
7021197a578f initial checkin
penk
parents:
diff changeset
   640
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self].
7021197a578f initial checkin
penk
parents:
diff changeset
   641
    item application help.
7021197a578f initial checkin
penk
parents:
diff changeset
   642
!
7021197a578f initial checkin
penk
parents:
diff changeset
   643
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   644
reopenLauncher
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   645
    self requestor notNil ifTrue:[
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   646
        self requestor reopenLauncher.
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   647
    ] ifFalse:[
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   648
        NewLauncher current reopenLauncher.
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   649
    ].
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   650
!
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   651
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   652
sendLoadRequestToAll
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   653
    self applicationList do:[:applItem | 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   654
        (applItem isCategory not and:[applItem application notNil]) ifTrue:[
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
   655
            applItem application readSettings.
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   656
        ]
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   657
    ].
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
   658
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
   659
    "Modified: / 24-08-2010 / 18:41:36 / sr"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   660
!
7021197a578f initial checkin
penk
parents:
diff changeset
   661
7021197a578f initial checkin
penk
parents:
diff changeset
   662
sendSaveRequestToAll
7021197a578f initial checkin
penk
parents:
diff changeset
   663
    self applicationList do:[ : applItem |
7021197a578f initial checkin
penk
parents:
diff changeset
   664
        (applItem isCategory not and:[applItem application notNil]) ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
   665
            applItem application saveRequest ifFalse:[
7021197a578f initial checkin
penk
parents:
diff changeset
   666
                ^ false
7021197a578f initial checkin
penk
parents:
diff changeset
   667
            ].
7021197a578f initial checkin
penk
parents:
diff changeset
   668
        ].
7021197a578f initial checkin
penk
parents:
diff changeset
   669
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
   670
    ^ true
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   671
!
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   672
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   673
sendSaveRequestToCurrent
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   674
    | item |
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   675
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   676
    item := self selectedItem value.
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   677
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ true].
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   678
    self withWaitCursorDo:[
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   679
        ^ item application saveRequest.
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   680
    ].
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   681
    ^ true
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   682
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   683
7021197a578f initial checkin
penk
parents:
diff changeset
   684
!SettingsDialog methodsFor:'application list access'!
7021197a578f initial checkin
penk
parents:
diff changeset
   685
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   686
addApplClass:aClass forApplication:anApplication label:aLabel expand:aBoolean
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   687
    "add an application to the settingsTree, take the icon from the application classes defaultIcon method"
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   688
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   689
    | class |
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   690
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   691
    class := Smalltalk classNamed:aClass.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   692
    class isNil ifTrue:[
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   693
        ('SettingsDialog [warning]: can''t find ', aClass asString, ' to register') infoPrintCR.
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   694
        ^ nil
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   695
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   696
    class autoload.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   697
    ^ self createItemForApplication:anApplication class:aClass label:aLabel icon:class defaultIcon expandParent:aBoolean replaceExisting:false
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   698
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   699
    "Modified: / 14-02-2011 / 20:10:11 / cg"
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   700
!
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   701
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   702
addApplClass:aClass withName:aName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   703
   "add an application to the settingsTree, take the icon from the application classes defaultIcon method"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   704
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   705
    ^ self addApplClass:aClass withName:aName icon:nil.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   706
!
7021197a578f initial checkin
penk
parents:
diff changeset
   707
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   708
addApplClass:aClass withName:aName expand:aBoolean
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   709
   "add an application to the settingsTree, take the icon from the application classes defaultIcon method"
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   710
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   711
    ^ self addApplClass:aClass withName:aName icon:nil expand:aBoolean.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   712
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   713
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   714
addApplClass:aClass withName:aName icon:icon
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   715
    ^ self addApplClass:aClass withName:aName icon:icon expand:false
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   716
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   717
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   718
addApplClass:aClass withName:aName icon:icon expand:doExpand
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   719
    |applicationLabel locIcon locClass|
7021197a578f initial checkin
penk
parents:
diff changeset
   720
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
   721
"/    (self applicationNames includes:aName) ifTrue:[
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
   722
"/        ^ self getItemForName:aName.
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
   723
"/    ].
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   724
    
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   725
    aClass isNil ifTrue:[ 
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   726
        self addIcon:icon forCategory:aName.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   727
        ^ self 
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   728
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   729
    self addCategoriesFor:aName.
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   730
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   731
    locIcon := icon.
7021197a578f initial checkin
penk
parents:
diff changeset
   732
    locClass := Smalltalk classNamed:aClass.
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
   733
    locClass isNil ifTrue:[
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   734
        ('SettingsDialog [warning]: can''t find ', aClass asString, ' to register') infoPrintCR.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   735
        ^ nil
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
   736
    ].
4838
60dfab83c50b autoload is understood by all classes (dummy if already loaded)
Claus Gittinger <cg@exept.de>
parents: 4826
diff changeset
   737
    locClass autoload.
60dfab83c50b autoload is understood by all classes (dummy if already loaded)
Claus Gittinger <cg@exept.de>
parents: 4826
diff changeset
   738
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   739
    (locIcon isNil and:[locClass respondsTo:#defaultIcon]) ifTrue:[ locIcon := locClass defaultIcon].
7021197a578f initial checkin
penk
parents:
diff changeset
   740
    applicationLabel := (aName asCollectionOfSubstringsSeparatedBy:$/) last.
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   741
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   742
    ^ self 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   743
        createItemName:aName 
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
   744
        label:applicationLabel 
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   745
        class:locClass 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   746
        icon:locIcon 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   747
        expandParent:doExpand 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
   748
        replaceExisting:false
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   749
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
   750
    "Modified: / 14-02-2011 / 20:10:04 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   751
!
7021197a578f initial checkin
penk
parents:
diff changeset
   752
7021197a578f initial checkin
penk
parents:
diff changeset
   753
addIcon:aIcon forCategory:aCategoryName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   754
    "add a new category Icon for a category"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   755
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   756
    |existingItem|
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   757
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   758
    self categoryIcons at:aCategoryName put:aIcon.
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   759
    existingItem := self getItemForName:aCategoryName.
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   760
    existingItem notNil ifTrue:[
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   761
        existingItem icon:aIcon
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   762
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   763
!
7021197a578f initial checkin
penk
parents:
diff changeset
   764
7021197a578f initial checkin
penk
parents:
diff changeset
   765
applicationNames
7021197a578f initial checkin
penk
parents:
diff changeset
   766
    ^ self applicationList collect:[:item | item nameString].
7021197a578f initial checkin
penk
parents:
diff changeset
   767
!
7021197a578f initial checkin
penk
parents:
diff changeset
   768
7021197a578f initial checkin
penk
parents:
diff changeset
   769
categoryIcons
7021197a578f initial checkin
penk
parents:
diff changeset
   770
    categoryIcons isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
   771
        categoryIcons := Dictionary new.
7021197a578f initial checkin
penk
parents:
diff changeset
   772
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
   773
    ^ categoryIcons 
7021197a578f initial checkin
penk
parents:
diff changeset
   774
!
7021197a578f initial checkin
penk
parents:
diff changeset
   775
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   776
childrenApplicationItemFor:aApplication fromItem:anItem
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   777
    anItem application = aApplication ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   778
        ^ anItem
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   779
    ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   780
    anItem hasChildren ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   781
        anItem children do:[:aChildItem |
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   782
            ^ self childrenApplicationItemFor:aApplication fromItem:aChildItem.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   783
        ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   784
    ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   785
    ^ nil
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   786
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   787
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   788
getAllChildrenAppsForApplication:aApplication 
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   789
    ^ self getAllChildrenAppsForApplication:aApplication matchBlock:nil
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   790
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   791
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   792
getAllChildrenAppsForApplication:aApplication childrenClass:aClass 
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   793
    |matchBlock|
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   794
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   795
    matchBlock := [:aSubApplication | aSubApplication class == aClass ].
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   796
    ^ self getAllChildrenAppsForApplication:aApplication matchBlock:matchBlock
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   797
!
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   798
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   799
getAllChildrenAppsForApplication:aApplication matchBlock:aMatchBlock
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   800
    | children |
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   801
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   802
    children := self getAllChildrenByApplication:aApplication.
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   803
    aMatchBlock notNil ifTrue:[
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   804
        children := children select:[:aChild | aMatchBlock value:(aChild application)]
4716
3df92d455996 *** empty log message ***
penk
parents: 4703
diff changeset
   805
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   806
    ^ children collect:[:item | item application].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   807
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   808
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   809
getAllChildrenByApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   810
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   811
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   812
    item := self getItemByApplication:aApplication.
4716
3df92d455996 *** empty log message ***
penk
parents: 4703
diff changeset
   813
    item isNil ifTrue:[ ^ #()].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   814
    ^ item children.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   815
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   816
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   817
getApplicationsByClass:aClass
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   818
    | classEntries|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   819
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   820
    self applicationList isNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   821
        self initialize.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   822
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   823
    classEntries := self applicationList select:[:aEntry | aEntry application class == aClass].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   824
    ^ classEntries collect:[:aItem | aItem application].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   825
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   826
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   827
getItemByApplication:anApplication
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   828
    |item|
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   829
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   830
    self applicationList do:[:anItem |
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
   831
        item := self childrenApplicationItemFor:anApplication fromItem:anItem.
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   832
        item notNil ifTrue:[ ^ item ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   833
    ].
5043
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   834
    ^ nil
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   835
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   836
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   837
getNameOfApplication:aApplication
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   838
    |item|
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   839
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   840
    self applicationList do:[:anItem |
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   841
        item := self childrenApplicationItemFor:aApplication fromItem:anItem.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
   842
        item notNil ifTrue:[ ^ item nameString].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   843
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   844
    ^ ''
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   845
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   846
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   847
installSettingsEntries:aCollection
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   848
    aCollection do:[ :entry| 
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   849
        self installSettingsEntry:entry.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   850
    ].
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   851
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   852
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   853
installSettingsEntries: entries expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   854
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   855
    "Installs given settings list. If expand is true,
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   856
     dynamic settings list is expanded"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   857
    
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   858
    entries do:[ :entry| 
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   859
        self installSettingsEntry:entry expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   860
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   861
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   862
    "Created: / 15-10-2011 / 11:45:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   863
!
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   864
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   865
installSettingsEntry:entry
4895
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
   866
    |applName applClassOrNil iconHolderOrNil|
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   867
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   868
    applName := entry at:1.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   869
    applClassOrNil := entry at:2.
4895
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
   870
    iconHolderOrNil := entry at:3 ifAbsent:nil.
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
   871
    self addApplClass:applClassOrNil withName:applName icon:iconHolderOrNil value
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   872
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   873
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   874
installSettingsEntry:entry expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   875
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   876
    | applName applClassOrNil iconHolderOrNil cookedList className code classList name nameCode nameBlock nameList|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   877
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   878
    expand ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   879
        applName := entry at:1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   880
        applClassOrNil := entry at:2.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   881
        iconHolderOrNil := entry at:3 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   882
        self addApplClass:applClassOrNil withName:applName icon:iconHolderOrNil value.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   883
        ^self
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   884
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   885
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   886
    cookedList := OrderedCollection new.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   887
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   888
    className := entry at:2 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   889
    (className notNil and:[className startsWith:'[']) ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   890
        code := className copyFrom:2 to:(className size - 1).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   891
        classList := (Parser evaluate:code) select:[:clsOrNil | clsOrNil notNil].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   892
        name := entry at:1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   893
        self assert:(name includesString:'[').
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   894
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   895
        nameCode := name copyFrom:(name indexOf:$[)+1 to:(name indexOf:$])-1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   896
        nameCode := '^ [:each | ' , (nameCode copyReplaceString:'%' withString:'each') ,']'.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   897
        nameBlock := Parser evaluate:nameCode.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   898
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   899
        nameList := classList collect:nameBlock.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   900
        nameList sortWith:classList.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   901
        nameList with:classList do:[:eachName :eachClass |
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   902
            |newEntry|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   903
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   904
            newEntry := entry copy.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   905
            newEntry at:1 put:(name copyTo:(name indexOf:$[)-1),eachName.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   906
            newEntry at:2 put:eachClass name.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   907
            cookedList add:newEntry.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   908
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   909
    ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   910
        (className isNil "a directory entry"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   911
        or:[ (Smalltalk at:className) notNil "a valid entry"]) ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   912
            cookedList add:entry.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   913
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   914
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   915
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   916
    cookedList do:[:eachEntry |
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   917
        |iconCodeOrSelector iconCode iconBlock newEntry|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   918
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   919
        iconCodeOrSelector := eachEntry at:3 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   920
        iconCodeOrSelector isNil ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   921
            newEntry := eachEntry
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   922
        ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   923
            newEntry := eachEntry copy.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   924
            (iconCodeOrSelector startsWith:'[') ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   925
                iconCode := iconCodeOrSelector copyFrom:(iconCodeOrSelector indexOf:$[)+1 to:(iconCodeOrSelector indexOf:$])-1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   926
                iconCode := '^ [:each | ' , (iconCode copyReplaceString:'%' withString:'each') ,']'.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   927
                iconBlock := Parser evaluate:iconCode.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   928
                newEntry at:3 put:(iconBlock value:(Smalltalk classNamed:(eachEntry at:2))).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   929
            ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   930
                newEntry at:3 put:(self perform:iconCodeOrSelector).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   931
            ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   932
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   933
        self installSettingsEntry:newEntry expand: false.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   934
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   935
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   936
    "
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   937
     self withAllSubclassesDo:[:cls | cls initializeSettingsList ]
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   938
    "
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   939
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   940
    "Modified: / 16-12-2002 / 18:12:50 / penk"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   941
    "Modified: / 20-04-2011 / 17:03:33 / cg"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   942
    "Created: / 15-10-2011 / 11:49:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   943
!
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   944
5345
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   945
parentApplicationFor:aApplication
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   946
    |item parent|
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   947
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   948
    item := (self getItemByApplication:aApplication).
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   949
    parent := item parent.
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   950
    parent notNil ifTrue:[
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   951
        ^ parent application.
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   952
    ].
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   953
    ^ nil
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   954
!
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
   955
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   956
remApplClassByName:aName 
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   957
    "remove an application from the settingsTree"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   958
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   959
    |item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   960
7021197a578f initial checkin
penk
parents:
diff changeset
   961
    item := self getItemForName:aName.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   962
    self removeItem:item 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   963
!
7021197a578f initial checkin
penk
parents:
diff changeset
   964
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   965
removeAllApplicationsByClass:aClass
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   966
    |apps|
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   967
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   968
    apps := self getApplicationsByClass:aClass.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   969
    apps do:[:aApp |
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   970
        self removeByApplication:aApp.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   971
    ].
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   972
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
   973
5050
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   974
removeAllSubApplicationsFor:aApp
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   975
    |apps|
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   976
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   977
    apps := self getAllChildrenAppsForApplication:aApp.
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   978
    apps do:[:aApp |
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   979
        self removeByApplication:aApp.
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   980
    ].
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   981
!
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
   982
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   983
removeApplicationByClass:aClass
7021197a578f initial checkin
penk
parents:
diff changeset
   984
    | classEntries|
7021197a578f initial checkin
penk
parents:
diff changeset
   985
7021197a578f initial checkin
penk
parents:
diff changeset
   986
    self applicationList isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
   987
        self initialize.
7021197a578f initial checkin
penk
parents:
diff changeset
   988
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   989
    classEntries := self applicationList select:[:aEntry | aEntry application class == aClass].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   990
    classEntries do:[:aItem |
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   991
        self removeItem:aItem.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   992
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   993
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   994
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   995
removeApplicationFromTree:aApplication
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   996
    | classEntries|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   997
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   998
    self applicationList isNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   999
        self initialize.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1000
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1001
    classEntries := self applicationList select:[:aEntry | aEntry application == aApplication].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1002
    classEntries do:[:aItem |
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1003
        self removeItem:aItem.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1004
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1005
    self applicationList removeAllFoundIn:classEntries.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1006
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1007
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1008
removeByApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1009
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1010
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1011
    item := self getItemByApplication:aApplication.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1012
    item notNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1013
        self removeItem:item.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1014
    ]
5058
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1015
!
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1016
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1017
sortSubApplicationsFor:anApplication
5059
a39dd428776c *** empty log message ***
penk
parents: 5058
diff changeset
  1018
    |item|
5058
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1019
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1020
    item := self getItemByApplication:anApplication.
8268
ad2da5c435b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8119
diff changeset
  1021
    item sort:[:a :b| a label < b label].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1022
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1023
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1024
!SettingsDialog methodsFor:'application list access-private'!
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1025
7021197a578f initial checkin
penk
parents:
diff changeset
  1026
addCategoriesFor:aName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1027
    "create all the categories"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1028
5253
193cbf909cef not ifTrue -> ifFalse
Claus Gittinger <cg@exept.de>
parents: 5164
diff changeset
  1029
    (aName includes:$/) ifFalse:[ ^ self].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1030
    self treeName:aName butLast:1 do:[:currentLabel :currentName| 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1031
        |length icon|
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1032
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1033
        currentLabel notEmpty ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1034
            icon := self categoryIcons at:currentName ifAbsent:[nil].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1035
            self createItemName:currentName label:currentLabel icon:icon replaceExisting:true.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1036
        ]
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1037
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1038
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1039
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1040
createItemForApplication:anApplication class:aClass label:aLabel icon:anIcon expandParent:expandParent replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1041
    "create an application item in my application list"
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1042
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1043
    | newItem parent locIcon item|
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1044
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1045
    parent := self getItemByApplication:anApplication.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1046
    parent isNil ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1047
        ^ nil
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1048
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1049
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1050
    doReplaceExisting ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1051
        parent children notNil ifTrue:[
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1052
            (item := parent children detect:[ :anItem | anItem application == anApplication] ifNone:[nil]) notNil ifTrue:[
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1053
                ^ item.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1054
            ]
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1055
        ]
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1056
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1057
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1058
    newItem := self class itemClass new.  
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1059
    "/ newItem label:(resources string:aLabel) "allBold".
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1060
    newItem label:aLabel "allBold".
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1061
    newItem nameString:(anApplication itemPathName , aLabel).
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1062
    newItem applicationClass:aClass.
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1063
    locIcon := anIcon.
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1064
    locIcon isNil ifTrue:[ locIcon := self class defaultSettingsAppIcon].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1065
    newItem icon:locIcon.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1066
    parent add:newItem.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1067
    expandParent ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1068
        parent expand.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1069
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1070
    ^ newItem
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1071
!
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1072
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1073
createItemName:aNameString label:aLabel class:aClass icon:anIcon
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1074
    ^ self createItemName:aNameString label:aLabel class:aClass icon:anIcon expandParent:false
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1075
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1076
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1077
createItemName:aNameString label:aLabel class:aClass icon:anIcon expandParent:expandParent
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1078
    ^ self
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1079
        createItemName:aNameString 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1080
        label:aLabel 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1081
        class:aClass 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1082
        icon:anIcon 
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1083
        expandParent:expandParent
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1084
        replaceExisting:true
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1085
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1086
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1087
createItemName:aNameString label:untranslatedLabel class:aClass icon:anIcon expandParent:expandParent replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1088
    "create an application item in my application list"
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1089
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1090
    |newItem parentsName parent locIcon item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1091
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1092
    (aNameString includes:$/) ifTrue:[
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1093
        parentsName := aNameString copyTo:(aNameString lastIndexOf:$/)-1.
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1094
        parent := self getItemForName:parentsName.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1095
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1096
    parent isNil ifTrue:[
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1097
        parent := self rootItem.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1098
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1099
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1100
    doReplaceExisting ifTrue:[
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1101
        parent children notNil ifTrue:[
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1102
            (item := parent children detect:[ :anItem | anItem nameString = aNameString] ifNone:[nil]) notNil ifTrue:[
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1103
                ^ item.
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1104
            ]
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1105
        ]
7021197a578f initial checkin
penk
parents:
diff changeset
  1106
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1107
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1108
    newItem := self class itemClass new.  
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
  1109
    "/ newItem label:(resources string:aLabel) "allBold".
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1110
    newItem label:(resources string:untranslatedLabel) "allBold".
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1111
    newItem nameString:aNameString.
7021197a578f initial checkin
penk
parents:
diff changeset
  1112
    newItem applicationClass:aClass.
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1113
    locIcon := anIcon.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1114
    locIcon isNil ifTrue:[ locIcon := self class defaultSettingsAppIcon].
7021197a578f initial checkin
penk
parents:
diff changeset
  1115
    newItem icon:locIcon.
4384
e16e816f6680 *** empty log message ***
penk
parents: 4378
diff changeset
  1116
    parent add:newItem.
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1117
    expandParent ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1118
        parent expand.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1119
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1120
    ^ newItem
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1121
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1122
    "Modified: / 03-11-2007 / 14:23:32 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1123
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1124
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1125
createItemName:aNameString label:aLabel icon:anIcon
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1126
    "create an application item in my application list"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1127
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1128
    self createItemName:aNameString label:aLabel class:nil icon:anIcon expandParent:false
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1129
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1130
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1131
createItemName:aNameString label:aLabel icon:anIcon replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1132
    "create an application item in my application list"
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1133
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1134
    self createItemName:aNameString label:aLabel class:nil icon:anIcon expandParent:false replaceExisting:doReplaceExisting
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1135
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1136
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1137
getItemForName:aName
7021197a578f initial checkin
penk
parents:
diff changeset
  1138
    | searchItem|
7021197a578f initial checkin
penk
parents:
diff changeset
  1139
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1140
    searchItem := self rootItem.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1141
    self treeName:aName do:[:currentLabel :currentName|
7021197a578f initial checkin
penk
parents:
diff changeset
  1142
        searchItem children isNil ifTrue:[ ^ nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1143
        searchItem := searchItem children detect:[: item | item nameString = currentName] ifNone:[nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1144
        searchItem isNil ifTrue:[ ^ nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1145
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1146
    ^ searchItem
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1147
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1148
    "Modified: / 03-11-2007 / 14:23:28 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1149
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1150
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1151
removeItem:anItem 
7895
c658466812c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7880
diff changeset
  1152
    "remove an application from the settingsTree"
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1153
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1154
    |parent remParent|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1155
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1156
    anItem application release.
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1157
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1158
    parent := anItem parent.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1159
    parent isNil ifTrue:[" already removed " ^ self].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1160
    parent remove:anItem.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1161
    
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1162
    [parent isCategory and:[parent children isEmptyOrNil]] whileTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1163
        remParent := parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1164
        parent := remParent parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1165
        parent remove:remParent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1166
    ].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1167
    self applicationList remove:anItem ifAbsent:[nil].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1168
    self selectedItem value:parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1169
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1170
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1171
treeName:aName butLast:last do:aBlock 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1172
    | tree  length|
7021197a578f initial checkin
penk
parents:
diff changeset
  1173
7021197a578f initial checkin
penk
parents:
diff changeset
  1174
    tree := aName asCollectionOfSubstringsSeparatedBy:$/.
7021197a578f initial checkin
penk
parents:
diff changeset
  1175
    tree from:1 to:(tree size - last) keysAndValuesDo:[:idx :aCategory| | itemName |
7021197a578f initial checkin
penk
parents:
diff changeset
  1176
        length := 0.
7021197a578f initial checkin
penk
parents:
diff changeset
  1177
        tree from:1 to:idx keysAndValuesDo:[:idx2 : el | 
7021197a578f initial checkin
penk
parents:
diff changeset
  1178
            length := length + el size.
7021197a578f initial checkin
penk
parents:
diff changeset
  1179
            idx2 > 1 ifTrue:[length := length + 1].
7021197a578f initial checkin
penk
parents:
diff changeset
  1180
        ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1181
        itemName := aName copyTo:length.
7021197a578f initial checkin
penk
parents:
diff changeset
  1182
        aBlock value:aCategory value:itemName.
7021197a578f initial checkin
penk
parents:
diff changeset
  1183
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1184
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1185
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1186
treeName:aName do:aBlock
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1187
    self treeName:aName butLast:0 do:aBlock
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1188
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1189
7021197a578f initial checkin
penk
parents:
diff changeset
  1190
!SettingsDialog methodsFor:'aspects'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1191
7021197a578f initial checkin
penk
parents:
diff changeset
  1192
applicationList
7021197a578f initial checkin
penk
parents:
diff changeset
  1193
    applicationList isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1194
        applicationList := SettingsDialog::HierarchicalApplicationList new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1195
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1196
    ^ applicationList.
7021197a578f initial checkin
penk
parents:
diff changeset
  1197
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1198
7021197a578f initial checkin
penk
parents:
diff changeset
  1199
enableHelp
7021197a578f initial checkin
penk
parents:
diff changeset
  1200
    enableHelp isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1201
        enableHelp := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1202
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1203
    ^ enableHelp.
7021197a578f initial checkin
penk
parents:
diff changeset
  1204
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1205
7021197a578f initial checkin
penk
parents:
diff changeset
  1206
enableOK
7021197a578f initial checkin
penk
parents:
diff changeset
  1207
    enableOK isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1208
        enableOK := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1209
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1210
    ^ enableOK.
7021197a578f initial checkin
penk
parents:
diff changeset
  1211
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1212
7021197a578f initial checkin
penk
parents:
diff changeset
  1213
enableReload
7021197a578f initial checkin
penk
parents:
diff changeset
  1214
    enableReload isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1215
        enableReload := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1216
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1217
    ^ enableReload.
7021197a578f initial checkin
penk
parents:
diff changeset
  1218
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1219
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1220
loadAndSaveSettingsItemVisible
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1221
    "for now, only show these if I have a requestor 
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1222
     (i.e. I am a full settings Dialog as opposed to a DebugView, FileBrowser or other
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1223
     settingsDialog. I think this has to be reworked..."
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1224
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1225
    ^ requestor notNil "/ loadAndSaveSettingsItemVisible
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1226
!
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1227
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1228
selectedItem
7021197a578f initial checkin
penk
parents:
diff changeset
  1229
    selectedItem isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1230
        selectedItem := ValueHolder new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1231
        selectedItem addDependent:self.
7021197a578f initial checkin
penk
parents:
diff changeset
  1232
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1233
    ^ selectedItem.
7021197a578f initial checkin
penk
parents:
diff changeset
  1234
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1235
7021197a578f initial checkin
penk
parents:
diff changeset
  1236
subCanvasApplicationHolder
7021197a578f initial checkin
penk
parents:
diff changeset
  1237
    subCanvasApplicationHolder isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1238
        subCanvasApplicationHolder := ValueHolder new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1239
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1240
    ^ subCanvasApplicationHolder.
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1241
!
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1242
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1243
whyDisabledInfoHolder
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1244
    whyDisabledInfoHolder isNil ifTrue:[
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1245
        whyDisabledInfoHolder := '' asValue.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1246
    ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1247
    ^ whyDisabledInfoHolder.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1248
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1249
    "Created: / 25-01-2007 / 17:13:50 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1250
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1251
7021197a578f initial checkin
penk
parents:
diff changeset
  1252
!SettingsDialog methodsFor:'change & update'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1253
7021197a578f initial checkin
penk
parents:
diff changeset
  1254
modifiedChanged
7021197a578f initial checkin
penk
parents:
diff changeset
  1255
    |changedObject|
7021197a578f initial checkin
penk
parents:
diff changeset
  1256
7021197a578f initial checkin
penk
parents:
diff changeset
  1257
    changedObject := self subCanvasApplicationHolder value modifiedChannel.
7021197a578f initial checkin
penk
parents:
diff changeset
  1258
    self enableOK value:(changedObject value).
7021197a578f initial checkin
penk
parents:
diff changeset
  1259
    self enableReload value:(changedObject value).
7021197a578f initial checkin
penk
parents:
diff changeset
  1260
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1261
9617
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1262
selectItemWithClass:aClass
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1263
    |entry|
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1264
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1265
    entry := applicationList root
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1266
                recursiveDetect:[:entry | entry applicationClass = aClass].
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1267
    entry makeVisible.
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1268
    self selectedItem value:entry
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1269
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1270
    "Created: / 29-10-2010 / 11:54:13 / cg"
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1271
!
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1272
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1273
selectionChanged
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1274
    |item oldAppl noApp lbl window app itemLabel|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1275
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1276
    self selectedItem value == lastSelection  ifTrue:[ ^ self].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1277
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1278
    oldAppl := self subCanvasApplicationHolder value.
7021197a578f initial checkin
penk
parents:
diff changeset
  1279
    oldAppl notNil ifTrue:[
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1280
        oldAppl saveRequest ifFalse:[
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1281
            lastSelection notNil ifTrue:[
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1282
            self
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1283
                enqueueMessage:#value 
9617
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1284
                for:[ self selectedItem value:lastSelection ]
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1285
                arguments:#().
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1286
            ].
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1287
            ^ self
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1288
        ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1289
        oldAppl modifiedChannel removeDependent:self.
7021197a578f initial checkin
penk
parents:
diff changeset
  1290
    ].
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1291
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1292
    item := self selectedItem value.
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1293
    lastSelection := item.
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1294
    noApp := (item isNil) ifTrue:true ifFalse:[item isCategory].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1295
    self enableOK value:(noApp not).
7021197a578f initial checkin
penk
parents:
diff changeset
  1296
    self enableReload value:(noApp not).
7021197a578f initial checkin
penk
parents:
diff changeset
  1297
    self enableHelp value:(noApp not).
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1298
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1299
    window := self window.
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1300
    window notNil ifTrue:[
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1301
        lbl := self rootItemLabel ? 'Settings Dialog'.
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1302
        item notNil ifTrue:[
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1303
            itemLabel := (item label copyReplaceAll:(Character cr) with:(Character space)).
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1304
            itemLabel ~= lbl ifTrue:[
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1305
                lbl := lbl , ' [', itemLabel, ']'.
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1306
            ]
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1307
        ].
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1308
        window label:lbl.
4406
d157f56c5ac9 *** empty log message ***
penk
parents: 4405
diff changeset
  1309
    ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1310
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1311
    builder notNil ifTrue:[ |box|
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1312
        "hide the DisabledSettingsBox"
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1313
        box := builder componentAt:#DisabledSettingsBox.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1314
        box notNil ifTrue:[
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1315
            box beInvisible; lower.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1316
        ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1317
    ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1318
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1319
    noApp ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1320
        self subCanvasApplicationHolder value:nil.
7021197a578f initial checkin
penk
parents:
diff changeset
  1321
        ^ self
7021197a578f initial checkin
penk
parents:
diff changeset
  1322
    ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1323
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1324
    app := item application.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1325
    app isNil ifTrue:[
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1326
        app := item applicationClass basicNew.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1327
        (app isEnabledInSettingsDialog:self) ifFalse:[
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1328
            "raise the DisabledSettingsBox above the settings window"
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1329
            self whyDisabledInfoHolder value:('These Settings are currently disabled, because\',app whyDisabledInSettingsDialogInfo) withCRs.
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1330
            builder notNil ifTrue:[ |box|
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1331
                box := builder componentAt:#DisabledSettingsBox.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1332
                box notNil ifTrue:[
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1333
                    box beVisible; raise.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1334
                ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1335
            ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1336
            self subCanvasApplicationHolder value:nil.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1337
            ^ self
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1338
        ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1339
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1340
        item application:app.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1341
        app basicInitialize.
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1342
        app settingsDialog:self.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1343
    ].
5164
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1344
    self withWaitCursorDo:[
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1345
        app initialize.
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1346
        app readSettings.
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1347
    ].
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1348
    app modifiedChannel addDependent:self.
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1349
    self subCanvasApplicationHolder value:app.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1350
    self modifiedChanged.
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1351
9617
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1352
    "Modified: / 29-10-2010 / 11:51:13 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1353
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1354
7021197a578f initial checkin
penk
parents:
diff changeset
  1355
update:something with:aParameter from:changedObject
6293
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1356
    |subCanvasApplication|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1357
7021197a578f initial checkin
penk
parents:
diff changeset
  1358
    changedObject == self selectedItem ifTrue:[
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1359
        super update:something with:aParameter from:changedObject.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1360
        self selectionChanged.
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1361
        ^ self.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1362
    ].
6293
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1363
    subCanvasApplication := self subCanvasApplicationHolder value.
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1364
    (subCanvasApplication notNil 
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1365
    and:[changedObject == subCanvasApplication modifiedChannel]) ifTrue:[
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1366
        self modifiedChanged.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1367
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1368
    super update:something with:aParameter from:changedObject
7021197a578f initial checkin
penk
parents:
diff changeset
  1369
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1370
7021197a578f initial checkin
penk
parents:
diff changeset
  1371
!SettingsDialog methodsFor:'initialization & release'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1372
7021197a578f initial checkin
penk
parents:
diff changeset
  1373
closeRequest
7021197a578f initial checkin
penk
parents:
diff changeset
  1374
    "This is a hook method generated by the Browser.
7021197a578f initial checkin
penk
parents:
diff changeset
  1375
     It will be invoked when your app/dialog-window is about to be
7021197a578f initial checkin
penk
parents:
diff changeset
  1376
     closed (this method has a chance to suppress the close).
7021197a578f initial checkin
penk
parents:
diff changeset
  1377
     See also #closeDownViews, which is invoked when the close is really done."
7021197a578f initial checkin
penk
parents:
diff changeset
  1378
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1379
    | req |
6019
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
  1380
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
  1381
    (self sendSaveRequestToCurrent == false) ifTrue:[^ self].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1382
    self destroyAll.
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1383
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1384
    req := self requestor.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1385
    req notNil ifTrue:[
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1386
        req settingsClosed.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1387
    ].
6635
e20f08617728 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6505
diff changeset
  1388
    super closeRequest
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1389
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1390
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1391
createRootItem
7172
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1392
    |rootItem lbl|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1393
7021197a578f initial checkin
penk
parents:
diff changeset
  1394
    resources := AbstractLauncherApplication resources.
7021197a578f initial checkin
penk
parents:
diff changeset
  1395
    rootItem := self class itemClass new.
7172
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1396
    lbl := resources string:'Settings'.
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1397
    rootItem label:lbl "allBold".
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1398
    rootItem nameString:lbl.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1399
    rootItem icon:self class settingsIcon.
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1400
    ^ rootItem
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1401
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1402
    "Created: / 03-11-2007 / 14:22:01 / cg"
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1403
!
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1404
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1405
initialize
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1406
    |rootItem|
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1407
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1408
    rootItem := self createRootItem.
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
  1409
    self applicationList root:rootItem; showRoot:true "false".
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1410
    self selectedItem value:rootItem.
7021197a578f initial checkin
penk
parents:
diff changeset
  1411
    super initialize.
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1412
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1413
    "Modified: / 03-11-2007 / 14:22:18 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1414
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1415
7021197a578f initial checkin
penk
parents:
diff changeset
  1416
postBuildSubCanvas:aWidget
7021197a578f initial checkin
penk
parents:
diff changeset
  1417
    aWidget keepClientView:true. 
7021197a578f initial checkin
penk
parents:
diff changeset
  1418
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1419
7021197a578f initial checkin
penk
parents:
diff changeset
  1420
postOpenWith:aBuilder
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1421
    self rootItem expand.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1422
    super postOpenWith:aBuilder.
10742
c6c9b272ac55 changed: #postOpenWith: (pre-select settings if there is only one child of the root)
vrany
parents: 10396
diff changeset
  1423
    self rootItem children size == 1 ifTrue:[
c6c9b272ac55 changed: #postOpenWith: (pre-select settings if there is only one child of the root)
vrany
parents: 10396
diff changeset
  1424
        self selectedItem value: self rootItem children anyOne.
c6c9b272ac55 changed: #postOpenWith: (pre-select settings if there is only one child of the root)
vrany
parents: 10396
diff changeset
  1425
    ]
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1426
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1427
    "Modified: / 03-11-2007 / 14:23:25 / cg"
10742
c6c9b272ac55 changed: #postOpenWith: (pre-select settings if there is only one child of the root)
vrany
parents: 10396
diff changeset
  1428
    "Modified: / 03-10-2011 / 16:27:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1429
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1430
7021197a578f initial checkin
penk
parents:
diff changeset
  1431
!SettingsDialog methodsFor:'menu actions'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1432
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1433
askForFileAndSaveSettings
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1434
    self class askForFileAndSaveSettings.
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1435
!
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1436
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
  1437
loadSettingsFromFile
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1438
    "restore settings from a settings-file."
7021197a578f initial checkin
penk
parents:
diff changeset
  1439
7021197a578f initial checkin
penk
parents:
diff changeset
  1440
    "a temporary kludge - we need a central systemSettings object for this,
7021197a578f initial checkin
penk
parents:
diff changeset
  1441
     which can be saved/restored with a single store/read."
7021197a578f initial checkin
penk
parents:
diff changeset
  1442
5629
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1443
    |fileName transcript launcher|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1444
7021197a578f initial checkin
penk
parents:
diff changeset
  1445
    fileName := Dialog 
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
  1446
        requestFileName:(resources string:'Load Settings from File') 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1447
        default:'settings.stx'
7021197a578f initial checkin
penk
parents:
diff changeset
  1448
        ok:(resources string:'Load') 
7021197a578f initial checkin
penk
parents:
diff changeset
  1449
        abort:(resources string:'Cancel') 
7021197a578f initial checkin
penk
parents:
diff changeset
  1450
        pattern:'*.stx'
7021197a578f initial checkin
penk
parents:
diff changeset
  1451
        fromDirectory:nil.
7021197a578f initial checkin
penk
parents:
diff changeset
  1452
7021197a578f initial checkin
penk
parents:
diff changeset
  1453
    (fileName size == 0) ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1454
        "/ canceled
7021197a578f initial checkin
penk
parents:
diff changeset
  1455
        ^ self
7021197a578f initial checkin
penk
parents:
diff changeset
  1456
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1457
7021197a578f initial checkin
penk
parents:
diff changeset
  1458
    self withWaitCursorDo:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1459
        Smalltalk fileIn:fileName.
5629
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1460
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1461
        "/ Transcript current topView model reOpen.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1462
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1463
        transcript := Transcript current.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1464
        (transcript notNil and:[transcript isExternalStream not]) ifTrue:[
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1465
            launcher := transcript application.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1466
            launcher notNil ifTrue:[
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1467
                launcher reopenLauncher.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1468
            ]
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1469
        ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1470
        self sendLoadRequestToAll.
7021197a578f initial checkin
penk
parents:
diff changeset
  1471
    ].
7100
e273c6f4602d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
  1472
e273c6f4602d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
  1473
    "Modified: / 08-09-2006 / 19:23:15 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1474
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1475
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1476
saveSettingsWithoutAskingForFile
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1477
    self class saveSettingsWithoutAskingForFile.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1478
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1479
7021197a578f initial checkin
penk
parents:
diff changeset
  1480
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1481
7021197a578f initial checkin
penk
parents:
diff changeset
  1482
application
7021197a578f initial checkin
penk
parents:
diff changeset
  1483
    "return the value of the instance variable 'application' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1484
7021197a578f initial checkin
penk
parents:
diff changeset
  1485
    ^ application
7021197a578f initial checkin
penk
parents:
diff changeset
  1486
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1487
7021197a578f initial checkin
penk
parents:
diff changeset
  1488
application:something
7021197a578f initial checkin
penk
parents:
diff changeset
  1489
    "set the value of the instance variable 'application' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1490
7021197a578f initial checkin
penk
parents:
diff changeset
  1491
    application := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  1492
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1493
7021197a578f initial checkin
penk
parents:
diff changeset
  1494
applicationClass
7021197a578f initial checkin
penk
parents:
diff changeset
  1495
    "return the value of the instance variable 'applicationClass' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1496
7021197a578f initial checkin
penk
parents:
diff changeset
  1497
    ^ applicationClass
7021197a578f initial checkin
penk
parents:
diff changeset
  1498
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1499
7021197a578f initial checkin
penk
parents:
diff changeset
  1500
applicationClass:something
7021197a578f initial checkin
penk
parents:
diff changeset
  1501
    "set the value of the instance variable 'applicationClass' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1502
7021197a578f initial checkin
penk
parents:
diff changeset
  1503
    applicationClass := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  1504
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1505
9425
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1506
label:something
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1507
    "reset the with in pixels..."
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1508
    width := nil.
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1509
    label := something.
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1510
!
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1511
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1512
nameString
7021197a578f initial checkin
penk
parents:
diff changeset
  1513
    "return the value of the instance variable 'nameString' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1514
7021197a578f initial checkin
penk
parents:
diff changeset
  1515
    ^ nameString
7021197a578f initial checkin
penk
parents:
diff changeset
  1516
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1517
7021197a578f initial checkin
penk
parents:
diff changeset
  1518
nameString:something
7021197a578f initial checkin
penk
parents:
diff changeset
  1519
    "set the value of the instance variable 'nameString' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  1520
7021197a578f initial checkin
penk
parents:
diff changeset
  1521
    nameString := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  1522
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1523
5078
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1524
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'menu'!
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1525
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1526
middleButtonMenu
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1527
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1528
    <resource: #programMenu >
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1529
5838
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  1530
    |application|
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  1531
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  1532
    (application := self application) isNil ifTrue:[ ^ nil].
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  1533
    ^ application settingsDialogPopUpMenu
5078
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1534
! !
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  1535
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1536
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'printing & storing'!
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1537
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1538
displayString
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1539
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1540
    ^ super printString, ' [', (label isText ifTrue:[label string] ifFalse:[label]) ,']'
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1541
!
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1542
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1543
printOn:aStream
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1544
    aStream 
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1545
        nextPutAll:self class nameWithoutPrefix;
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1546
        nextPutAll:' ';
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1547
        nextPutAll:self label ? '???'.
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1548
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1549
    "Created: / 24-08-2010 / 18:36:17 / sr"
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1550
!
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  1551
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1552
printString
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1553
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1554
    ^ super printString, ' [', (label isText ifTrue:[label string] ifFalse:[label]) ,']'
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1555
! !
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1556
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1557
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'queries'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1558
9425
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1559
canCollapse
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1560
    "the rootItem is cannot be collapsed"
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1561
    ^ self isRootItem not
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1562
!
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  1563
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1564
isCategory
7021197a578f initial checkin
penk
parents:
diff changeset
  1565
7021197a578f initial checkin
penk
parents:
diff changeset
  1566
    ^ self applicationClass isNil
7021197a578f initial checkin
penk
parents:
diff changeset
  1567
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1568
7021197a578f initial checkin
penk
parents:
diff changeset
  1569
!SettingsDialog class methodsFor:'documentation'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1570
7021197a578f initial checkin
penk
parents:
diff changeset
  1571
version
11739
fe57ab24ba67 changed:
Stefan Vogel <sv@exept.de>
parents: 10905
diff changeset
  1572
    ^ '$Header: /cvs/stx/stx/libtool/SettingsDialog.st,v 1.98 2012-08-10 10:45:42 stefan Exp $'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1573
!
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1574
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1575
version_CVS
11739
fe57ab24ba67 changed:
Stefan Vogel <sv@exept.de>
parents: 10905
diff changeset
  1576
    ^ '$Header: /cvs/stx/stx/libtool/SettingsDialog.st,v 1.98 2012-08-10 10:45:42 stefan Exp $'
10396
1fef9bc97b89 - per-tool preference for CodeView2
vrany
parents: 9859
diff changeset
  1577
!
1fef9bc97b89 - per-tool preference for CodeView2
vrany
parents: 9859
diff changeset
  1578
1fef9bc97b89 - per-tool preference for CodeView2
vrany
parents: 9859
diff changeset
  1579
version_SVN
1fef9bc97b89 - per-tool preference for CodeView2
vrany
parents: 9859
diff changeset
  1580
    ^ '§Id§'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1581
! !
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  1582
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  1583
SettingsDialog initialize!