SettingsDialog.st
author Stefan Vogel <sv@exept.de>
Fri, 17 May 2019 17:11:44 +0200
changeset 18767 0478d93cdb75
parent 18739 af38bbca6ccd
child 19075 02103f152957
permissions -rw-r--r--
#REFACTORING by stefan Sanitize BlockValues class: Tools::Inspector2 changed: #toolbarBackgroundHolder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
     1
"{ Encoding: utf8 }"
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
     2
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     3
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     4
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     5
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     6
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     7
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
     8
 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
     9
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    10
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    11
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    12
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    13
"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    14
"{ Package: 'stx:libtool' }"
7021197a578f initial checkin
penk
parents:
diff changeset
    15
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
    16
"{ NameSpace: Smalltalk }"
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
    17
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    18
ApplicationModel subclass:#SettingsDialog
13116
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    19
	instanceVariableNames:'requestor subCanvasApplicationHolder help doReload doSave
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    20
		enableReload enableHelp enableOK selectedItem applicationList
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
    21
		categoryIcons lastSelection whyDisabledInfoHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
    22
		quickSearchStringHolder quickSearchFieldShownHolder
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
    23
		highlightedWidgetsOriginalAttributes prevSearchStringsPerApp'
17957
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
    24
	classVariableNames:'ApplicationList IconList AutoSaveChangedSettingsOnClose'
13116
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    25
	poolDictionaries:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    26
	category:'Interface-Smalltalk'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    27
!
7021197a578f initial checkin
penk
parents:
diff changeset
    28
7021197a578f initial checkin
penk
parents:
diff changeset
    29
HierarchicalList subclass:#HierarchicalApplicationList
13116
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    30
	instanceVariableNames:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    31
	classVariableNames:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    32
	poolDictionaries:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    33
	privateIn:SettingsDialog
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    34
!
7021197a578f initial checkin
penk
parents:
diff changeset
    35
6688
a191e7822668 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6635
diff changeset
    36
HierarchicalItemWithLabelAndIcon subclass:#ApplicationItem
13116
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    37
	instanceVariableNames:'application applicationClass nameString'
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    38
	classVariableNames:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    39
	poolDictionaries:''
9e874b8306a7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13115
diff changeset
    40
	privateIn:SettingsDialog::HierarchicalApplicationList
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    41
!
7021197a578f initial checkin
penk
parents:
diff changeset
    42
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    43
AbstractSettingsApplication subclass:#SettingsFilenameAppl
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
    44
	instanceVariableNames:'settingsFilenameHolder infoLabelHolder'
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    45
	classVariableNames:''
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    46
	poolDictionaries:''
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    47
	privateIn:SettingsDialog
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    48
!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
    49
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    50
!SettingsDialog class methodsFor:'documentation'!
7021197a578f initial checkin
penk
parents:
diff changeset
    51
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    52
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    53
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    54
 COPYRIGHT (c) 2002 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    55
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    56
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    57
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    58
 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
    59
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    60
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    61
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    62
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    63
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    64
!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5080
diff changeset
    65
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    66
documentation
7021197a578f initial checkin
penk
parents:
diff changeset
    67
"
6019
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    68
    This is an application which presents a hierarchy of settings applications.
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
    69
    It is used (among others) in the launcher's and filebrowser's settings-dialogs.
13114
e14beaa8fbf3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13086
diff changeset
    70
e14beaa8fbf3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13086
diff changeset
    71
    However, it is rather generic and can be setup for any application's setting dialog.
16944
c1f04f732551 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16645
diff changeset
    72
    The actual contents (i.e. the organization tree and tab contents) is provided
13114
e14beaa8fbf3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13086
diff changeset
    73
    by a spec-array (the settingsList).
e14beaa8fbf3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13086
diff changeset
    74
    You will find a default settings list here, but in theory, applications may provide
e14beaa8fbf3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13086
diff changeset
    75
    their own one, or modify a copy of that list for specialized settings dialogs.
13115
bb83def3ead7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13114
diff changeset
    76
    See class >> examples, #defaultSettingsApplicationList
bb83def3ead7 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13114
diff changeset
    77
    and AbstractLauncherApplication >> settingsList for more info.
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    78
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    79
    [author:]
7021197a578f initial checkin
penk
parents:
diff changeset
    80
        Christian Penk, eXept Software AG
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    81
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    82
    [see also:]
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    83
        AbstractLauncherApplication defaultSettingsApplicationList 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
    84
"
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    85
!
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    86
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    87
examples
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    88
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    89
"
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
    90
  start a Settings Dialog with a language Settings Application under root
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    91
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    92
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    93
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    94
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    95
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    96
                withName:'Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    97
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    98
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
    99
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   100
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   101
  start a Settings Dialog with a language Settings Application under root/Test
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   102
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   103
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   104
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   105
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   106
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   107
                withName:'Test/Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   108
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   109
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   110
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   111
  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
   112
  with an other category test icon
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   113
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   114
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   115
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   116
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   117
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   118
                withName:'Test/Language'.
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   119
    settingsApp addIcon:ToolbarIconLibrary start22x22Icon forCategory:'Test'.
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   120
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   121
                                                                [exEnd]
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
   122
4494
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   123
  start a Settings Dialog with a language and memory Settings Application 
1a4271d84f7e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4470
diff changeset
   124
  in different categories
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   125
                                                                [exBegin]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   126
    | settingsApp |
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   127
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   128
    settingsApp := self new.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   129
    settingsApp addIcon:ToolbarIconLibrary start22x22Icon forCategory:'Test'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   130
    settingsApp addApplClass:#'AbstractSettingsApplication::LanguageSettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   131
                withName:'Test/Language'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   132
    settingsApp addApplClass:#'AbstractSettingsApplication::MemorySettingsAppl' 
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   133
                withName:'Test2/Memory'.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   134
    settingsApp open.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   135
                                                                [exEnd]
5b1bf011547f add examples
penk
parents: 4397
diff changeset
   136
"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   137
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   138
5399
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   139
!SettingsDialog class methodsFor:'initialization'!
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   140
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   141
initialize
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   142
    AbstractSettingsApplication autoload.
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   143
! !
3fa323d28c8e category rename
Claus Gittinger <cg@exept.de>
parents: 5363
diff changeset
   144
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   145
!SettingsDialog class methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
   146
7021197a578f initial checkin
penk
parents:
diff changeset
   147
itemClass
7021197a578f initial checkin
penk
parents:
diff changeset
   148
7021197a578f initial checkin
penk
parents:
diff changeset
   149
    ^ SettingsDialog::HierarchicalApplicationList::ApplicationItem
7021197a578f initial checkin
penk
parents:
diff changeset
   150
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   151
7021197a578f initial checkin
penk
parents:
diff changeset
   152
!SettingsDialog class methodsFor:'application icons'!
7021197a578f initial checkin
penk
parents:
diff changeset
   153
7021197a578f initial checkin
penk
parents:
diff changeset
   154
defaultSettingsAppIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   155
15919
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   156
    ^ self settingsIcon2
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   157
!
7021197a578f initial checkin
penk
parents:
diff changeset
   158
15919
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   159
settingsFolderIcon
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   160
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   161
     by the ImageEditor of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   162
7021197a578f initial checkin
penk
parents:
diff changeset
   163
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   164
     the ImageEditor may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   165
7021197a578f initial checkin
penk
parents:
diff changeset
   166
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   167
     self settingsIcon inspect
7021197a578f initial checkin
penk
parents:
diff changeset
   168
     ImageEditor openOnClass:self andSelector:#settingsIcon
7021197a578f initial checkin
penk
parents:
diff changeset
   169
     Icon flushCachedIcons
7021197a578f initial checkin
penk
parents:
diff changeset
   170
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   171
7021197a578f initial checkin
penk
parents:
diff changeset
   172
    <resource: #image>
7021197a578f initial checkin
penk
parents:
diff changeset
   173
7021197a578f initial checkin
penk
parents:
diff changeset
   174
    ^Icon
8476
84fa59f05e50 image resource method fixes (key must be name of method)
Claus Gittinger <cg@exept.de>
parents: 8268
diff changeset
   175
        constantNamed:#'SettingsDialog class settingsIcon'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   176
        ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
7021197a578f initial checkin
penk
parents:
diff changeset
   177
@@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
   178
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
   179
,-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
   180
-;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
   181
@@A_@F)IU#DQMWH@@@@@@@@@@@@@@@@@@F1JWC\LMJI''^ @@@@@@@@@@@@@@@F9GU28ROGI%+VY4@@@@@@@@@@@@@GIFXC(IL9(@^VR*X''\@@@@@@@@@@@AU
7021197a578f initial checkin
penk
parents:
diff changeset
   182
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
   183
!
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   184
15919
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   185
settingsIcon
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   186
    ^ self settingsIcon2
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   187
!
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   188
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   189
settingsIcon2
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   190
    "This resource specification was automatically generated
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   191
     by the ImageEditor of ST/X."
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   192
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   193
    "Do not manually edit this!! If it is corrupted,
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   194
     the ImageEditor may not be able to read the specification."
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   195
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   196
    "
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   197
     self settingsIcon2 inspect
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   198
     ImageEditor openOnClass:self andSelector:#settingsIcon2
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   199
     Icon flushCachedIcons
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   200
    "
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   201
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   202
    <resource: #image>
5892
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   203
15919
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   204
    ^Icon
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   205
        constantNamed:'SettingsDialog settingsIcon2'
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   206
        ifAbsentPut:[(Depth8Image width:22 height:22) bits:(ByteArray fromPackedString:'
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   207
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BDW%58@@@@@@@@@@@@@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   208
@@@@@@BFJ!!,ZD0@@@@@@@@@@@@@@@@@@@@BHHEEXP!!X@@A48@@@@@@@@@@@@@@BGI%E/QR0U@D!!SA0@@@@@@@@@@@@BEHEE+P20^O%A0OW0@@@@@@@@@@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   209
GEE1P20!!NPAO\GT-L@T@@@@@@@@@@A=*QR0!!O6!!-R5(2UB,C@@@@@@@@@@A[JB0^JVNAS%X6D HJS@@@@@@@@@@@E0 XDAPDSU$1C3.L$0@@@@@@@@@@@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   210
W0A*RUX1DSU2@@@@@@@@@@@@@@@@@@A,R%07CCR"Y7(@@@@@@@@@@@@@@@A.Q5\.D#12YZ5&]@@@@@@@@@@@@@A2Q&@:BSNZ@G%$*&I7@@@@@@@@@@@@URTF
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   211
B4@@@@@@\6F-H0@@@@@@@@@@@H8N@R>\@@@@@@A6H%H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   212
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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] mask:((ImageMask width:22 height:22) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@O@@@_@@@?L@A?\@C?<@C>?@C??@C??@C?>@@/8@@_<@@?>@A?_@A<O@A<G@@@@@@@@@@@@@@@@@'); yourself); yourself]
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   213
!
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   214
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   215
wheelIcon
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   216
    "This resource specification was automatically generated
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   217
     by the ImageEditor of ST/X."
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   218
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   219
    "Do not manually edit this!! If it is corrupted,
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   220
     the ImageEditor may not be able to read the specification."
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   221
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   222
    "
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   223
     self wheelIcon inspect
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   224
     ImageEditor openOnClass:self andSelector:#wheelIcon
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   225
     Icon flushCachedIcons
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   226
    "
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   227
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   228
    <resource: #image>
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   229
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   230
    ^Icon
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   231
        constantNamed:'SettingsDialog wheelIcon'
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   232
        ifAbsentPut:[(Depth4Image width:24 height:24) bits:(ByteArray fromPackedString:'
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   233
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@CT@@@@@@@@@@@@@@CT@@@@@@@@@@@T0@2H0@5@@@@@@@@D#L"
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   234
H#L!!@@@@@@@@ARH"H"IP@@@@@@@@@2IQURH0@@@@@@@@L"TP@UH#@@@@@@@3H"DDPAH"L0@@@@@QH"TDPEH"DP@@@@@@URH0@2IU@@@@@@@@ARH#L"IP@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   235
@@@@@2H"H"H0@@@@@@@@L!!T"H%D#@@@@@@@@TP@2H0@U@@@@@@@@@@@BH@@@@@@@@@@@@@@BH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   236
@@@@@@@@@@@@@@@@@@@@@@@@') colorMapFromArray:#[0 0 0 127 127 127 194 194 194 255 255 255 236 233 216 161 161 165] mask:((ImageMask width:24 height:24) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@A @@C0@@33@A?? A?? @??@@??@C??0G??8G??8C??0@??@@??@A?? A?? @33@@C0@@A @@@@@@@@@@@@@'); yourself); yourself]
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   237
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   238
16201
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   239
!SettingsDialog class methodsFor:'default settingslist'!
5892
Claus Gittinger <cg@exept.de>
parents: 5838
diff changeset
   240
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   241
defaultSettingsApplicationList
16201
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   242
    "unless the settingsDialog is opened with an explicit settings list,
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   243
     this one is used (it is also the one used by the ST/X IDE"
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   244
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   245
    ^ OrderedCollection new
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   246
        addAll:#(          
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   247
                #('Language'                            #'AbstractSettingsApplication::LanguageSettingsAppl'            )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   248
                #('Keyboard Mappings'                   #'AbstractSettingsApplication::KbdMappingSettingsAppl'          )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   249
                #('ViewStyle'                           #'AbstractSettingsApplication::MiscDisplaySettingsAppl'         )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   250
                #('ViewStyle/Style'                     #'AbstractSettingsApplication::StyleSettingsAppl'               )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   251
                #('ViewStyle/Other'                     #'AbstractSettingsApplication::MiscDisplay2SettingsAppl'        )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   252
                #('ViewStyle/Fonts'                     #'Tools::FontSettingsApplication'                               )
15919
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   253
                #('System/System Messages'                     #'AbstractSettingsApplication::SystemMessageSettingsAppl'       )
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   254
                #('System/Memory'                              #'AbstractSettingsApplication::MemorySettingsAppl'              )
fbc792e7c1b3 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15881
diff changeset
   255
                #('System/Processor & Scheduler'               #'AbstractSettingsApplication::ProcessorSchedulerSettingsAppl'  )
16201
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   256
                #('System/Autoloaded Packages'                 #'AbstractSettingsApplication::AutoloadedPackagesSettingsAppl'  )
16333
3945c8d42ab7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16325
diff changeset
   257
                #('System/Package Path'                 #'AbstractSettingsApplication::PackagePathSettingsAppl'  )
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   258
                #('Tools'                               #'AbstractSettingsApplication::ToolsSettingsAppl'               )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   259
                #('Tools/Toolbox'                       #'AbstractSettingsApplication::ToolboxSettingsAppl'             )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   260
                #('Tools/Editor'                        #'AbstractSettingsApplication::EditSettingsAppl'                )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   261
                #('Tools/Editor/Code Editor 2'          #'Tools::CodeView2SettingsAppl'                                 )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   262
                #('Tools/Editor/Syntax Color'           #'AbstractSettingsApplication::SyntaxColorSettingsAppl'         )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   263
                #('Tools/Editor/Code Format'            #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl'    )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   264
                #('Tools/System Browser'                #'AbstractSettingsApplication::SystemBrowserSettingsAppl'       )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   265
                #('Tools/System Browser/Code Generator' #'AbstractSettingsApplication::CodeGeneratorSettingsAppl'       )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   266
                #('Tools/Changes'                       #'AbstractSettingsApplication::ChangeFileSettingsAppl'          )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   267
                #('Tools/Debugger'                      #'AbstractSettingsApplication::DebuggerSettingsAppl'            )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   268
                #('Tools/Terminal'                      #'AbstractSettingsApplication::TerminalViewSettingsAppl'        )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   269
                #('Tools/Compiler'                      #'AbstractSettingsApplication::GeneralCompilerSettingsAppl'     )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   270
                #('Tools/Compiler/ByteCode'             #'AbstractSettingsApplication::ByteCodeCompilerSettingsAppl'    )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   271
                #('Tools/Compiler/STC'                  #'AbstractSettingsApplication::STCCompilerSettingsAppl'         )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   272
                #('Tools/Compiler/Build'                #'AbstractSettingsApplication::BuildSettingsAppl'               )
16165
c7b29d2a5d8e #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15919
diff changeset
   273
                #('Workspace'                           #'AbstractSettingsApplication::WorkspaceSettingsAppl'               )
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   274
                #('Source Code Management'              #'AbstractSettingsApplication::SourceCodeManagementSettingsAppl')
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   275
            );
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   276
        add:
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   277
            "/ see initializeSettingsList for how the following is expanded...
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   278
            { 'Source Code Management/[% managerTypeName]' .     
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   279
                                                 [ AbstractSourceCodeManager availableManagers 
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   280
                                                     collect:[:each | each settingsApplicationClass] ] .    
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   281
                                                                                              '[% defaultIcon]' };
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   282
        addAll: 
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   283
            #(
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   284
                #('Printer'                             #'AbstractSettingsApplication::PrinterSettingsAppl'             )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   285
                #('Display'                             #'AbstractSettingsApplication::DisplaySettingsAppl'             )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   286
                #('Communication'                       nil                                           #communicationIcon)
9275
bff5fac9e455 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 9186
diff changeset
   287
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   288
                #('Communication/Logging'               #'AbstractSettingsApplication::CommunicationLoggingSettingsAppl')
16165
c7b29d2a5d8e #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15919
diff changeset
   289
                #('Communication/RDoIt & Telnet'        #'AbstractSettingsApplication::RDoItServerSettingsAppl'         )
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   290
                #('Communication/Misc'                  #'AbstractSettingsApplication::MiscCommunicationSettingsAppl'   )
16165
c7b29d2a5d8e #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15919
diff changeset
   291
                #('Communication/Misc/Bridges'          #'AbstractSettingsApplication::MiscBridgeCommunicationSettingsAppl'   )
c7b29d2a5d8e #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15919
diff changeset
   292
                #('Communication/Misc/Smalltalk'        #'AbstractSettingsApplication::MiscSmalltalkCommunicationSettingsAppl'   )
c7b29d2a5d8e #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15919
diff changeset
   293
                #('Communication/Misc/OSI Protocol'     #'AbstractSettingsApplication::OsiSettingsAppl'                 )
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   294
                #('Communication/SQLServer'             #'AbstractSettingsApplication::SQLServerSettingsAppl'           )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   295
                #('Communication/HTTPServer'            #'AbstractSettingsApplication::HTTPStartServerSettingsApplication'   )
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   296
            );
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
   297
        yourself
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   298
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   299
    "Modified: / 16-12-2002 / 18:12:28 / penk"
10905
7ec7015ab744 changed: #defaultSettingsApplicationList
Claus Gittinger <cg@exept.de>
parents: 10824
diff changeset
   300
    "Modified: / 25-11-2011 / 15:28:42 / cg"
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   301
    "Modified: / 27-02-2013 / 12:08:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
16201
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   302
! !
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   303
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   304
!SettingsDialog class methodsFor:'defaults'!
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   305
17957
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   306
autoSaveChangedSettingsOnClose
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   307
    ^ AutoSaveChangedSettingsOnClose ? false.
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   308
!
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   309
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   310
autoSaveChangedSettingsOnClose:aBoolean
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   311
    AutoSaveChangedSettingsOnClose := aBoolean
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   312
!
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
   313
16201
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   314
defaultIcon
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   315
    <resource: #programImage>
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   316
639512eafece #FEATURE
Claus Gittinger <cg@exept.de>
parents: 16165
diff changeset
   317
    ^ ToolbarIconLibrary stxSettings24x24Icon
8621
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   318
!
0cc9ef232220 beepInEditor flag
Claus Gittinger <cg@exept.de>
parents: 8476
diff changeset
   319
4397
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   320
expandParents
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   321
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   322
    ^ true
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   323
!
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   324
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   325
resourcePackName
7873
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   326
    "return the name which is used as the fileNameBase of my resource file.
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   327
     Here, use the same resources as the Launcher"
9e88f7f30bca comment
Claus Gittinger <cg@exept.de>
parents: 7719
diff changeset
   328
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   329
    ^ AbstractLauncherApplication resourcePackName
4397
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   330
! !
21f99307336a expand all parents on startup
penk
parents: 4388
diff changeset
   331
12029
fa8f6787ea95 category of: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11983
diff changeset
   332
!SettingsDialog class methodsFor:'help specs'!
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   333
17910
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
   334
helpSpec
17468
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   335
    "This resource specification was automatically generated
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   336
     by the UIHelpTool of ST/X."
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   337
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   338
    "Do not manually edit this!! If it is corrupted,
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   339
     the UIHelpTool may not be able to read the specification."
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   340
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   341
    "
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   342
     UIHelpTool openOnClass:SettingsDialog
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   343
    "
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   344
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   345
    <resource: #help>
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   346
17910
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
   347
    ^ super helpSpec addPairsFrom:#(
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   348
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   349
#acceptChangedSettings
13270
73c12fa47f29 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13116
diff changeset
   350
'Accept changed settings for the current ST/X session.\Notice, that these affect the current session only.\To make the current settings the default in the future, save them to the settings file (using the "Save" button).\Also notice, that some values affect new opened windows/tools only.'
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   351
17468
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   352
#closeRequest
17469
4f0ca3451466 #UI_ENHANCEMENT by mawalch
mawalch
parents: 17468
diff changeset
   353
'Close this dialog.\\If there are changes in the settings that you have neither accepted\nor discarded, you will be asked if you want to accept them.\You will also be asked if you want to store them permanently.'
17468
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   354
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   355
#discardChangedSettings
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   356
'Discard changes and revert to the current active settings values'
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   357
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   358
#helpOnSettings
18192
2a8fc4c54723 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18191
diff changeset
   359
'Show the online documentation for the shown elements'
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   360
11983
4b9d7ce885b7 changed:
Claus Gittinger <cg@exept.de>
parents: 11982
diff changeset
   361
#loadSettingsFromFile
13270
73c12fa47f29 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13116
diff changeset
   362
'Load the settings from a file.\At initial startup, the "settings.stx" file is read automatically.'
11983
4b9d7ce885b7 changed:
Claus Gittinger <cg@exept.de>
parents: 11982
diff changeset
   363
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   364
#quickSearchString
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   365
'Quick search pattern.\Highlights settings which contain the entered string (in the label or its tooltip).\Searches both in the presented text AND in the english original version.\\Prefix with a space to search for words starting with it;\append a space, to search for words ending with it.\(i.e. surround with spaces to search for free standing words only.)\Notice, that without a separator, it will often find strange partial strings\(such as "update", when searching for "date", or "amount" when searching for "mou[se]")'
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   366
17468
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   367
#saveSettingsToFile
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   368
'Save the current settings into a file.\The "settings.stx" file is automatically read upon every fresh start of ST/X.'
b1b6e86ca6d1 #FEATURE by mawalch
mawalch
parents: 17431
diff changeset
   369
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   370
)
17469
4f0ca3451466 #UI_ENHANCEMENT by mawalch
mawalch
parents: 17468
diff changeset
   371
4f0ca3451466 #UI_ENHANCEMENT by mawalch
mawalch
parents: 17468
diff changeset
   372
    "Modified: / 15-03-2017 / 11:14:33 / mawalch"
18192
2a8fc4c54723 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18191
diff changeset
   373
    "Modified: / 11-06-2018 / 13:50:08 / Claus Gittinger"
11982
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   374
! !
027f2e7a175e added: #flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 11739
diff changeset
   375
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   376
!SettingsDialog class methodsFor:'interface specs'!
7021197a578f initial checkin
penk
parents:
diff changeset
   377
7021197a578f initial checkin
penk
parents:
diff changeset
   378
windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   379
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   380
     by the UIPainter of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   381
7021197a578f initial checkin
penk
parents:
diff changeset
   382
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   383
     the UIPainter may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   384
7021197a578f initial checkin
penk
parents:
diff changeset
   385
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   386
     UIPainter new openOnClass:SettingsDialog andSelector:#windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   387
     SettingsDialog new openInterface:#windowSpec
7021197a578f initial checkin
penk
parents:
diff changeset
   388
     SettingsDialog open
7021197a578f initial checkin
penk
parents:
diff changeset
   389
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   390
7021197a578f initial checkin
penk
parents:
diff changeset
   391
    <resource: #canvas>
7021197a578f initial checkin
penk
parents:
diff changeset
   392
7021197a578f initial checkin
penk
parents:
diff changeset
   393
    ^ 
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   394
    #(FullSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   395
       name: windowSpec
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   396
       uuid: '72a5bfde-1e86-11b2-a838-a088b4c61514'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   397
       window: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   398
      (WindowSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   399
         label: 'Settings Dialog'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   400
         name: 'Settings Dialog'
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   401
         uuid: '591fa42a-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   402
         min: (Point 10 10)
16480
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   403
         bounds: (Rectangle 0 0 850 656)
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   404
         menu: mainMenu
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   405
         icon: defaultIcon
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   406
       )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   407
       component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   408
      (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   409
         collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   410
          (VariableHorizontalPanelSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   411
             name: 'VariableHorizontalPanel1'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   412
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   413
             uuid: '591fa736-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   414
             snapMode: both
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   415
             component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   416
            (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   417
               collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   418
                (ViewSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   419
                   name: 'Box1'
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   420
                   uuid: '591fa984-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   421
                   component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   422
                  (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   423
                     collection: (
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   424
                      (VerticalPanelViewSpec
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   425
                         name: 'VerticalPanel1'
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   426
                         layout: (LayoutFrame 0 0 0 0 0 1 -34 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   427
                         uuid: '591faace-dc5b-11e8-91fc-b8f6b1108e05'
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   428
                         horizontalLayout: fit
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   429
                         verticalLayout: topFit
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   430
                         horizontalSpace: 3
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   431
                         verticalSpace: 3
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   432
                         component: 
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   433
                        (SpecCollection
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   434
                           collection: (
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   435
                            (ViewSpec
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   436
                               name: 'QuickSearchBox'
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   437
                               uuid: '591fac9a-dc5b-11e8-91fc-b8f6b1108e05'
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   438
                               visibilityChannel: quickSearchFieldShownHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   439
                               component: 
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   440
                              (SpecCollection
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   441
                                 collection: (
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   442
                                  (LabelSpec
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   443
                                     label: 'Quick Search:'
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   444
                                     name: 'Label1'
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   445
                                     layout: (LayoutFrame 0 0 0 0 102 0 0 1)
16631
cb639044b134 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16528
diff changeset
   446
                                     activeHelpKey: quickSearchString
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   447
                                     uuid: '591fadc6-dc5b-11e8-91fc-b8f6b1108e05'
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   448
                                     translateLabel: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   449
                                     adjust: left
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   450
                                   )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   451
                                  (InputFieldSpec
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   452
                                     name: 'QuickSeachEntryField'
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   453
                                     layout: (LayoutFrame 105 0 0 0 0 1 0 1)
16631
cb639044b134 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16528
diff changeset
   454
                                     activeHelpKey: quickSearchString
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   455
                                     uuid: '591fafe2-dc5b-11e8-91fc-b8f6b1108e05'
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   456
                                     model: quickSearchStringHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   457
                                     immediateAccept: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   458
                                     acceptOnReturn: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   459
                                     acceptOnTab: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   460
                                     acceptOnPointerLeave: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   461
                                   )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   462
                                  )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   463
                                
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   464
                               )
17007
e5c736e08471 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16993
diff changeset
   465
                               extent: (Point 249 30)
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   466
                             )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   467
                            (HierarchicalListViewSpec
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   468
                               name: 'HierarchicalListView1'
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   469
                               uuid: '591fb302-dc5b-11e8-91fc-b8f6b1108e05'
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   470
                               model: selectedItem
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   471
                               hasHorizontalScrollBar: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   472
                               hasVerticalScrollBar: true
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   473
                               listModel: applicationList
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   474
                               useIndex: false
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   475
                               highlightMode: label
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   476
                               showLeftIndicators: false
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   477
                               indicatorSelector: doIndicatorClick:
17007
e5c736e08471 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16993
diff changeset
   478
                               extent: (Point 249 589)
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   479
                             )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   480
                            )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   481
                          
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   482
                         )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   483
                       )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   484
                      (HorizontalPanelViewSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   485
                         name: 'HorizontalPanel2'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   486
                         layout: (LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   487
                         uuid: '591fb654-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   488
                         visibilityChannel: loadAndSaveSettingsItemVisible
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   489
                         horizontalLayout: fitSpace
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   490
                         verticalLayout: center
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   491
                         horizontalSpace: 3
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   492
                         verticalSpace: 3
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   493
                         component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   494
                        (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   495
                           collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   496
                            (ActionButtonSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   497
                               label: 'Save'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   498
                               name: 'Button3'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   499
                               activeHelpKey: saveSettingsToFile
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   500
                               uuid: '591fb820-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   501
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   502
                               tabable: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   503
                               model: saveSettingsWithoutAskingForFile
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   504
                               extent: (Point 121 28)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   505
                             )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   506
                            (ActionButtonSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   507
                               label: 'Load From...'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   508
                               name: 'Button2'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   509
                               activeHelpKey: loadSettingsFromFile
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   510
                               uuid: '591fba8c-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   511
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   512
                               tabable: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   513
                               model: loadSettingsFromFile
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   514
                               extent: (Point 121 28)
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   515
                             )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   516
                            )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   517
                          
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   518
                         )
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   519
                       )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   520
                      )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   521
                    
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   522
                   )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   523
                 )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   524
                (ViewSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   525
                   name: 'Box2'
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   526
                   uuid: '591fbd70-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   527
                   component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   528
                  (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   529
                     collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   530
                      (ViewSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   531
                         name: 'DisabledSettingsBox'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   532
                         layout: (LayoutFrame 0 0 0 0 0 1 0 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   533
                         uuid: '591fbe9c-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   534
                         initiallyInvisible: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   535
                         component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   536
                        (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   537
                           collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   538
                            (LabelSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   539
                               label: 'whyDisabledLabel'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   540
                               name: 'whyDisabledLabel'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   541
                               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   542
                               uuid: '591fbfb4-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   543
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   544
                               labelChannel: whyDisabledInfoHolder
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
   545
                             )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   546
                            )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   547
                          
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   548
                         )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   549
                       )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   550
                      (SubCanvasSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   551
                         name: 'SubCanvas'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   552
                         layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   553
                         uuid: '591fc144-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   554
                         hasHorizontalScrollBar: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   555
                         hasVerticalScrollBar: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   556
                         miniScrollerHorizontal: false
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   557
                         miniScrollerVertical: false
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   558
                         clientHolder: subCanvasApplicationHolder
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   559
                         createNewBuilder: false
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   560
                         postBuildCallback: postBuildSubCanvas:
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   561
                       )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   562
                      (HorizontalPanelViewSpec
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   563
                         name: 'HorizontalPanel1'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   564
                         layout: (LayoutFrame 0 0.0 -34 1 -16 1.0 0 1)
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   565
                         uuid: '591fc3ba-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   566
                         horizontalLayout: fitSpace
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   567
                         verticalLayout: center
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   568
                         horizontalSpace: 3
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   569
                         verticalSpace: 3
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   570
                         reverseOrderIfOKAtLeft: true
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   571
                         component: 
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   572
                        (SpecCollection
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   573
                           collection: (
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   574
                            (ActionButtonSpec
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   575
                               label: 'Help'
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   576
                               name: 'Help'
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   577
                               activeHelpKey: helpOnSettings
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   578
                               uuid: '591fc55e-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   579
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   580
                               tabable: true
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   581
                               model: help
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   582
                               enableChannel: enableHelp
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   583
                               extent: (Point 140 28)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   584
                             )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   585
                            (ActionButtonSpec
16480
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   586
                               label: 'Close'
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   587
                               name: 'Button4'
16631
cb639044b134 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16528
diff changeset
   588
                               activeHelpKey: closeRequest
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   589
                               uuid: '591fc734-dc5b-11e8-91fc-b8f6b1108e05'
16631
cb639044b134 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16528
diff changeset
   590
                               visibilityChannel: closeButtonVisibleHolder
16480
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   591
                               translateLabel: true
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   592
                               model: closeRequest
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   593
                               extent: (Point 141 28)
16480
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   594
                             )
f2538749dfc2 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16382
diff changeset
   595
                            (ActionButtonSpec
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   596
                               label: 'Discard'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   597
                               name: 'Reload'
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   598
                               activeHelpKey: discardChangedSettings
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   599
                               uuid: '591fc8f6-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   600
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   601
                               tabable: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   602
                               model: doReload
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   603
                               enableChannel: enableReload
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   604
                               extent: (Point 140 28)
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   605
                             )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   606
                            (ActionButtonSpec
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   607
                               label: 'Apply'
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   608
                               name: 'Apply'
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   609
                               activeHelpKey: acceptChangedSettings
18507
2844e4dee422 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18390
diff changeset
   610
                               uuid: '591fcaa4-dc5b-11e8-91fc-b8f6b1108e05'
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   611
                               translateLabel: true
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   612
                               tabable: true
15348
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   613
                               model: doSave
2747dbea7233 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15048
diff changeset
   614
                               enableChannel: enableOK
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
   615
                               extent: (Point 141 28)
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   616
                             )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   617
                            )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   618
                          
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   619
                         )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   620
                         keepSpaceForOSXResizeHandleH: true
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   621
                       )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   622
                      )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   623
                    
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   624
                   )
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   625
                 )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   626
                )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   627
              
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   628
             )
17007
e5c736e08471 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16993
diff changeset
   629
             handles: (Any 0.29999999999999999 1.0)
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   630
           )
14318
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   631
          )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   632
        
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   633
       )
9ba7b1cfc4c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14306
diff changeset
   634
     )
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   635
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   636
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   637
!SettingsDialog class methodsFor:'menu actions'!
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   638
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
   639
askForFileAndSaveSettings
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   640
    |fileName resources|
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   641
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   642
    resources := self classResources.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   643
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   644
    fileName := Dialog 
9608
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   645
        requestFileNameForSave:(resources string:'Save Settings in File') 
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   646
        default:'settings.stx'
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   647
        ok:(resources string:'Save') 
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   648
        abort:(resources string:'Cancel') 
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   649
        pattern:'*.stx'
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   650
        fromDirectory:'.'.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   651
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   652
    fileName size ~~ 0 ifTrue:[
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   653
        "not canceled"
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   654
        self saveSettingsTo:fileName.
4552
a8df4916183a saveSettings moved to UserPreferences
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   655
    ]
9608
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   656
0f2613d5fc3f changed:
Claus Gittinger <cg@exept.de>
parents: 9558
diff changeset
   657
    "Modified: / 27-10-2010 / 11:24:54 / cg"
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   658
!
14296f826d27 next step
penk
parents: 4740
diff changeset
   659
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   660
currentSettingsFilename
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   661
    | file |
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   662
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   663
    "JV@2012-02-07: Changed to save preferences back to file from which
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   664
     they have been loaded (if known). If no such file is known,
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   665
     save to DEFAULT USER SETTINGS file (default ~/.smalltalk/settings.rc)"
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   666
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   667
    file := UserPreferences current at: #settingsFilename ifAbsent:[nil].
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   668
    file isNil ifTrue:[
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   669
        file := UserPreferences defaultUserSettingsFile.
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   670
    ].
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   671
    ^ file.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   672
!
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   673
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   674
saveSettingsAsDefaultSettings
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   675
    self saveSettingsTo:(self currentSettingsFilename).
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   676
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
   677
    "Modified: / 07-02-2012 / 00:45:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   678
!
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   679
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   680
saveSettingsTo:file
14296f826d27 next step
penk
parents: 4740
diff changeset
   681
    [
14296f826d27 next step
penk
parents: 4740
diff changeset
   682
        UserPreferences current saveIn:file.
14296f826d27 next step
penk
parents: 4740
diff changeset
   683
    ] on:StreamError do:[:ex|
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   684
        self warn:(self resources 
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   685
                stringWithCRs:'Cannot save settings into: %1\(%2)' 
18739
af38bbca6ccd #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18538
diff changeset
   686
                with:file asFilename pathName 
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   687
                with:ex description).
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   688
    ]
17995
fe77393e86e8 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17965
diff changeset
   689
fe77393e86e8 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17965
diff changeset
   690
    "Modified: / 27-02-2018 / 10:58:49 / stefan"
18739
af38bbca6ccd #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18538
diff changeset
   691
    "Modified (format): / 11-04-2019 / 18:11:34 / Stefan Vogel"
4826
14296f826d27 next step
penk
parents: 4740
diff changeset
   692
!
14296f826d27 next step
penk
parents: 4740
diff changeset
   693
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
   694
saveSettingsWithoutAskingForFile
8119
f3b1dfbeb5ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8034
diff changeset
   695
    self saveSettingsAsDefaultSettings.
4548
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   696
! !
337cca67b97e *** empty log message ***
penk
parents: 4494
diff changeset
   697
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   698
!SettingsDialog class methodsFor:'menu specs'!
7021197a578f initial checkin
penk
parents:
diff changeset
   699
7021197a578f initial checkin
penk
parents:
diff changeset
   700
mainMenu
7021197a578f initial checkin
penk
parents:
diff changeset
   701
    "This resource specification was automatically generated
7021197a578f initial checkin
penk
parents:
diff changeset
   702
     by the MenuEditor of ST/X."
7021197a578f initial checkin
penk
parents:
diff changeset
   703
7021197a578f initial checkin
penk
parents:
diff changeset
   704
    "Do not manually edit this!! If it is corrupted,
7021197a578f initial checkin
penk
parents:
diff changeset
   705
     the MenuEditor may not be able to read the specification."
7021197a578f initial checkin
penk
parents:
diff changeset
   706
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   707
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   708
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   709
     MenuEditor new openOnClass:SettingsDialog andSelector:#mainMenu
7021197a578f initial checkin
penk
parents:
diff changeset
   710
     (Menu new fromLiteralArrayEncoding:(SettingsDialog mainMenu)) startUp
7021197a578f initial checkin
penk
parents:
diff changeset
   711
    "
7021197a578f initial checkin
penk
parents:
diff changeset
   712
7021197a578f initial checkin
penk
parents:
diff changeset
   713
    <resource: #menu>
7021197a578f initial checkin
penk
parents:
diff changeset
   714
7021197a578f initial checkin
penk
parents:
diff changeset
   715
    ^ 
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   716
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   717
        (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   718
         (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   719
            label: '&File'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   720
            submenu: 
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   721
           (Menu
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   722
              (
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   723
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   724
                  label: '&Load From...'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   725
                  itemValue: loadSettingsFromFile
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   726
                  isVisible: loadAndSaveSettingsItemVisible
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   727
                )
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   728
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   729
                  label: '-'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   730
                  isVisible: loadAndSaveSettingsItemVisible
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   731
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   732
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   733
                  label: 'Save'
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   734
                  itemValue: saveSettingsWithoutAskingForFile
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   735
                  isVisible: loadAndSaveSettingsItemVisible
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   736
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   737
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   738
                  label: '&Save As...'
7473
3c436374677d *** empty log message ***
sr
parents: 7172
diff changeset
   739
                  itemValue: askForFileAndSaveSettings
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   740
                  isVisible: loadAndSaveSettingsItemVisible
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   741
                )
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   742
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   743
                  label: '-'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
   744
                  isVisible: loadAndSaveSettingsItemVisible
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   745
                )
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   746
               (MenuItem
7972
Claus Gittinger <cg@exept.de>
parents: 7895
diff changeset
   747
                  label: 'E&xit'
5624
Claus Gittinger <cg@exept.de>
parents: 5577
diff changeset
   748
                  itemValue: closeRequest
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   749
                )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   750
               )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   751
              nil
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   752
              nil
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   753
            )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   754
          )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   755
         (MenuItem
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   756
            label: 'View'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   757
            submenu: 
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   758
           (Menu
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   759
              (
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   760
               (MenuItem
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   761
                  label: 'Expand All'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   762
                  itemValue: menuExpandAll
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
   763
                  hideMenuOnActivated: false
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   764
                )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   765
               (MenuItem
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   766
                  label: 'Collapse All'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
   767
                  itemValue: menuCollapseAll
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
   768
                  hideMenuOnActivated: false
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   769
                )
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   770
               (MenuItem
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   771
                  label: '-'
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   772
                )
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   773
               (MenuItem
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   774
                  label: 'Show Search Field'
18077
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
   775
                  "/ hideMenuOnActivated: false
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   776
                  indication: quickSearchFieldShownHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
   777
                )
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   778
               (MenuItem
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   779
                  label: 'Show Non-Default Settings'
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   780
                  isVisible: showNonDefaultSettingsMenuItemVisibleHolder
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
   781
                  hideMenuOnActivated: false
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   782
                  indication: showNonDefaultSettingsHolder
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
   783
                )
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   784
               )
7021197a578f initial checkin
penk
parents:
diff changeset
   785
              nil
7021197a578f initial checkin
penk
parents:
diff changeset
   786
              nil
7021197a578f initial checkin
penk
parents:
diff changeset
   787
            )
7021197a578f initial checkin
penk
parents:
diff changeset
   788
          )
7021197a578f initial checkin
penk
parents:
diff changeset
   789
         )
7021197a578f initial checkin
penk
parents:
diff changeset
   790
        nil
7021197a578f initial checkin
penk
parents:
diff changeset
   791
        nil
7021197a578f initial checkin
penk
parents:
diff changeset
   792
      )
7021197a578f initial checkin
penk
parents:
diff changeset
   793
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   794
14555
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   795
!SettingsDialog class methodsFor:'startup'!
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   796
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   797
openWithList:settingsList label:label
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   798
    ^ self 
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   799
        openWithList:settingsList 
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   800
        label:label 
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   801
        initialSettingsClass:nil
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   802
!
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   803
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   804
openWithList:settingsList label:label initialSettingsClass:settingsClassToSelectOrNil
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   805
    "given a list of page-label/class pairs,
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   806
     open a settings dialog showing that set of items."
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   807
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   808
    |settingsApp|
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   809
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   810
    settingsApp := SettingsDialog new.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   811
    settingsApp installSettingsEntries:settingsList.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   812
    settingsApp allButOpen.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   813
    settingsApp showRoot: false.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   814
    settingsApp window label:label.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   815
    settingsClassToSelectOrNil notNil ifTrue:[
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   816
        settingsApp selectItemWithClass: settingsClassToSelectOrNil.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   817
    ].
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   818
    settingsApp openWindow.
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   819
    ^ settingsApp
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   820
! !
64c3a5f9e181 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14476
diff changeset
   821
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   822
!SettingsDialog methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
   823
7021197a578f initial checkin
penk
parents:
diff changeset
   824
requestor
7021197a578f initial checkin
penk
parents:
diff changeset
   825
    "return the 'requestor' of the SettingsDialog"
7021197a578f initial checkin
penk
parents:
diff changeset
   826
7021197a578f initial checkin
penk
parents:
diff changeset
   827
    ^ requestor
7021197a578f initial checkin
penk
parents:
diff changeset
   828
!
7021197a578f initial checkin
penk
parents:
diff changeset
   829
7021197a578f initial checkin
penk
parents:
diff changeset
   830
requestor:something
7021197a578f initial checkin
penk
parents:
diff changeset
   831
    requestor := something.
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   832
!
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   833
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   834
rootItem
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   835
    ^ self applicationList root.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   836
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   837
    "Created: / 03-11-2007 / 14:23:01 / cg"
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   838
!
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   839
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   840
rootItemLabel
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   841
    ^ self rootItem label.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   842
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   843
    "Modified: / 03-11-2007 / 14:23:18 / cg"
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   844
!
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
   845
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   846
rootItemLabel:aString
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   847
    self rootItem label:aString.
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   848
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
   849
    "Modified: / 03-11-2007 / 14:23:16 / cg"
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   850
!
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   851
13086
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   852
selectedItemsName
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   853
    |sel|
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   854
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   855
    (sel := self selectedItem value) notNil ifTrue:[
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   856
        ^ sel value nameString
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   857
    ].
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   858
    ^ nil.
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   859
!
4964c4ee8a9c class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12765
diff changeset
   860
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
   861
showRoot:aBoolean
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   862
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   863
    self applicationList showRoot:aBoolean.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   864
    aBoolean ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   865
        self applicationList root children do:[:e|e expand].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   866
    ]
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   867
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
   868
    "Modified: / 15-10-2011 / 12:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
14306
9dfa3f159bd3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14305
diff changeset
   869
!
9dfa3f159bd3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14305
diff changeset
   870
9dfa3f159bd3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14305
diff changeset
   871
subCanvasApplication
9dfa3f159bd3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14305
diff changeset
   872
    ^ self subCanvasApplicationHolder value
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   873
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   874
7021197a578f initial checkin
penk
parents:
diff changeset
   875
!SettingsDialog methodsFor:'actions'!
7021197a578f initial checkin
penk
parents:
diff changeset
   876
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   877
changeLabelTo:aLabel application:aApplication
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   878
    | item |
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   879
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   880
    item := self getItemByApplication:aApplication.
5043
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   881
    item notNil ifTrue:[
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   882
        item label:aLabel.
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   883
        item changed.
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
   884
    ].
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   885
!
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
   886
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   887
destroyAll
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   888
    self realApplicationsDo:[:app | app close ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   889
!
7021197a578f initial checkin
penk
parents:
diff changeset
   890
7021197a578f initial checkin
penk
parents:
diff changeset
   891
doIndicatorClick:index 
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   892
    "handle a click on the indicator"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   893
7021197a578f initial checkin
penk
parents:
diff changeset
   894
    (self applicationList at:index) toggleExpand
7021197a578f initial checkin
penk
parents:
diff changeset
   895
!
7021197a578f initial checkin
penk
parents:
diff changeset
   896
7021197a578f initial checkin
penk
parents:
diff changeset
   897
doReload
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   898
    "discard button was pressed"
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   899
    
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   900
    |item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   901
7021197a578f initial checkin
penk
parents:
diff changeset
   902
    item := self selectedItem value.
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   903
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   904
        ^ self
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   905
    ].
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   906
    item application discardChangesAndReadSettings
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   907
!
7021197a578f initial checkin
penk
parents:
diff changeset
   908
7021197a578f initial checkin
penk
parents:
diff changeset
   909
doSave
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   910
    "accept button was pressed"
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
   911
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   912
    | item |
7021197a578f initial checkin
penk
parents:
diff changeset
   913
7021197a578f initial checkin
penk
parents:
diff changeset
   914
    item := self selectedItem value.
7021197a578f initial checkin
penk
parents:
diff changeset
   915
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self].
4388
4302767e1720 ressources from AbstractLauncherApplication
penk
parents: 4384
diff changeset
   916
    self withWaitCursorDo:[
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
   917
        item application saveSettingsIfUnsavedChangesArePresent.
4388
4302767e1720 ressources from AbstractLauncherApplication
penk
parents: 4384
diff changeset
   918
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   919
!
7021197a578f initial checkin
penk
parents:
diff changeset
   920
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   921
expandItemForApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
   922
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   923
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   924
    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
   925
    item notNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   926
        item expand
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   927
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   928
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
   929
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   930
help
8034
0e1c05cd4bfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7972
diff changeset
   931
    |item |
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   932
7021197a578f initial checkin
penk
parents:
diff changeset
   933
    item := self selectedItem value.
7021197a578f initial checkin
penk
parents:
diff changeset
   934
    (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self].
7021197a578f initial checkin
penk
parents:
diff changeset
   935
    item application help.
7021197a578f initial checkin
penk
parents:
diff changeset
   936
!
7021197a578f initial checkin
penk
parents:
diff changeset
   937
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   938
reopenLauncher
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   939
    "force the launcher to reopen an instance of itself.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   940
     Done whenever relevant look&feel settings are changed
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   941
     (actually a workaround - a much better solution would be to teach
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   942
     all smalltalk applications/views to dynamically update their style)."
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   943
14968
b6fc994956c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14872
diff changeset
   944
    |app|
b6fc994956c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14872
diff changeset
   945
b6fc994956c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14872
diff changeset
   946
    (app := self requestor) notNil ifTrue:[
b6fc994956c4 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14872
diff changeset
   947
        app reopenLauncher.
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   948
    ] ifFalse:[
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   949
        NewLauncher current reopenLauncher.
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   950
    ].
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   951
!
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
   952
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   953
sendLoadRequestToAll
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   954
    "ask all subApps to reload their idea of the current settings.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   955
     Do this, after userPrefs have been loaded from a file,
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   956
     while a settingsDialog is open"
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   957
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   958
    self realApplicationsDo:[:app |
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   959
        app readSettings.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   960
        app clearDidModifySettings.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   961
    ].
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
   962
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
   963
    "Modified: / 24-08-2010 / 18:41:36 / sr"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   964
!
7021197a578f initial checkin
penk
parents:
diff changeset
   965
7021197a578f initial checkin
penk
parents:
diff changeset
   966
sendSaveRequestToAll
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   967
    "give all subapps a chance to apply any changes.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   968
     No longer needed, as we do this at the time the subApp
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   969
     is changed; so only the current app needs this chance again,
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   970
     when about to close (seesendSaveRequestToCurrent) "
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   971
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   972
    self realApplicationsDo:[ :app |
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   973
        app saveRequest ifFalse:[
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   974
            ^ false
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   975
        ].
7021197a578f initial checkin
penk
parents:
diff changeset
   976
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
   977
    ^ true
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   978
!
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   979
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   980
sendSaveRequestToCurrent
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   981
    "when about to close the dialog, give the current
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   982
     subapp a chance to apply any changes"
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   983
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   984
    | item currentApp |
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   985
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   986
    item := self selectedItem value.
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   987
    (item isNil 
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   988
        or:[item isCategory 
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   989
        or:[(currentApp := item application) isNil]]
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   990
    ) ifTrue:[ ^ true].
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   991
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   992
    self withWaitCursorDo:[
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
   993
        ^ currentApp saveRequest.
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   994
    ].
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
   995
    ^ true
4378
7021197a578f initial checkin
penk
parents:
diff changeset
   996
! !
7021197a578f initial checkin
penk
parents:
diff changeset
   997
7021197a578f initial checkin
penk
parents:
diff changeset
   998
!SettingsDialog methodsFor:'application list access'!
7021197a578f initial checkin
penk
parents:
diff changeset
   999
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1000
addApplClass:aClassName forApplication:anApplication label:aLabel expand:aBoolean
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1001
    "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
  1002
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1003
    | class |
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1004
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1005
    class := Smalltalk classNamed:aClassName.
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1006
    class isNil ifTrue:[
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1007
        ('SettingsDialog [warning]: can''t find ', aClassName asString, ' to register') infoPrintCR.
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1008
        aClassName isString ifFalse:[
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1009
            thisContext fullPrintAll.
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1010
        ].
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1011
        ^ nil
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1012
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1013
    class autoload.
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1014
    ^ self createItemForApplication:anApplication class:aClassName label:aLabel icon:class defaultIcon expandParent:aBoolean replaceExisting:false
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
  1015
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
  1016
    "Modified: / 14-02-2011 / 20:10:11 / cg"
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1017
!
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1018
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1019
addApplClass:aClass withName:aName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1020
   "add an application to the settingsTree, take the icon from the application classes defaultIcon method"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1021
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1022
    ^ self addApplClass:aClass withName:aName icon:nil.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1023
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1024
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1025
addApplClass:aClass withName:aName expand:aBoolean
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1026
   "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
  1027
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1028
    ^ self addApplClass:aClass withName:aName icon:nil expand:aBoolean.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1029
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1030
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1031
addApplClass:aClass withName:aName icon:icon
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1032
    ^ self addApplClass:aClass withName:aName icon:icon expand:false
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1033
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1034
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1035
addApplClass:aClassName withName:aName icon:icon expand:doExpand
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1036
    |applicationLabel locIcon locClass|
7021197a578f initial checkin
penk
parents:
diff changeset
  1037
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1038
"/    (self applicationNames includes:aName) ifTrue:[
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1039
"/        ^ self getItemForName:aName.
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1040
"/    ].
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1041
    
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1042
    aClassName isNil ifTrue:[ 
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1043
        self addIcon:icon forCategory:aName.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1044
        ^ self 
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1045
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1046
    self addCategoriesFor:aName.
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1047
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1048
    locIcon := icon.
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1049
    locClass := Smalltalk classNamed:aClassName.
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  1050
    locClass isNil ifTrue:[
15356
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1051
        ('SettingsDialog [warning]: can''t find ', aClassName asString, ' to register') infoPrintCR.
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1052
        aClassName isString ifFalse:[
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1053
            thisContext fullPrintAll.
f61e4fef74fb class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15348
diff changeset
  1054
        ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1055
        ^ nil
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  1056
    ].
4838
60dfab83c50b autoload is understood by all classes (dummy if already loaded)
Claus Gittinger <cg@exept.de>
parents: 4826
diff changeset
  1057
    locClass autoload.
60dfab83c50b autoload is understood by all classes (dummy if already loaded)
Claus Gittinger <cg@exept.de>
parents: 4826
diff changeset
  1058
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1059
    (locIcon isNil and:[locClass respondsTo:#defaultIcon]) ifTrue:[ locIcon := locClass defaultIcon].
7021197a578f initial checkin
penk
parents:
diff changeset
  1060
    applicationLabel := (aName asCollectionOfSubstringsSeparatedBy:$/) last.
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1061
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1062
    ^ self 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1063
        createItemName:aName 
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1064
        label:applicationLabel 
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1065
        class:locClass 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1066
        icon:locIcon 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1067
        expandParent:doExpand 
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1068
        replaceExisting:false
9781
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
  1069
9896a1dff42c changed:
Claus Gittinger <cg@exept.de>
parents: 9617
diff changeset
  1070
    "Modified: / 14-02-2011 / 20:10:04 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1071
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1072
7021197a578f initial checkin
penk
parents:
diff changeset
  1073
addIcon:aIcon forCategory:aCategoryName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1074
    "add a new category Icon for a category"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1075
4401
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1076
    |existingItem|
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1077
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1078
    self categoryIcons at:aCategoryName put:aIcon.
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1079
    existingItem := self getItemForName:aCategoryName.
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1080
    existingItem notNil ifTrue:[
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1081
        existingItem icon:aIcon
cf3b37e747bd *** empty log message ***
penk
parents: 4400
diff changeset
  1082
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1083
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1084
7021197a578f initial checkin
penk
parents:
diff changeset
  1085
applicationNames
7021197a578f initial checkin
penk
parents:
diff changeset
  1086
    ^ self applicationList collect:[:item | item nameString].
7021197a578f initial checkin
penk
parents:
diff changeset
  1087
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1088
7021197a578f initial checkin
penk
parents:
diff changeset
  1089
categoryIcons
7021197a578f initial checkin
penk
parents:
diff changeset
  1090
    categoryIcons isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1091
        categoryIcons := Dictionary new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1092
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1093
    ^ categoryIcons 
7021197a578f initial checkin
penk
parents:
diff changeset
  1094
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1095
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1096
childrenApplicationItemFor:aApplication fromItem:anItem
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1097
    anItem application = aApplication ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1098
        ^ anItem
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1099
    ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1100
    anItem hasChildren ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1101
        anItem children do:[:aChildItem |
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1102
            ^ self childrenApplicationItemFor:aApplication fromItem:aChildItem.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1103
        ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1104
    ].
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1105
    ^ nil
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1106
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1107
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1108
getAllChildrenAppsForApplication:aApplication 
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1109
    ^ self getAllChildrenAppsForApplication:aApplication matchBlock:nil
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1110
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1111
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1112
getAllChildrenAppsForApplication:aApplication childrenClass:aClass 
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1113
    |matchBlock|
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1114
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1115
    matchBlock := [:aSubApplication | aSubApplication class == aClass ].
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1116
    ^ self getAllChildrenAppsForApplication:aApplication matchBlock:matchBlock
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1117
!
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1118
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1119
getAllChildrenAppsForApplication:aApplication matchBlock:aMatchBlock
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1120
    | children |
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1121
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1122
    children := self getAllChildrenByApplication:aApplication.
5026
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1123
    aMatchBlock notNil ifTrue:[
0eae1f1848ba instable state
penk
parents: 4898
diff changeset
  1124
        children := children select:[:aChild | aMatchBlock value:(aChild application)]
4716
3df92d455996 *** empty log message ***
penk
parents: 4703
diff changeset
  1125
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1126
    ^ 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
  1127
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1128
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1129
getAllChildrenByApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1130
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1131
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1132
    item := self getItemByApplication:aApplication.
4716
3df92d455996 *** empty log message ***
penk
parents: 4703
diff changeset
  1133
    item isNil ifTrue:[ ^ #()].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1134
    ^ item children.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1135
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1136
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1137
getApplicationsByClass:aClass
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1138
    | classEntries|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1139
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1140
    self applicationList isNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1141
        self initialize.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1142
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1143
    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
  1144
    ^ 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
  1145
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1146
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1147
getItemByApplication:anApplication
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1148
    |item|
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1149
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1150
    self applicationList do:[:anItem |
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1151
        item := self childrenApplicationItemFor:anApplication fromItem:anItem.
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1152
        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
  1153
    ].
5043
4ea8ed8336f4 checkin from browser
penk
parents: 5026
diff changeset
  1154
    ^ nil
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1155
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1156
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1157
getNameOfApplication:aApplication
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1158
    |item|
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1159
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1160
    self applicationList do:[:anItem |
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1161
        item := self childrenApplicationItemFor:aApplication fromItem:anItem.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1162
        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
  1163
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1164
    ^ ''
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1165
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1166
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1167
installSettingsEntries:aCollection
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1168
    aCollection do:[ :entry| 
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1169
        self installSettingsEntry:entry.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1170
    ].
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1171
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1172
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1173
installSettingsEntries: entries expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1174
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1175
    "Installs given settings list. If expand is true,
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1176
     dynamic settings list is expanded"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1177
    
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1178
    entries do:[ :entry| 
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1179
        self installSettingsEntry:entry expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1180
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1181
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1182
    "Created: / 15-10-2011 / 11:45:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1183
!
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1184
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1185
installSettingsEntry:entry
4895
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
  1186
    |applName applClassOrNil iconHolderOrNil|
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1187
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1188
    applName := entry at:1.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1189
    applClassOrNil := entry at:2.
4895
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
  1190
    iconHolderOrNil := entry at:3 ifAbsent:nil.
ccc8b0f0b666 *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 4893
diff changeset
  1191
    self addApplClass:applClassOrNil withName:applName icon:iconHolderOrNil value
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1192
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1193
10824
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1194
installSettingsEntry:entry expand: expand
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1195
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1196
    | applName applClassOrNil iconHolderOrNil cookedList className code classList name nameCode nameBlock nameList|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1197
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1198
    expand ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1199
        applName := entry at:1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1200
        applClassOrNil := entry at:2.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1201
        iconHolderOrNil := entry at:3 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1202
        self addApplClass:applClassOrNil withName:applName icon:iconHolderOrNil value.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1203
        ^self
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1204
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1205
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1206
    cookedList := OrderedCollection new.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1207
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1208
    className := entry at:2 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1209
    (className notNil and:[className startsWith:'[']) ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1210
        code := className copyFrom:2 to:(className size - 1).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1211
        classList := (Parser evaluate:code) select:[:clsOrNil | clsOrNil notNil].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1212
        name := entry at:1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1213
        self assert:(name includesString:'[').
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1214
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1215
        nameCode := name copyFrom:(name indexOf:$[)+1 to:(name indexOf:$])-1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1216
        nameCode := '^ [:each | ' , (nameCode copyReplaceString:'%' withString:'each') ,']'.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1217
        nameBlock := Parser evaluate:nameCode.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1218
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1219
        nameList := classList collect:nameBlock.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1220
        nameList sortWith:classList.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1221
        nameList with:classList do:[:eachName :eachClass |
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1222
            |newEntry|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1223
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1224
            newEntry := entry copy.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1225
            newEntry at:1 put:(name copyTo:(name indexOf:$[)-1),eachName.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1226
            newEntry at:2 put:eachClass name.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1227
            cookedList add:newEntry.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1228
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1229
    ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1230
        (className isNil "a directory entry"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1231
        or:[ (Smalltalk at:className) notNil "a valid entry"]) ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1232
            cookedList add:entry.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1233
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1234
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1235
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1236
    cookedList do:[:eachEntry |
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1237
        |iconCodeOrSelector iconCode iconBlock newEntry|
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1238
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1239
        iconCodeOrSelector := eachEntry at:3 ifAbsent:nil.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1240
        iconCodeOrSelector isNil ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1241
            newEntry := eachEntry
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1242
        ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1243
            newEntry := eachEntry copy.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1244
            (iconCodeOrSelector startsWith:'[') ifTrue:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1245
                iconCode := iconCodeOrSelector copyFrom:(iconCodeOrSelector indexOf:$[)+1 to:(iconCodeOrSelector indexOf:$])-1.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1246
                iconCode := '^ [:each | ' , (iconCode copyReplaceString:'%' withString:'each') ,']'.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1247
                iconBlock := Parser evaluate:iconCode.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1248
                newEntry at:3 put:(iconBlock value:(Smalltalk classNamed:(eachEntry at:2))).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1249
            ] ifFalse:[
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1250
                newEntry at:3 put:(self perform:iconCodeOrSelector).
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1251
            ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1252
        ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1253
        self installSettingsEntry:newEntry expand: false.
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1254
    ].
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1255
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1256
    "
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1257
     self withAllSubclassesDo:[:cls | cls initializeSettingsList ]
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1258
    "
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1259
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1260
    "Modified: / 16-12-2002 / 18:12:50 / penk"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1261
    "Modified: / 20-04-2011 / 17:03:33 / cg"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1262
    "Created: / 15-10-2011 / 11:49:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1263
!
b27d09ac800b Added #installEntries:expand:
vrany
parents: 10742
diff changeset
  1264
5345
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1265
parentApplicationFor:aApplication
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1266
    |item parent|
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1267
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1268
    item := (self getItemByApplication:aApplication).
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1269
    parent := item parent.
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1270
    parent notNil ifTrue:[
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1271
        ^ parent application.
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1272
    ].
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1273
    ^ nil
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1274
!
66a91b703580 access to parent application
penk
parents: 5253
diff changeset
  1275
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1276
remApplClassByName:aName 
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1277
    "remove an application from the settingsTree"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1278
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1279
    |item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1280
7021197a578f initial checkin
penk
parents:
diff changeset
  1281
    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
  1282
    self removeItem:item 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1283
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1284
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1285
removeAllApplicationsByClass:aClass
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1286
    |apps|
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1287
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1288
    apps := self getApplicationsByClass:aClass.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1289
    apps do:[:aApp |
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1290
        self removeByApplication:aApp.
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1291
    ].
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1292
!
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1293
5050
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1294
removeAllSubApplicationsFor:aApp
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1295
    |apps|
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1296
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1297
    apps := self getAllChildrenAppsForApplication:aApp.
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1298
    apps do:[:aApp |
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1299
        self removeByApplication:aApp.
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1300
    ].
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1301
!
566eab79b16b checkin from browser
penk
parents: 5043
diff changeset
  1302
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1303
removeApplicationByClass:aClass
7021197a578f initial checkin
penk
parents:
diff changeset
  1304
    | classEntries|
7021197a578f initial checkin
penk
parents:
diff changeset
  1305
7021197a578f initial checkin
penk
parents:
diff changeset
  1306
    self applicationList isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1307
        self initialize.
7021197a578f initial checkin
penk
parents:
diff changeset
  1308
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1309
    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
  1310
    classEntries do:[:aItem |
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1311
        self removeItem:aItem.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1312
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1313
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1314
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1315
removeApplicationFromTree:aApplication
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1316
    | classEntries|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1317
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1318
    self applicationList isNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1319
        self initialize.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1320
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1321
    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
  1322
    classEntries do:[:aItem |
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1323
        self removeItem:aItem.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1324
    ].
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1325
    self applicationList removeAllFoundIn:classEntries.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1326
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1327
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1328
removeByApplication:aApplication
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1329
    | item |
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1330
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1331
    item := self getItemByApplication:aApplication.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1332
    item notNil ifTrue:[
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1333
        self removeItem:item.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1334
    ]
5058
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1335
!
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1336
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1337
sortSubApplicationsFor:anApplication
5059
a39dd428776c *** empty log message ***
penk
parents: 5058
diff changeset
  1338
    |item|
5058
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1339
bfa6a2d39edb *** empty log message ***
penk
parents: 5050
diff changeset
  1340
    item := self getItemByApplication:anApplication.
8268
ad2da5c435b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8119
diff changeset
  1341
    item sort:[:a :b| a label < b label].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1342
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1343
6325
0b18b7564248 code cleanup
Claus Gittinger <cg@exept.de>
parents: 6293
diff changeset
  1344
!SettingsDialog methodsFor:'application list access-private'!
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1345
7021197a578f initial checkin
penk
parents:
diff changeset
  1346
addCategoriesFor:aName
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1347
    "create all the categories"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1348
5253
193cbf909cef not ifTrue -> ifFalse
Claus Gittinger <cg@exept.de>
parents: 5164
diff changeset
  1349
    (aName includes:$/) ifFalse:[ ^ self].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1350
    self treeName:aName butLast:1 do:[:currentLabel :currentName| 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1351
        |length icon|
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1352
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1353
        currentLabel notEmpty ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1354
            icon := self categoryIcons at:currentName ifAbsent:[nil].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1355
            self createItemName:currentName label:currentLabel icon:icon replaceExisting:true.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1356
        ]
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1357
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1358
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1359
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1360
createItemForApplication:anApplication class:aClass label:aLabel icon:anIcon expandParent:expandParent replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1361
    "create an application item in my application list"
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1362
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1363
    | newItem parent locIcon item|
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1364
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1365
    parent := self getItemByApplication:anApplication.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1366
    parent isNil ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1367
        ^ nil
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1368
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1369
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1370
    doReplaceExisting ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1371
        parent children notNil ifTrue:[
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1372
            (item := parent children detect:[ :anItem | anItem application == anApplication] ifNone:[nil]) notNil ifTrue:[
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1373
                ^ item.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1374
            ]
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1375
        ]
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1376
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1377
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1378
    newItem := self class itemClass new.  
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1379
    "/ newItem label:(resources string:aLabel) "allBold".
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1380
    newItem label:aLabel "allBold".
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1381
    newItem nameString:(anApplication itemPathName , aLabel).
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1382
    newItem applicationClass:aClass.
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1383
    locIcon := anIcon.
4898
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1384
    locIcon isNil ifTrue:[ locIcon := self class defaultSettingsAppIcon].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1385
    newItem icon:locIcon.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1386
    parent add:newItem.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1387
    expandParent ifTrue:[
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1388
        parent expand.
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1389
    ].
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1390
    ^ newItem
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1391
!
6205a8c28e30 *** empty log message ***
penk
parents: 4895
diff changeset
  1392
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1393
createItemName:aNameString label:aLabel class:aClass icon:anIcon
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1394
    ^ self createItemName:aNameString label:aLabel class:aClass icon:anIcon expandParent:false
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1395
!
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1396
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1397
createItemName:aNameString label:aLabel class:aClass icon:anIcon expandParent:expandParent
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1398
    ^ self
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1399
        createItemName:aNameString 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1400
        label:aLabel 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1401
        class:aClass 
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1402
        icon:anIcon 
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1403
        expandParent:expandParent
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1404
        replaceExisting:true
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1405
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1406
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1407
createItemName:aNameString label:untranslatedLabel class:aClass icon:anIcon expandParent:expandParent replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1408
    "create an application item in my application list"
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1409
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1410
    |newItem parentsName parent locIcon item|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1411
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1412
    (aNameString includes:$/) ifTrue:[
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1413
        parentsName := aNameString copyTo:(aNameString lastIndexOf:$/)-1.
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1414
        parent := self getItemForName:parentsName.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1415
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1416
    parent isNil ifTrue:[
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1417
        parent := self rootItem.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1418
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1419
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1420
    doReplaceExisting ifTrue:[
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1421
        parent children notNil ifTrue:[
5577
adcc748a39b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  1422
            (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
  1423
                ^ item.
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1424
            ]
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1425
        ]
7021197a578f initial checkin
penk
parents:
diff changeset
  1426
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1427
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1428
    newItem := self class itemClass new.  
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
  1429
    "/ newItem label:(resources string:aLabel) "allBold".
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1430
    newItem label:(resources string:untranslatedLabel) "allBold".
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1431
    newItem nameString:aNameString.
7021197a578f initial checkin
penk
parents:
diff changeset
  1432
    newItem applicationClass:aClass.
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1433
    locIcon := anIcon.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1434
    locIcon isNil ifTrue:[ locIcon := self class defaultSettingsAppIcon].
7021197a578f initial checkin
penk
parents:
diff changeset
  1435
    newItem icon:locIcon.
4384
e16e816f6680 *** empty log message ***
penk
parents: 4378
diff changeset
  1436
    parent add:newItem.
4873
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1437
    expandParent ifTrue:[
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1438
        parent expand.
3ffb8a8812ec *** empty log message ***
penk
parents: 4844
diff changeset
  1439
    ].
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1440
    ^ newItem
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1441
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1442
    "Modified: / 03-11-2007 / 14:23:32 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1443
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1444
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1445
createItemName:aNameString label:aLabel icon:anIcon
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1446
    "create an application item in my application list"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1447
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1448
    self createItemName:aNameString label:aLabel class:nil icon:anIcon expandParent:false
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1449
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1450
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1451
createItemName:aNameString label:aLabel icon:anIcon replaceExisting:doReplaceExisting
6127
ffab88b8b1e5 beautified
Claus Gittinger <cg@exept.de>
parents: 6126
diff changeset
  1452
    "create an application item in my application list"
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1453
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1454
    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
  1455
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1456
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1457
getItemForName:aName
7021197a578f initial checkin
penk
parents:
diff changeset
  1458
    | searchItem|
7021197a578f initial checkin
penk
parents:
diff changeset
  1459
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1460
    searchItem := self rootItem.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1461
    self treeName:aName do:[:currentLabel :currentName|
7021197a578f initial checkin
penk
parents:
diff changeset
  1462
        searchItem children isNil ifTrue:[ ^ nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1463
        searchItem := searchItem children detect:[: item | item nameString = currentName] ifNone:[nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1464
        searchItem isNil ifTrue:[ ^ nil].
7021197a578f initial checkin
penk
parents:
diff changeset
  1465
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1466
    ^ searchItem
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1467
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1468
    "Modified: / 03-11-2007 / 14:23:28 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1469
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1470
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1471
realApplications
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1472
    "return a collection of all real (non-folder) applications.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1473
     A helper to avoid code duplication"
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1474
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1475
    ^ self applicationList 
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1476
        select:[:appItem | appItem isCategory not and:[ appItem application notNil]]
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1477
        thenCollect:[:appItem | appItem application].
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1478
!
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1479
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1480
realApplicationsDo:aBlock
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1481
    "evaluate aBlock for all real (non-folder) applications.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1482
     A helper to avoid code duplication"
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1483
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1484
    self realApplications do:aBlock.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1485
!
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1486
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1487
removeItem:anItem 
7895
c658466812c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7880
diff changeset
  1488
    "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
  1489
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1490
    |parent remParent|
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1491
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1492
    anItem application release.
4893
39dec723f6ad *** empty log message ***
penk
parents: 4886
diff changeset
  1493
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1494
    parent := anItem parent.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1495
    parent isNil ifTrue:[" already removed " ^ self].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1496
    parent remove:anItem.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1497
    
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1498
    [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
  1499
        remParent := parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1500
        parent := remParent parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1501
        parent remove:remParent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1502
    ].
6505
311c27b13f51 translation of empty (organization-only) items
Claus Gittinger <cg@exept.de>
parents: 6389
diff changeset
  1503
    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
  1504
    self selectedItem value:parent.
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1505
!
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1506
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1507
treeName:aName butLast:last do:aBlock 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1508
    | tree  length|
7021197a578f initial checkin
penk
parents:
diff changeset
  1509
7021197a578f initial checkin
penk
parents:
diff changeset
  1510
    tree := aName asCollectionOfSubstringsSeparatedBy:$/.
7021197a578f initial checkin
penk
parents:
diff changeset
  1511
    tree from:1 to:(tree size - last) keysAndValuesDo:[:idx :aCategory| | itemName |
7021197a578f initial checkin
penk
parents:
diff changeset
  1512
        length := 0.
7021197a578f initial checkin
penk
parents:
diff changeset
  1513
        tree from:1 to:idx keysAndValuesDo:[:idx2 : el | 
7021197a578f initial checkin
penk
parents:
diff changeset
  1514
            length := length + el size.
7021197a578f initial checkin
penk
parents:
diff changeset
  1515
            idx2 > 1 ifTrue:[length := length + 1].
7021197a578f initial checkin
penk
parents:
diff changeset
  1516
        ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1517
        itemName := aName copyTo:length.
7021197a578f initial checkin
penk
parents:
diff changeset
  1518
        aBlock value:aCategory value:itemName.
7021197a578f initial checkin
penk
parents:
diff changeset
  1519
    ].
4879
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1520
!
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1521
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1522
treeName:aName do:aBlock
0a36635a9193 registration changes
Claus Gittinger <cg@exept.de>
parents: 4873
diff changeset
  1523
    self treeName:aName butLast:0 do:aBlock
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1524
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1525
7021197a578f initial checkin
penk
parents:
diff changeset
  1526
!SettingsDialog methodsFor:'aspects'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1527
7021197a578f initial checkin
penk
parents:
diff changeset
  1528
applicationList
7021197a578f initial checkin
penk
parents:
diff changeset
  1529
    applicationList isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1530
        applicationList := SettingsDialog::HierarchicalApplicationList new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1531
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1532
    ^ applicationList.
7021197a578f initial checkin
penk
parents:
diff changeset
  1533
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1534
16481
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1535
closeButtonVisibleHolder
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1536
    ^ builder valueAspectFor:#'closeButtonVisibleHolder' initialValue:false
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1537
!
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1538
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1539
enableHelp
7021197a578f initial checkin
penk
parents:
diff changeset
  1540
    enableHelp isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1541
        enableHelp := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1542
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1543
    ^ enableHelp.
7021197a578f initial checkin
penk
parents:
diff changeset
  1544
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1545
7021197a578f initial checkin
penk
parents:
diff changeset
  1546
enableOK
7021197a578f initial checkin
penk
parents:
diff changeset
  1547
    enableOK isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1548
        enableOK := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1549
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1550
    ^ enableOK.
7021197a578f initial checkin
penk
parents:
diff changeset
  1551
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1552
7021197a578f initial checkin
penk
parents:
diff changeset
  1553
enableReload
7021197a578f initial checkin
penk
parents:
diff changeset
  1554
    enableReload isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1555
        enableReload := true asValue.
7021197a578f initial checkin
penk
parents:
diff changeset
  1556
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1557
    ^ enableReload.
7021197a578f initial checkin
penk
parents:
diff changeset
  1558
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1559
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1560
loadAndSaveSettingsItemVisible
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1561
    "for now, only show these if I have a requestor 
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1562
     (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
  1563
     settingsDialog. I think this has to be reworked..."
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1564
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1565
    ^ requestor notNil "/ loadAndSaveSettingsItemVisible
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1566
!
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  1567
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1568
quickSearchFieldShownHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1569
    quickSearchFieldShownHolder isNil ifTrue:[
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1570
        quickSearchFieldShownHolder := true asValue.
18077
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1571
        quickSearchFieldShownHolder 
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1572
            onChangeEvaluate:[:sel :quickSearchFieldShown|
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1573
                quickSearchFieldShown ifTrue:[
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1574
                    "when the search box is opened, warp the focus into the field"
18077
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1575
                    self enqueueDelayedAction:[
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1576
                        (self componentAt:#QuickSeachEntryField) requestFocus
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1577
                    ]        
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1578
                ]        
98f9cde4cdda #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18076
diff changeset
  1579
            ]            
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1580
    ].
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1581
    ^ quickSearchFieldShownHolder.
18538
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1582
59d86bc7659f #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 18507
diff changeset
  1583
    "Modified (format): / 11-12-2018 / 14:39:18 / Stefan Vogel"
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1584
!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1585
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1586
quickSearchStringHolder
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1587
    <resource: #uiAspect>
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1588
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1589
    quickSearchStringHolder isNil ifTrue:[
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1590
        quickSearchStringHolder := ValueHolder new.
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1591
        quickSearchStringHolder onChangeSend:#quickSearchStringHolderChanged to:self.
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1592
    ].
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1593
    ^ quickSearchStringHolder.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1594
!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1595
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1596
selectedItem
7021197a578f initial checkin
penk
parents:
diff changeset
  1597
    selectedItem isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1598
        selectedItem := ValueHolder new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1599
        selectedItem addDependent:self.
7021197a578f initial checkin
penk
parents:
diff changeset
  1600
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1601
    ^ selectedItem.
7021197a578f initial checkin
penk
parents:
diff changeset
  1602
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1603
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1604
showNonDefaultSettingsHolder
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1605
    |holder|
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1606
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1607
    holder := builder valueAspectFor:#'showNonDefaultSettingsHolder' initialValue:false.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1608
    holder onChangeSend:#showNonDefaultSettingsHolderChanged to:self.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1609
    ^ holder
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1610
!
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1611
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1612
showNonDefaultSettingsMenuItemVisibleHolder
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1613
    ^ builder valueAspectFor:#'showNonDefaultSettingsMenuItemVisibleHolder' initialValue:false
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1614
!
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  1615
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1616
subCanvasApplicationHolder
7021197a578f initial checkin
penk
parents:
diff changeset
  1617
    subCanvasApplicationHolder isNil ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1618
        subCanvasApplicationHolder := ValueHolder new.
7021197a578f initial checkin
penk
parents:
diff changeset
  1619
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1620
    ^ subCanvasApplicationHolder.
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1621
!
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1622
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1623
whyDisabledInfoHolder
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1624
    whyDisabledInfoHolder isNil ifTrue:[
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1625
        whyDisabledInfoHolder := '' asValue.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1626
    ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1627
    ^ whyDisabledInfoHolder.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1628
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1629
    "Created: / 25-01-2007 / 17:13:50 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1630
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1631
7021197a578f initial checkin
penk
parents:
diff changeset
  1632
!SettingsDialog methodsFor:'change & update'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1633
7021197a578f initial checkin
penk
parents:
diff changeset
  1634
modifiedChanged
14305
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1635
    |modified|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1636
14305
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1637
    modified := self subCanvasApplication modifiedChannel value.
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1638
    self enableOK value:modified.
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1639
    self enableReload value:modified.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1640
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1641
7021197a578f initial checkin
penk
parents:
diff changeset
  1642
selectionChanged
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1643
    "settings selection has changed;
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1644
     first send the previous application a saveRequest;
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1645
     then construct the new selected application (if not yet done before),
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1646
     and set it in the right subcanvas"
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1647
     
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1648
    |item oldAppl noApp lbl window app itemLabel|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1649
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1650
    item := self selectedItem value.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1651
    item == lastSelection  ifTrue:[ ^ self].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1652
14305
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1653
    oldAppl := self subCanvasApplication.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1654
    oldAppl notNil ifTrue:[
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1655
        oldAppl saveRequest ifFalse:[
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1656
            lastSelection notNil ifTrue:[
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1657
                self
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1658
                    enqueueMessage:#value 
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1659
                    for:[ 
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1660
                        self selectedItem value:lastSelection 
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1661
                    ]
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1662
                    arguments:#().
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1663
            ].
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1664
            ^ self
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1665
        ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1666
        oldAppl modifiedChannel removeDependent:self.
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1667
        self unhighlightWidgets.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1668
    ].
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1669
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1670
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1671
    item isNil ifTrue:[ item := applicationList root ].
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1672
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1673
    lastSelection := item.
18390
f908dc1c5812 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18322
diff changeset
  1674
    noApp := item isNil or:[item isCategory].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1675
    self enableOK value:(noApp not).
7021197a578f initial checkin
penk
parents:
diff changeset
  1676
    self enableReload value:(noApp not).
7021197a578f initial checkin
penk
parents:
diff changeset
  1677
    self enableHelp value:(noApp not).
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1678
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1679
    window := self window.
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1680
    window notNil ifTrue:[
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1681
        lbl := self rootItemLabel ? 'Settings Dialog'.
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1682
        item notNil ifTrue:[
14652
c87730707b26 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14555
diff changeset
  1683
            itemLabel := item label.
c87730707b26 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14555
diff changeset
  1684
            itemLabel := itemLabel copyReplaceAll:(Character cr) with:(Character space) ifNone:itemLabel.
6126
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1685
            itemLabel ~= lbl ifTrue:[
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1686
                lbl := lbl , ' [', itemLabel, ']'.
fbe0461cda6b window label handling
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
  1687
            ]
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1688
        ].
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1689
        window label:lbl.
4406
d157f56c5ac9 *** empty log message ***
penk
parents: 4405
diff changeset
  1690
    ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1691
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1692
    builder notNil ifTrue:[ |box|
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1693
        "hide the DisabledSettingsBox"
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1694
        box := builder componentAt:#DisabledSettingsBox.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1695
        box notNil ifTrue:[
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1696
            box beInvisible; lower.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1697
        ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1698
    ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1699
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1700
    noApp ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1701
        self subCanvasApplicationHolder value:nil.
7021197a578f initial checkin
penk
parents:
diff changeset
  1702
        ^ self
7021197a578f initial checkin
penk
parents:
diff changeset
  1703
    ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1704
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1705
    app := item application.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1706
    app isNil ifTrue:[
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1707
        app := item applicationClass basicNew.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1708
        (app isEnabledInSettingsDialog:self) ifFalse:[
7613
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1709
            "raise the DisabledSettingsBox above the settings window"
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1710
            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
  1711
            builder notNil ifTrue:[ |box|
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1712
                box := builder componentAt:#DisabledSettingsBox.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1713
                box notNil ifTrue:[
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1714
                    box beVisible; raise.
7b59de1f0350 Fix race when changing a selection
Stefan Vogel <sv@exept.de>
parents: 7609
diff changeset
  1715
                ].
7609
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1716
            ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1717
            self subCanvasApplicationHolder value:nil.
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1718
            ^ self
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1719
        ].
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1720
f9ed6dd88645 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7473
diff changeset
  1721
        item application:app.
16333
3945c8d42ab7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16325
diff changeset
  1722
        app settingsDialog:self.
4703
deb516ae2481 a lot of changes - server is running but there is something left to do
penk
parents: 4659
diff changeset
  1723
        app basicInitialize.
16645
bd1b6aa81dff #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16632
diff changeset
  1724
        app createBuilder.
17087
eff5471c3404 #BUGFIX by Maren
matilk
parents: 17007
diff changeset
  1725
        app initialize.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1726
    ].
5164
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1727
    self withWaitCursorDo:[
16333
3945c8d42ab7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16325
diff changeset
  1728
        app settingsDialog:self.
5164
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1729
        app readSettings.
35a9d096be9b *** empty log message ***
penk
parents: 5146
diff changeset
  1730
    ].
4435
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1731
    app modifiedChannel addDependent:self.
854d330d659e care for nil selection
Claus Gittinger <cg@exept.de>
parents: 4433
diff changeset
  1732
    self subCanvasApplicationHolder value:app.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1733
    self modifiedChanged.
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  1734
    
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1735
    self highlightWidgetsWithMatchingSearchString.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1736
    "/ does not yet work fully
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1737
    false ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1738
        self highlightWidgetsWithChangedSettings.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1739
    ].
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1740
9617
7c53e41f20cf added: #selectItemWithClass:
Claus Gittinger <cg@exept.de>
parents: 9608
diff changeset
  1741
    "Modified: / 29-10-2010 / 11:51:13 / cg"
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1742
    "Modified: / 17-02-2012 / 10:24:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1743
    "Modified (comment): / 06-08-2018 / 16:13:42 / Claus Gittinger"
18390
f908dc1c5812 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 18322
diff changeset
  1744
    "Modified: / 18-09-2018 / 12:08:30 / Stefan Vogel"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1745
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1746
7021197a578f initial checkin
penk
parents:
diff changeset
  1747
update:something with:aParameter from:changedObject
6293
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1748
    |subCanvasApplication|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1749
7021197a578f initial checkin
penk
parents:
diff changeset
  1750
    changedObject == self selectedItem ifTrue:[
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1751
        super update:something with:aParameter from:changedObject.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1752
        self selectionChanged.
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  1753
        ^ self.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1754
    ].
14305
be12b81e53ff class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14239
diff changeset
  1755
    subCanvasApplication := self subCanvasApplication.
6293
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1756
    (subCanvasApplication notNil 
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1757
    and:[changedObject == subCanvasApplication modifiedChannel]) ifTrue:[
1c16cd8fdb79 stupid comment
Claus Gittinger <cg@exept.de>
parents: 6127
diff changeset
  1758
        self modifiedChanged.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1759
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1760
    super update:something with:aParameter from:changedObject
7021197a578f initial checkin
penk
parents:
diff changeset
  1761
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1762
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1763
!SettingsDialog methodsFor:'changed settings highlighting'!
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1764
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1765
highlightWidgetsWithChangedSettings
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1766
    "whenever an app is selected AND a quick search string is present,
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1767
     go through the widgets and highlight those which match.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1768
     This is done by looking at the helpkey and model aspects for a match"
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1769
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1770
    |app pattern widgetsToHighlight|
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1771
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1772
    highlightedWidgetsOriginalAttributes notNil ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1773
        self unhighlightWidgets.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1774
    ].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1775
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1776
    (app := subCanvasApplicationHolder value) isNil ifTrue:[^ self].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1777
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1778
    widgetsToHighlight := self widgetsWithChangedSettingsIn:app.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1779
    self highlightWidgets:widgetsToHighlight.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1780
!
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1781
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1782
showNonDefaultSettingsHolderChanged
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1783
    "the show-non-default settings check box has changed.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1784
     remember the current selection, 
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1785
     update the highlighting of matching fields (and expand corresponding tree nodes),
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1786
     then reselect (because the treeView is too stupid in loosing the selection,
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1787
     when expanding/hiding)"
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1788
     
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1789
    |oldSelection pattern showNonDefault matchingTreeItems|
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1790
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1791
    oldSelection := self selectedItem value.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1792
    self unhighlightFoundItemsFromSearch.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1793
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1794
    (showNonDefault := self showNonDefaultSettingsHolder value) ifFalse:[^ self].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1795
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1796
    self highlightApplicationsForWhich:[:app | app hasValuesDifferentFromDefault].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1797
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1798
    oldSelection notNil ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1799
        oldSelection makeVisible.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1800
        self selectedItem value:oldSelection.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1801
        self highlightWidgetsWithChangedSettings
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1802
    ].    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1803
!
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1804
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1805
widgetsWithChangedSettingsIn:anApplication
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1806
    "helper:
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1807
     go through the widgets and find those which have a value different
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1808
     from the default settings.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1809
     This is done by looking at model value (hope they have)"
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1810
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1811
    |  widgetsToHighlight |
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1812
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1813
    widgetsToHighlight := Set new.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1814
    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1815
    anApplication widgetsWithChangedSettingsDo:[:eachView |
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1816
        |alreadyIn|
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1817
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1818
        "/ check if a superview also has it (frames/framedboxes, etc.)
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1819
        alreadyIn := false.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1820
        eachView allSuperViewsDo:[:sv | (widgetsToHighlight includes:sv) ifTrue:[ alreadyIn := true]].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1821
        alreadyIn ifFalse:[ widgetsToHighlight add:eachView ].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1822
    ].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1823
    ^ widgetsToHighlight.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1824
! !
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  1825
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1826
!SettingsDialog methodsFor:'initialization & release'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1827
7021197a578f initial checkin
penk
parents:
diff changeset
  1828
closeRequest
15048
4e8598056078 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14968
diff changeset
  1829
    "This is a hook method.
4e8598056078 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14968
diff changeset
  1830
     It will be invoked when your app/dialog-window is about to be closed.
4e8598056078 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14968
diff changeset
  1831
     This method has a chance to suppress the close by returning false.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1832
     See also #closeDownViews, which is invoked when the close is really done."
7021197a578f initial checkin
penk
parents:
diff changeset
  1833
17957
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1834
    | req notAgainText answer holder|
6019
001740075800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
  1835
4659
a7f00925e26b some errors fixed
penk
parents: 4639
diff changeset
  1836
    (self sendSaveRequestToCurrent == false) ifTrue:[^ self].
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1837
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1838
    "/ if any of my subApps has made a change, ask user if he wants
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1839
    "/ to write the settings file
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1840
    (self realApplications contains:[:app | app didModifySettings]) ifTrue:[
15523
429b7e780d5a class: SettingsDialog
ca
parents: 15487
diff changeset
  1841
        "D121136 - Filename doesnot understand allBold"
17957
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1842
        notAgainText := resources string:'Do not ask this again (always save changes when closing)'.
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1843
        answer := self class autoSaveChangedSettingsOnClose.
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1844
        answer ifFalse:[
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1845
            Dialog 
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1846
                modifyingBoxWith:[:box |
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1847
                    holder := false asValue.
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1848
                    holder onChangeEvaluate:[ 
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1849
                        box noButton enabled:(holder value not)
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1850
                    ].
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1851
                    box verticalPanel add:((CheckBox label:notAgainText) model:holder).
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1852
                ] 
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1853
                do:[
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1854
                    answer := Dialog 
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1855
                                confirm:(resources 
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1856
                                    stringWithCRs:'Save your changed settings in the settings file?\(which is: "%1")\\If not saved, these changes only apply to your current session.'
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1857
                                    with:self class currentSettingsFilename asString allBold)
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1858
                ].
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1859
                self class autoSaveChangedSettingsOnClose:(holder value).
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1860
        ].
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1861
eeb60459f36f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17910
diff changeset
  1862
        answer ifTrue:[
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1863
            self saveSettingsWithoutAskingForFile.
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1864
        ].
16993
a8927e2fc4b1 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16991
diff changeset
  1865
        "D122540 - Dialog opens twice"
a8927e2fc4b1 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16991
diff changeset
  1866
        self realApplications do:[:each| each clearDidModifySettings ].
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1867
    ].
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1868
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1869
    self destroyAll.
4400
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1870
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1871
    req := self requestor.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1872
    req notNil ifTrue:[
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1873
        req settingsClosed.
5b1bf011547f add examples
penk
parents: 4397
diff changeset
  1874
    ].
6635
e20f08617728 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6505
diff changeset
  1875
    super closeRequest
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1876
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1877
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1878
createRootItem
7172
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1879
    |rootItem lbl|
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1880
16971
e37f456e483b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16944
diff changeset
  1881
    "/ this is stupidly wrong!!
e37f456e483b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16944
diff changeset
  1882
    "/ if the launcher thinks it needs this, it should set the resources
e37f456e483b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16944
diff changeset
  1883
    "/ (otherwise, reuse of resource dialog is difficult eg. in expecco)
e37f456e483b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16944
diff changeset
  1884
    "/ resources := AbstractLauncherApplication resources.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1885
    rootItem := self class itemClass new.
7172
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1886
    lbl := resources string:'Settings'.
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1887
    rootItem label:lbl "allBold".
042c3e1278e4 order of setting items
Claus Gittinger <cg@exept.de>
parents: 7100
diff changeset
  1888
    rootItem nameString:lbl.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1889
    rootItem icon:self class settingsIcon.
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1890
    rootItem applicationClass: SettingsFilenameAppl.
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1891
    ^ rootItem
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1892
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1893
    "Created: / 03-11-2007 / 14:22:01 / cg"
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  1894
    "Modified: / 07-02-2012 / 01:03:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1895
!
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1896
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1897
initialize
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1898
    |rootItem|
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1899
16971
e37f456e483b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16944
diff changeset
  1900
    super initialize.
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1901
    rootItem := self createRootItem.
6124
233e703f84a4 access to rootItem & showRoot
Claus Gittinger <cg@exept.de>
parents: 6024
diff changeset
  1902
    self applicationList root:rootItem; showRoot:true "false".
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1903
    self selectedItem value:rootItem.
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1904
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1905
    "Modified: / 03-11-2007 / 14:22:18 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1906
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1907
7021197a578f initial checkin
penk
parents:
diff changeset
  1908
postBuildSubCanvas:aWidget
7021197a578f initial checkin
penk
parents:
diff changeset
  1909
    aWidget keepClientView:true. 
7021197a578f initial checkin
penk
parents:
diff changeset
  1910
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1911
16481
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1912
postBuildWith:aBuilder
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1913
    super postBuildWith:aBuilder.
16632
9898e98f58a2 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16631
diff changeset
  1914
    self window isModal ifFalse:[
9898e98f58a2 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16631
diff changeset
  1915
        self closeButtonVisibleHolder value:true
9898e98f58a2 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 16631
diff changeset
  1916
    ].    
16481
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1917
!
162b6dd5ebc8 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16480
diff changeset
  1918
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1919
postOpenWith:aBuilder
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1920
    |items searchItem|
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  1921
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1922
    self rootItem expand.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1923
    super postOpenWith:aBuilder.
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1924
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1925
    lastSelection isNil ifTrue:[
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1926
        "/ if there is only one child, select it initially
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1927
        "/ may also be inside a one-child-only parent.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1928
        searchItem := self rootItem.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1929
        (items := searchItem children) size == 1 ifTrue:[
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1930
            searchItem := items anElement     
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1931
        ].
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1932
        searchItem notNil ifTrue:[
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1933
            self selectedItem value:searchItem.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1934
        ]
10742
c6c9b272ac55 changed: #postOpenWith: (pre-select settings if there is only one child of the root)
vrany
parents: 10396
diff changeset
  1935
    ]
7880
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1936
c5e6528bd927 provide access to the rootItem
Claus Gittinger <cg@exept.de>
parents: 7873
diff changeset
  1937
    "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
  1938
    "Modified: / 03-10-2011 / 16:27:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17704
a14b0a39f7b3 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 17649
diff changeset
  1939
    "Modified: / 09-10-2017 / 17:20:04 / stefan"
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  1940
    "Modified (format): / 06-08-2018 / 16:23:33 / Claus Gittinger"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1941
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  1942
7021197a578f initial checkin
penk
parents:
diff changeset
  1943
!SettingsDialog methodsFor:'menu actions'!
7021197a578f initial checkin
penk
parents:
diff changeset
  1944
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1945
askForFileAndSaveSettings
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1946
    self class askForFileAndSaveSettings.
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  1947
    self realApplicationsDo:[:app | app clearDidModifySettings].
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1948
!
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  1949
4574
bcc59a552bca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4552
diff changeset
  1950
loadSettingsFromFile
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1951
    "restore settings from a settings-file."
7021197a578f initial checkin
penk
parents:
diff changeset
  1952
7021197a578f initial checkin
penk
parents:
diff changeset
  1953
    "a temporary kludge - we need a central systemSettings object for this,
7021197a578f initial checkin
penk
parents:
diff changeset
  1954
     which can be saved/restored with a single store/read."
7021197a578f initial checkin
penk
parents:
diff changeset
  1955
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1956
    |oldFile dir fileName transcript launcher|
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1957
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1958
    (oldFile := UserPreferences current at:#settingsFilename) notNil ifTrue:[
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1959
        dir := oldFile asFilename directory.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1960
    ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1961
7021197a578f initial checkin
penk
parents:
diff changeset
  1962
    fileName := Dialog 
4740
ecd679058be3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4716
diff changeset
  1963
        requestFileName:(resources string:'Load Settings from File') 
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1964
        default:'settings.stx'
7021197a578f initial checkin
penk
parents:
diff changeset
  1965
        ok:(resources string:'Load') 
7021197a578f initial checkin
penk
parents:
diff changeset
  1966
        abort:(resources string:'Cancel') 
7021197a578f initial checkin
penk
parents:
diff changeset
  1967
        pattern:'*.stx'
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  1968
        fromDirectory:dir.
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1969
7021197a578f initial checkin
penk
parents:
diff changeset
  1970
    (fileName size == 0) ifTrue:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1971
        "/ canceled
7021197a578f initial checkin
penk
parents:
diff changeset
  1972
        ^ self
7021197a578f initial checkin
penk
parents:
diff changeset
  1973
    ].
7021197a578f initial checkin
penk
parents:
diff changeset
  1974
7021197a578f initial checkin
penk
parents:
diff changeset
  1975
    self withWaitCursorDo:[
7021197a578f initial checkin
penk
parents:
diff changeset
  1976
        Smalltalk fileIn:fileName.
5629
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1977
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1978
        "/ Transcript current topView model reOpen.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1979
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1980
        transcript := Transcript current.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1981
        (transcript notNil and:[transcript isExternalStream not]) ifTrue:[
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1982
            launcher := transcript application.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1983
            launcher notNil ifTrue:[
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1984
                launcher reopenLauncher.
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1985
            ]
2cb05ef96502 care for nonPosStream transcript
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1986
        ].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1987
        self sendLoadRequestToAll.
7021197a578f initial checkin
penk
parents:
diff changeset
  1988
    ].
7100
e273c6f4602d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
  1989
e273c6f4602d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6688
diff changeset
  1990
    "Modified: / 08-09-2006 / 19:23:15 / cg"
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  1991
!
7021197a578f initial checkin
penk
parents:
diff changeset
  1992
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1993
menuCollapseAll
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1994
    applicationList root children do:[:each | each collapse].
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1995
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1996
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1997
menuExpandAll
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1998
    applicationList root children do:[:each | each recursiveExpand].
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  1999
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2000
5465
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  2001
saveSettingsWithoutAskingForFile
2c1dc7101e03 *** empty log message ***
ca
parents: 5422
diff changeset
  2002
    self class saveSettingsWithoutAskingForFile.
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  2003
    self realApplicationsDo:[:app | app clearDidModifySettings].
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2004
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  2005
17965
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2006
!SettingsDialog methodsFor:'opening'!
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2007
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2008
reopenAfterChangedViewStyleSetting
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2009
    "open the dialog. Take care to redefine some superclass behavior"
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2010
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2011
    self window destroy.
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2012
    self open
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2013
! !
662bf617e100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17957
diff changeset
  2014
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2015
!SettingsDialog methodsFor:'quick search support'!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2016
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2017
getWordMatchPattern
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2018
    "pattern is needed at multiple places"
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2019
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2020
    |searchString plainWord pattern|
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2021
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2022
    searchString := self quickSearchStringHolder value.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2023
    searchString isEmptyOrNil ifTrue:[^ nil].
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2024
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2025
    plainWord := searchString withoutSeparators.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2026
    plainWord isEmpty ifTrue:[^ nil].
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2027
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2028
    searchString first isSeparator ifTrue:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2029
        searchString last isSeparator ifTrue:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2030
            pattern := plainWord.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2031
        ] ifFalse:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2032
            pattern := plainWord,'*'.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2033
        ].    
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2034
    ] ifFalse:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2035
        searchString last isSeparator ifTrue:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2036
            pattern := '*',plainWord.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2037
        ] ifFalse:[    
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2038
            pattern := '*',searchString,'*'.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2039
        ].
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2040
    ].
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2041
    ^ pattern.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2042
!
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2043
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2044
getWordMatchPatterns
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2045
    "patterns are needed at multiple places"
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2046
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2047
    |searchString plainWord pattern1 patterns|
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2048
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2049
    searchString := self quickSearchStringHolder value.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2050
    searchString isEmptyOrNil ifTrue:[^ nil].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2051
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2052
    plainWord := searchString withoutSeparators.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2053
    plainWord isEmpty ifTrue:[^ nil].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2054
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2055
    searchString first isSeparator ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2056
        searchString last isSeparator ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2057
            pattern1 := plainWord.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2058
        ] ifFalse:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2059
            pattern1 := plainWord,'*'.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2060
        ].    
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2061
    ] ifFalse:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2062
        searchString last isSeparator ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2063
            pattern1 := '*',plainWord.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2064
        ] ifFalse:[    
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2065
            pattern1 := '*',searchString,'*'.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2066
        ].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2067
    ].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2068
    patterns := OrderedCollection with:pattern1.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2069
    (plainWord includes:Character space) ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2070
        plainWord asCollectionOfWordsDo:[:each |
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2071
            patterns add:('*',each,'*')
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2072
        ]
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2073
    ].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2074
    ^ patterns
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2075
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2076
    "Created: / 25-06-2018 / 14:47:10 / Claus Gittinger"
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2077
!
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2078
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2079
highlightApplicationsForWhich:aBlock
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2080
    "common code for string search and changed-settings search.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2081
     Enumerates all applications with aBlock;
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2082
     if it return true, it will be collectet and highlighted."
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2083
     
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2084
    |oldSelection pattern showNonDefault matchingTreeItems|
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2085
    
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2086
    applicationList root recursiveExpand.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2087
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2088
    matchingTreeItems := OrderedCollection new.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2089
    "/ now search all specs for this word
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2090
    applicationList root recursiveDo:[:eachSettingsAppItem |
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2091
        |appClass app words|
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2092
        
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2093
        (appClass := eachSettingsAppItem applicationClass) notNil ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2094
            (app := eachSettingsAppItem application) isNil ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2095
                eachSettingsAppItem application:(app := appClass new).
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2096
            ].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2097
            
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2098
            (aBlock value:app) ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2099
                matchingTreeItems add:eachSettingsAppItem.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2100
            ].   
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2101
        ].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2102
    ].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2103
    
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2104
    applicationList root children do:[:c | c recursiveCollapse].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2105
    "/ now expand all matches
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2106
    matchingTreeItems do:[:eachMatchingItem |
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2107
        eachMatchingItem label:(eachMatchingItem label string allBold withColor:Color red).
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2108
        applicationList itemChanged:#redraw with:nil from:eachMatchingItem.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2109
        eachMatchingItem makeVisible
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2110
    ]. 
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2111
!
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2112
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2113
highlightWidgets:aSetOfWidget
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2114
    "highlight a matching widget"
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2115
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2116
    highlightedWidgetsOriginalAttributes := Dictionary new.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2117
    aSetOfWidget do:[:w |
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2118
        |perWidget|
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2119
        
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2120
        highlightedWidgetsOriginalAttributes at:w put:(perWidget := Dictionary new).
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2121
        perWidget at:#borderWidth: put:w borderWidth.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2122
        perWidget at:#borderColor: put:w borderColor.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2123
        
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2124
        w borderWidth:1.
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2125
        w borderColor:Color red.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2126
    ].
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2127
!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2128
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2129
highlightWidgetsWithMatchingSearchString
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2130
    "whenever an app is selected AND a quick search string is present,
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2131
     go through the widgets and highlight those which match.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2132
     This is done by looking at the helpkey and model aspects for a match"
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2133
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2134
    |app widgetsToHighlight|
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2135
    
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2136
    highlightedWidgetsOriginalAttributes notNil ifTrue:[
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2137
        self unhighlightWidgets.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2138
    ].
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2139
    
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2140
    (self getWordMatchPattern) isNil ifTrue:[^ self].
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2141
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2142
    (app := subCanvasApplicationHolder value) isNil ifTrue:[^ self].
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2143
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2144
    widgetsToHighlight := self widgetsWithMatchingSearchStringIn:app.
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2145
    self highlightWidgets:widgetsToHighlight.
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2146
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2147
    "Modified: / 25-06-2018 / 14:47:34 / Claus Gittinger"
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2148
!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2149
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2150
quickSearchStringHolderChanged
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2151
    "the text in the quick search entry field has changed.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2152
     remember the current selection, 
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2153
     update the highlighting of matching fields (and expand corresponding tree nodes),
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2154
     then reselect (because the treeView is too stupid in loosing the selection,
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2155
     when expanding/hiding)"
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2156
     
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2157
    |oldSelection patterns pattern1|
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2158
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2159
    prevSearchStringsPerApp isNil ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2160
        prevSearchStringsPerApp := Dictionary new
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2161
    ].
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2162
    
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2163
    oldSelection := self selectedItem value.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2164
    self unhighlightFoundItemsFromSearch.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2165
    
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2166
    (patterns := self getWordMatchPatterns) isEmptyOrNil ifTrue:[^ self].
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2167
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2168
    self 
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2169
        highlightApplicationsForWhich:[:app |
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2170
            |ok words found widgetsToHighlight|
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2171
            
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2172
            words := prevSearchStringsPerApp at:app class ifAbsentPut:[app quickSearchStrings].
16991
73558621b29b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16988
diff changeset
  2173
            ok := false.
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2174
            patterns size > 1 ifTrue:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2175
                found := patterns conform:[:eachPattern |
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2176
                            (words contains:[:word | eachPattern match:word caseSensitive:false ])
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2177
                         ].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2178
            ] ifFalse:[ 
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2179
                pattern1 := patterns first.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2180
                found := (words contains:[:word | pattern1 match:word caseSensitive:false ])
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2181
            ].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2182
            found ifTrue:[
18238
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2183
                ok := true.
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2184
"/                app window notNil ifTrue:[
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2185
"/                    widgetsToHighlight := self widgetsWithMatchingSearchStringIn:app.
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2186
"/                    ok := widgetsToHighlight notEmptyOrNil.
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2187
"/                ]    
16991
73558621b29b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16988
diff changeset
  2188
            ].
73558621b29b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 16988
diff changeset
  2189
            ok
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2190
        ].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2191
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2192
    oldSelection notNil ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2193
        oldSelection makeVisible.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2194
        self selectedItem value:oldSelection.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2195
        self highlightWidgetsWithMatchingSearchString.
18237
04b56a4ead5b #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18192
diff changeset
  2196
    ].
04b56a4ead5b #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18192
diff changeset
  2197
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2198
    "Modified: / 25-06-2018 / 14:56:48 / Claus Gittinger"
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2199
!
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2200
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2201
unhighlightFoundItemsFromSearch
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2202
    "undo any highlighting of matching fields (from the previous show matching items)"
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2203
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2204
    |oldSelection pattern showNonDefault matchingTreeItems|
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2205
    
16318
c63c5afa0cc9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16313
diff changeset
  2206
    self unhighlightWidgets.
c63c5afa0cc9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16313
diff changeset
  2207
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2208
    "/ make all labels normal
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2209
    applicationList root recursiveDo:[:eachSettingsAppItem |
16325
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2210
        |lbl|
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2211
        lbl := eachSettingsAppItem label.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2212
        lbl hasChangeOfEmphasis ifTrue:[
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2213
            eachSettingsAppItem label:(lbl string).
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2214
            applicationList itemChanged:#redraw with:nil from:eachSettingsAppItem.
073884e3213d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16318
diff changeset
  2215
        ]. 
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2216
    ]. 
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2217
!
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2218
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2219
unhighlightWidgets
16318
c63c5afa0cc9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16313
diff changeset
  2220
    "unhighlight all previously highligted widgets
c63c5afa0cc9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16313
diff changeset
  2221
     (restore their previous attributes)"
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2222
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2223
    highlightedWidgetsOriginalAttributes notNil ifTrue:[
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2224
        highlightedWidgetsOriginalAttributes keysAndValuesDo:[:widget :oldValues |
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2225
            oldValues keysAndValuesDo:[:sel :oldValue |
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2226
                widget perform:sel with:oldValue
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2227
            ].    
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2228
        ].    
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2229
        highlightedWidgetsOriginalAttributes := nil.
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2230
    ].  
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2231
!
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2232
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2233
widgetsWithMatchingSearchStringIn:anApplication
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2234
    "helper:
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2235
     go through the widgets and find those which match.
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2236
     This is done by looking at the helpkey and model aspects for a match"
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2237
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2238
    |patterns pattern1 wordPatterns words widgetsToHighlight allWords|
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2239
    
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2240
    (patterns := self getWordMatchPatterns) isNil ifTrue:[^ self].
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2241
    pattern1 := patterns first.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2242
    wordPatterns := patterns copyFrom:2.
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2243
    
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2244
    allWords :=
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2245
        [:text |
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2246
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2247
            |words xLatedText|
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2248
            words := Set new.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2249
            text notNil ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2250
                text asCollectionOfWordsDo:[:w | words add:w asLowercase].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2251
                xLatedText := anApplication resources string:text.
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2252
                (xLatedText notNil and:[xLatedText ~= text]) ifTrue:[
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2253
                    xLatedText asCollectionOfWordsDo:[:w | words add:w asLowercase].
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2254
                ].    
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2255
            ]. 
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2256
            words
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2257
        ].    
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2258
    
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2259
    widgetsToHighlight := Set new.
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2260
    words := anApplication quickSearchStrings.
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2261
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2262
    ((words contains:[:word | pattern1 match:word caseSensitive:false])
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2263
    or:[
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2264
        (wordPatterns 
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2265
            conform:[:eachPattern |
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2266
                (words contains:[:word | eachPattern match:word caseSensitive:false])])]
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2267
    ) ifTrue:[
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2268
        "/ ok - there is a match in this app;
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2269
        "/ look which widget matches it in its helpKey or label
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2270
        
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2271
        anApplication window withAllSubViewsDo:[:eachView |
18238
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2272
            |wordsInWidget widgetHasIt label name helpKey xLatedText helpText tooltip|
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2273
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2274
            wordsInWidget := Set new.
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2275
             
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2276
            (helpKey := eachView helpKey) notNil ifTrue:[
18076
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2277
                "/ wordsInWidget add:helpKey.
17910
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
  2278
                "/ helpText := anApplication helpTextForKey:helpKey.
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
  2279
                "/ wordsInWidget addAll:(allWords value:helpText).
18076
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2280
                Error handle:[:ex |        
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2281
                ] do:[
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2282
                    tooltip := anApplication helpTextForKey:helpKey.
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2283
                    tooltip notNil ifTrue:[        
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2284
                        wordsInWidget addAll:(allWords value:tooltip).
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2285
                    ].
bb50bfeea772 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 17995
diff changeset
  2286
                ].
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2287
            ].
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2288
            label := eachView perform:#label ifNotUnderstood:nil.
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2289
            (label notNil and:[label isString]) ifTrue:[
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2290
                label := label string.
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2291
                wordsInWidget addAll:(allWords value:label)
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2292
            ].
18238
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2293
            name := eachView perform:#name ifNotUnderstood:nil.
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2294
            (name notNil and:[name isString]) ifTrue:[
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2295
                name := name string.
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2296
                wordsInWidget addAll:(allWords value:name)
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2297
            ].
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2298
            
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2299
            widgetHasIt := patterns contains:[:somePattern |
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2300
                                wordsInWidget contains:[:w | 
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2301
                                    somePattern match:w caseSensitive:false ]].
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2302
            widgetHasIt ifTrue:[
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2303
                |alreadyIn|
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2304
                
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2305
                "/ check if a superview also has it (frames/framedboxes, etc.)
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2306
                alreadyIn := false.
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2307
                eachView allSuperViewsDo:[:sv | (widgetsToHighlight includes:sv) ifTrue:[ alreadyIn := true]].
16988
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2308
                alreadyIn ifFalse:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2309
                    ((eachView superView isKindOf:HorizontalPanelView)
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2310
                    or:[eachView superView class == View]) ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2311
                        (widgetsToHighlight includes:eachView superView) ifFalse:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2312
                            eachView superView subViews size > 1 ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2313
                                (eachView superView subViews contains:[:some | widgetsToHighlight includes:some])
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2314
                                ifTrue:[
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2315
                                    "/ multiple in a panel; highlight the panel, not the children.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2316
                                    widgetsToHighlight add:eachView superView.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2317
                                    widgetsToHighlight removeAllFoundIn:eachView superView subViews.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2318
                                    alreadyIn := true.
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2319
                                ].    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2320
                            ].    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2321
                        ].    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2322
                    ].    
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2323
                    alreadyIn ifFalse:[ widgetsToHighlight add:eachView ].
533bb733d68b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16987
diff changeset
  2324
                ]    
16987
5f68a7467da7 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16979
diff changeset
  2325
            ].    
16382
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2326
        ].   
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2327
    ].
52235f9d335f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16370
diff changeset
  2328
    ^ widgetsToHighlight.
18238
45ebb140f966 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18237
diff changeset
  2329
18240
8465a9e40100 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18238
diff changeset
  2330
    "Modified: / 25-06-2018 / 14:54:29 / Claus Gittinger"
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2331
! !
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2332
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2333
!SettingsDialog methodsFor:'selection'!
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2334
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2335
selectItem:anEntryInTheSettingsList
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2336
    anEntryInTheSettingsList notNil ifTrue:[
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2337
        anEntryInTheSettingsList makeVisible.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2338
        self selectedItem value:anEntryInTheSettingsList
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2339
    ].
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2340
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2341
    "Created: / 06-08-2018 / 16:03:35 / Claus Gittinger"
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2342
!
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2343
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2344
selectItemWithClass:aClass
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2345
    "select an item based on the sub-settings application class"
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2346
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2347
    |entry|
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2348
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2349
    entry := applicationList root
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2350
                recursiveDetect:[:entry | entry applicationClass = aClass].
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2351
    self selectItem:entry.
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2352
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2353
    "Created: / 29-10-2010 / 11:54:13 / cg"
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2354
    "Modified: / 06-08-2018 / 16:03:44 / Claus Gittinger"
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2355
!
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2356
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2357
selectItemWithName:aPathString
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2358
    "select an item based on the sub-settings page name.
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2359
     See standardRawSettingsList for a list of names"
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2360
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2361
    |entry|
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2362
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2363
    entry := applicationList root
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2364
                recursiveDetect:[:entry | entry nameString = aPathString].
18322
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2365
    self selectItem:entry.
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2366
5ac30199fb23 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18240
diff changeset
  2367
    "Modified: / 06-08-2018 / 16:03:50 / Claus Gittinger"
14327
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2368
! !
195c096a4cc8 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14318
diff changeset
  2369
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2370
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'accessing'!
7021197a578f initial checkin
penk
parents:
diff changeset
  2371
7021197a578f initial checkin
penk
parents:
diff changeset
  2372
application
7021197a578f initial checkin
penk
parents:
diff changeset
  2373
    "return the value of the instance variable 'application' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2374
7021197a578f initial checkin
penk
parents:
diff changeset
  2375
    ^ application
7021197a578f initial checkin
penk
parents:
diff changeset
  2376
!
7021197a578f initial checkin
penk
parents:
diff changeset
  2377
7021197a578f initial checkin
penk
parents:
diff changeset
  2378
application:something
7021197a578f initial checkin
penk
parents:
diff changeset
  2379
    "set the value of the instance variable 'application' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2380
7021197a578f initial checkin
penk
parents:
diff changeset
  2381
    application := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  2382
!
7021197a578f initial checkin
penk
parents:
diff changeset
  2383
7021197a578f initial checkin
penk
parents:
diff changeset
  2384
applicationClass
7021197a578f initial checkin
penk
parents:
diff changeset
  2385
    "return the value of the instance variable 'applicationClass' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2386
7021197a578f initial checkin
penk
parents:
diff changeset
  2387
    ^ applicationClass
7021197a578f initial checkin
penk
parents:
diff changeset
  2388
!
7021197a578f initial checkin
penk
parents:
diff changeset
  2389
7021197a578f initial checkin
penk
parents:
diff changeset
  2390
applicationClass:something
7021197a578f initial checkin
penk
parents:
diff changeset
  2391
    "set the value of the instance variable 'applicationClass' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2392
7021197a578f initial checkin
penk
parents:
diff changeset
  2393
    applicationClass := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  2394
!
7021197a578f initial checkin
penk
parents:
diff changeset
  2395
9425
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2396
label:something
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2397
    "reset the with in pixels..."
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2398
    width := nil.
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2399
    label := something.
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2400
!
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2401
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2402
nameString
7021197a578f initial checkin
penk
parents:
diff changeset
  2403
    "return the value of the instance variable 'nameString' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2404
7021197a578f initial checkin
penk
parents:
diff changeset
  2405
    ^ nameString
7021197a578f initial checkin
penk
parents:
diff changeset
  2406
!
7021197a578f initial checkin
penk
parents:
diff changeset
  2407
7021197a578f initial checkin
penk
parents:
diff changeset
  2408
nameString:something
7021197a578f initial checkin
penk
parents:
diff changeset
  2409
    "set the value of the instance variable 'nameString' (automatically generated)"
7021197a578f initial checkin
penk
parents:
diff changeset
  2410
7021197a578f initial checkin
penk
parents:
diff changeset
  2411
    nameString := something.
7021197a578f initial checkin
penk
parents:
diff changeset
  2412
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  2413
5078
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2414
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'menu'!
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2415
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2416
middleButtonMenu
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2417
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2418
    <resource: #programMenu >
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2419
5838
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  2420
    |application|
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  2421
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  2422
    (application := self application) isNil ifTrue:[ ^ nil].
290edc109c4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5629
diff changeset
  2423
    ^ application settingsDialogPopUpMenu
5078
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2424
! !
9fafc6b058bc new middleButtonMenu for remove service in SettingsDialog
penk
parents: 5059
diff changeset
  2425
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2426
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'printing & storing'!
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2427
13322
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2428
displayOn:aGCOrStream
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2429
13322
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2430
    "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
17431
eeaf0c548e84 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17087
diff changeset
  2431
    "/ old ST80 means: draw-yourself on a GC.
13322
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2432
    (aGCOrStream isStream) ifFalse:[
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2433
        ^ super displayOn:aGCOrStream
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2434
    ].
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2435
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2436
    super printOn:aGCOrStream.
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2437
    aGCOrStream nextPutAll:' ['.
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2438
    label printOn:aGCOrStream.
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2439
    aGCOrStream nextPut:$].
17431
eeaf0c548e84 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17087
diff changeset
  2440
eeaf0c548e84 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17087
diff changeset
  2441
    "Modified (comment): / 22-02-2017 / 16:53:51 / cg"
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2442
!
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2443
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  2444
printOn:aStream
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  2445
    aStream 
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  2446
        nextPutAll:self class nameWithoutPrefix;
13322
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2447
        space.
7932b47dbcc2 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13270
diff changeset
  2448
    self label printOn:aStream.
9558
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  2449
89e606407c4d changed: #sendLoadRequestToAll
sr
parents: 9425
diff changeset
  2450
    "Created: / 24-08-2010 / 18:36:17 / sr"
4405
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2451
! !
8b9a9ee966bf *** empty log message ***
penk
parents: 4401
diff changeset
  2452
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2453
!SettingsDialog::HierarchicalApplicationList::ApplicationItem methodsFor:'queries'!
7021197a578f initial checkin
penk
parents:
diff changeset
  2454
9425
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2455
canCollapse
16313
6abedc9963c0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16201
diff changeset
  2456
    "the rootItem cannot be collapsed"
14872
ed831f9b6aaf class: SettingsDialog
ca
parents: 14792
diff changeset
  2457
ed831f9b6aaf class: SettingsDialog
ca
parents: 14792
diff changeset
  2458
    "/ first check if we are expanded, if not answer false
15607
1e233fdc0cef class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15523
diff changeset
  2459
    ^ (self isExpanded and:[self isRootItem not])
9425
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2460
!
ca49e390fe41 *** empty log message ***
ca
parents: 9275
diff changeset
  2461
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2462
isCategory
7021197a578f initial checkin
penk
parents:
diff changeset
  2463
7021197a578f initial checkin
penk
parents:
diff changeset
  2464
    ^ self applicationClass isNil
7021197a578f initial checkin
penk
parents:
diff changeset
  2465
! !
7021197a578f initial checkin
penk
parents:
diff changeset
  2466
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2467
!SettingsDialog::SettingsFilenameAppl class methodsFor:'help specs'!
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2468
17910
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
  2469
helpSpec
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2470
    <resource: #help>
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2471
17910
9140bf7eb5b1 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 17704
diff changeset
  2472
    ^ super helpSpec addPairsFrom:#(
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2473
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2474
#openSettingsFile
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2475
'Click to open a file browser on the settings file'
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2476
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2477
#reloadSettingsFile
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2478
'Reload the settings from the file'
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2479
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2480
#saveAsPrivateSettingsFile
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2481
'Save the settings into your private settings file'
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2482
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2483
)
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2484
! !
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2485
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2486
!SettingsDialog::SettingsFilenameAppl class methodsFor:'interface specs'!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2487
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2488
windowSpec
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2489
    "This resource specification was automatically generated
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2490
     by the UIPainter of ST/X."
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2491
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2492
    "Do not manually edit this!! If it is corrupted,
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2493
     the UIPainter may not be able to read the specification."
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2494
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2495
    "
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2496
     UIPainter new openOnClass:SettingsDialog::SettingsFilenameAppl andSelector:#windowSpec
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2497
     SettingsDialog::SettingsFilenameAppl new openInterface:#windowSpec
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2498
     SettingsDialog::SettingsFilenameAppl open
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2499
    "
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2500
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2501
    <resource: #canvas>
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2502
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2503
    ^ 
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2504
    #(FullSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2505
       name: windowSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2506
       window: 
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2507
      (WindowSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2508
         label: 'Settings File'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2509
         name: 'Settings File'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2510
         min: (Point 10 10)
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2511
         bounds: (Rectangle 0 0 426 359)
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2512
       )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2513
       component: 
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2514
      (SpecCollection
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2515
         collection: (
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2516
          (LabelSpec
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2517
             name: 'InfoLabel'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2518
             layout: (LayoutFrame 0 0 -169 0.5 0 1 -45 0.5)
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2519
             translateLabel: true
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2520
             labelChannel: infoLabelHolder
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2521
           )
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2522
          (LabelSpec
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2523
             label: 'Preferences are stored in file:'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2524
             name: 'Label1'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2525
             layout: (LayoutFrame 0 0 -30 0.5 0 1 0 0.5)
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2526
             translateLabel: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2527
           )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2528
          (LinkButtonSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2529
             label: 'LinkButton'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2530
             name: 'EditPreferences'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2531
             layout: (LayoutFrame 0 0 0 0.5 0 1 30 0.5)
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2532
             activeHelpKey: openSettingsFile
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2533
             foregroundColor: (Color 0.0 0.0 100.0)
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2534
             translateLabel: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2535
             labelChannel: settingsFilenameHolder
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2536
             model: openSettingsFile
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2537
           )
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2538
          (HorizontalPanelViewSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2539
             name: 'HorizontalPanel1'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2540
             layout: (LayoutFrame 0 0 53 0.5 0 1 101 0.5)
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2541
             horizontalLayout: centerMax
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2542
             verticalLayout: center
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2543
             horizontalSpace: 3
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2544
             verticalSpace: 3
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2545
             component: 
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2546
            (SpecCollection
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2547
               collection: (
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2548
                (ActionButtonSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2549
                   label: 'Reload'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2550
                   name: 'Button2'
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2551
                   activeHelpKey: reloadSettingsFile
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2552
                   translateLabel: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2553
                   model: reloadSettingsFile
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2554
                   useDefaultExtent: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2555
                 )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2556
                (ActionButtonSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2557
                   label: 'Save as Private'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2558
                   name: 'Button3'
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2559
                   activeHelpKey: saveAsPrivateSettingsFile
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2560
                   translateLabel: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2561
                   model: saveAsPrivateSettingsFile
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2562
                   useDefaultExtent: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2563
                 )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2564
                (ActionButtonSpec
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2565
                   label: 'File Browser'
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2566
                   name: 'Button1'
14239
c7d2d44183d3 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14222
diff changeset
  2567
                   activeHelpKey: openSettingsFile
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2568
                   translateLabel: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2569
                   model: openSettingsFile
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2570
                   useDefaultExtent: true
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2571
                 )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2572
                )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2573
              
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2574
             )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2575
           )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2576
          )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2577
        
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2578
       )
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2579
     )
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2580
! !
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2581
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2582
!SettingsDialog::SettingsFilenameAppl methodsFor:'actions'!
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2583
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2584
openSettingsFile
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2585
    self openSettingsFile: (self settingsFile)
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2586
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2587
    "Created: / 07-02-2012 / 11:15:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2588
!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2589
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2590
reloadSettingsFile
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2591
    self reloadSettingsFile: (self settingsFile)
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2592
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2593
    "Created: / 17-02-2012 / 10:26:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2594
!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2595
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2596
saveAsPrivateSettingsFile
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2597
    |fn|
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2598
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  2599
    fn := UserPreferences defaultUserSettingsFile pathName.
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2600
    SettingsDialog saveSettingsTo:fn.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2601
    UserPreferences current at:#settingsFilename put:fn.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2602
    settingsFilenameHolder value:fn.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2603
! !
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2604
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2605
!SettingsDialog::SettingsFilenameAppl methodsFor:'aspects'!
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2606
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2607
infoLabelHolder
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2608
    infoLabelHolder isNil ifTrue:[
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2609
        infoLabelHolder := nil asValue.
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2610
        infoLabelHolder value:
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2611
                     (resources 
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2612
                        stringWithCRs:(
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2613
                            'Unless saved via the "Save"-Button,'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2614
                            , '\changes affect the current session only.')).
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2615
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2616
    ].
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2617
    ^ infoLabelHolder
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2618
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2619
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2620
settingsFilenameHolder
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2621
    settingsFilenameHolder isNil ifTrue:[
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2622
        settingsFilenameHolder := nil asValue.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2623
        self basicReadSettings.
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2624
    ].
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2625
    ^ settingsFilenameHolder
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2626
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2627
    "Created: / 07-02-2012 / 01:08:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2628
! !
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2629
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2630
!SettingsDialog::SettingsFilenameAppl methodsFor:'private'!
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2631
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2632
openSettingsFile: filename 
17649
0d64f9ae3a2b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17469
diff changeset
  2633
    FileBrowser default openOnFileNamed:filename editing:true
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2634
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2635
    "Created: / 07-02-2012 / 01:08:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17649
0d64f9ae3a2b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17469
diff changeset
  2636
    "Modified: / 01-09-2017 / 14:05:48 / cg"
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2637
!
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2638
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2639
reloadSettingsFile: filename 
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2640
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2641
    filename asFilename fileIn.
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2642
    UserPreferences current at: #settingsFilename put: filename asFilename pathName
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2643
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2644
    "Created: / 17-02-2012 / 10:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2645
! !
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2646
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2647
!SettingsDialog::SettingsFilenameAppl methodsFor:'protocol'!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2648
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2649
basicReadSettings
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2650
    |filename|
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2651
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2652
    filename := self settingsFile.
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2653
"/      filename := filename asText
16528
2758ee62c5cf #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16507
diff changeset
  2654
"/        asActionLinkTo:[ self openSettingsFile: filename ].
14081
fc81617ae457 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 13796
diff changeset
  2655
    self settingsFilenameHolder value:filename.
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2656
!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2657
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2658
basicSaveSettings
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2659
    ^self
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2660
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2661
    "Modified: / 07-02-2012 / 01:03:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2662
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2663
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2664
editorHelpRelativeWikiURL
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2665
    "the relative URL of the dialog-description in the Wiki"
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2666
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2667
    ^ 'Settings'
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2668
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2669
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2670
helpFilename
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2671
    "subclasses must return the relative name of a helpFile
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2672
     in the doc/online/<language>/help directory.
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2673
     Or nil, if no help is available."
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2674
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2675
    ^ nil.
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2676
! !
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2677
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2678
!SettingsDialog::SettingsFilenameAppl methodsFor:'queries'!
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2679
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2680
hasUnsavedChanges
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2681
    ^false
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2682
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2683
    "Modified: / 07-02-2012 / 01:03:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
14792
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2684
!
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2685
03a4d13a4ff5 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 14652
diff changeset
  2686
settingsFile
15487
a0612a561678 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 15356
diff changeset
  2687
    ^ SettingsDialog currentSettingsFilename
13796
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2688
! !
3113972f5e4b merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13545
diff changeset
  2689
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2690
!SettingsDialog class methodsFor:'documentation'!
7021197a578f initial checkin
penk
parents:
diff changeset
  2691
7021197a578f initial checkin
penk
parents:
diff changeset
  2692
version
15881
6b3577458a85 #BUGFIX
ca
parents: 15607
diff changeset
  2693
    ^ '$Header$'
9021
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  2694
!
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  2695
7fe0760c4554 added: #loadAndSaveSettingsItemVisible
Claus Gittinger <cg@exept.de>
parents: 8624
diff changeset
  2696
version_CVS
15881
6b3577458a85 #BUGFIX
ca
parents: 15607
diff changeset
  2697
    ^ '$Header$'
4378
7021197a578f initial checkin
penk
parents:
diff changeset
  2698
! !
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  2699
12765
22dc3b61ae68 class: SettingsDialog
Claus Gittinger <cg@exept.de>
parents: 12029
diff changeset
  2700
4469
27a610981cb5 *** empty log message ***
penk
parents: 4435
diff changeset
  2701
SettingsDialog initialize!