author | penk |
Wed, 27 Nov 2002 11:02:33 +0100 | |
changeset 4328 | a60a893cac97 |
parent 4325 | 445335bde7ad |
child 4372 | 2a8886eaff5f |
permissions | -rw-r--r-- |
2195 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
2689
602cbcd0feb3
Fix comment on oldSpace compress limit
Stefan Vogel <sv@exept.de>
parents:
2621
diff
changeset
|
14 |
"{ Package: 'stx:libtool' }" |
602cbcd0feb3
Fix comment on oldSpace compress limit
Stefan Vogel <sv@exept.de>
parents:
2621
diff
changeset
|
15 |
|
2001 | 16 |
ToolApplicationModel subclass:#AbstractLauncherApplication |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
17 |
instanceVariableNames:'transcript' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
18 |
classVariableNames:'NotifyingEmergencyHandler OpenLaunchers RegisteredMenuHandlers' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
19 |
poolDictionaries:'' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
20 |
category:'Interface-Smalltalk' |
2001 | 21 |
! |
22 |
||
4291 | 23 |
HierarchicalList subclass:#HierarchicalSettingsApplList |
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
privateIn:AbstractLauncherApplication |
|
28 |
! |
|
29 |
||
30 |
HierarchicalItem subclass:#HierarchicalSettingsApplItem |
|
4322 | 31 |
instanceVariableNames:'label icon applClass application nameString' |
4291 | 32 |
classVariableNames:'' |
33 |
poolDictionaries:'' |
|
34 |
privateIn:AbstractLauncherApplication::HierarchicalSettingsApplList |
|
35 |
! |
|
36 |
||
2001 | 37 |
Object subclass:#LauncherDialogs |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
38 |
instanceVariableNames:'' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
39 |
classVariableNames:'' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
40 |
poolDictionaries:'' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
41 |
privateIn:AbstractLauncherApplication |
2001 | 42 |
! |
43 |
||
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
44 |
ApplicationModel subclass:#SettingsDialog |
4311 | 45 |
instanceVariableNames:'appList requestor selectionInApplList subCanvasApplicationHolder |
46 |
help applList appIsCategory enableButtons doReload doSave' |
|
4291 | 47 |
classVariableNames:'ApplicationList' |
48 |
poolDictionaries:'' |
|
49 |
privateIn:AbstractLauncherApplication |
|
50 |
! |
|
51 |
||
2195 | 52 |
!AbstractLauncherApplication class methodsFor:'documentation'! |
53 |
||
54 |
copyright |
|
55 |
" |
|
56 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
57 |
All Rights Reserved |
|
58 |
||
59 |
This software is furnished under a license and may be used |
|
60 |
only in accordance with the terms of that license and with the |
|
61 |
inclusion of the above copyright notice. This software may not |
|
62 |
be provided or otherwise made available to, or used by, any |
|
63 |
other person. No title to or ownership of the software is |
|
64 |
hereby transferred. |
|
65 |
" |
|
66 |
||
67 |
! |
|
68 |
||
69 |
documentation |
|
70 |
" |
|
71 |
This is an abstract class, providing mechanisms and common functionality |
|
72 |
for launcher-type applications. Subclasses may implement their GUI either |
|
73 |
with or without the UIPainter framework, and still use the common functions |
|
74 |
provided here. |
|
75 |
||
76 |
[author:] |
|
77 |
Claus Gittinger, eXept Software AG |
|
78 |
" |
|
79 |
||
80 |
||
81 |
! ! |
|
2001 | 82 |
|
83 |
!AbstractLauncherApplication class methodsFor:'accessing'! |
|
84 |
||
2761 | 85 |
closeAllLaunchers |
86 |
"close all opened launchers" |
|
87 |
||
88 |
self openLaunchers copy do:[:eachLauncher | |
|
89 |
eachLauncher closeRequest |
|
90 |
]. |
|
91 |
||
92 |
" |
|
93 |
self closeAllLaunchers. |
|
94 |
NewLauncher open |
|
95 |
" |
|
96 |
! |
|
97 |
||
2001 | 98 |
current |
99 |
"return the launcher running on the current screen. |
|
100 |
(for access via addMenu/ removeMenu)" |
|
101 |
||
102 |
|currentScreen| |
|
103 |
||
104 |
OpenLaunchers size > 0 ifTrue:[ |
|
2761 | 105 |
currentScreen := Screen current. |
2762 | 106 |
^ OpenLaunchers detect:[:eachLauncher | eachLauncher graphicsDevice == currentScreen] ifNone:nil |
2001 | 107 |
]. |
108 |
^ nil. |
|
109 |
||
110 |
" |
|
2761 | 111 |
NewLauncher current |
2001 | 112 |
" |
113 |
||
114 |
"Modified: / 9.9.1996 / 22:41:36 / stefan" |
|
115 |
"Modified: / 13.10.1998 / 16:09:50 / cg" |
|
116 |
! |
|
117 |
||
118 |
openLaunchers |
|
119 |
"return all opened launchers" |
|
120 |
||
3079 | 121 |
OpenLaunchers isNil ifTrue:[ |
122 |
OpenLaunchers := IdentitySet new |
|
123 |
]. |
|
124 |
^ OpenLaunchers |
|
2001 | 125 |
! ! |
126 |
||
127 |
!AbstractLauncherApplication class methodsFor:'defaults'! |
|
128 |
||
129 |
notifyingEmergencyHandler |
|
130 |
"return a block (used as an emergency handler |
|
131 |
for exceptions), which does errorNotification before going |
|
132 |
into the debugger." |
|
133 |
||
134 |
"Remember the handlerBlock, to be able to determine if the current |
|
135 |
handler is the notifying one." |
|
136 |
||
137 |
NotifyingEmergencyHandler isNil ifTrue:[ |
|
2316
6a46309a5e43
NotifyingEmergencyHandler moved to NoHandlerError
Stefan Vogel <sv@exept.de>
parents:
2314
diff
changeset
|
138 |
NotifyingEmergencyHandler := NoHandlerError notifyingEmergencyHandler |
2001 | 139 |
]. |
140 |
^ NotifyingEmergencyHandler |
|
141 |
||
142 |
"Created: 7.1.1997 / 22:18:19 / cg" |
|
143 |
"Modified: 15.1.1997 / 21:15:38 / cg" |
|
144 |
! ! |
|
145 |
||
2195 | 146 |
!AbstractLauncherApplication class methodsFor:'queries'! |
147 |
||
148 |
isVisualStartable |
|
2845 | 149 |
"return true, if this application can be started via #open. |
150 |
(to allow start of a change browser via double-click in the browser)" |
|
2195 | 151 |
|
2762 | 152 |
"/ assume all my subclasses can |
153 |
^ self ~~ AbstractLauncherApplication |
|
154 |
||
155 |
" |
|
156 |
AbstractLauncherApplication isVisualStartable |
|
157 |
NewLauncher isVisualStartable |
|
158 |
" |
|
2195 | 159 |
! ! |
160 |
||
2001 | 161 |
!AbstractLauncherApplication methodsFor:'private'! |
162 |
||
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
163 |
findApplicationClass:classOrClassName nameSpace:aNameSpace |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
164 |
"find some application, given the classes name. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
165 |
Look for it in Smalltalk and the given nameSpace" |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
166 |
|
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
167 |
|cls| |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
168 |
|
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
169 |
classOrClassName isBehavior ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
170 |
cls := classOrClassName. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
171 |
] ifFalse:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
172 |
cls := Smalltalk at:classOrClassName asSymbol. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
173 |
cls isNil ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
174 |
"/ look if its in the nameSpace |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
175 |
aNameSpace notNil ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
176 |
cls := aNameSpace at:classOrClassName asSymbol |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
177 |
] |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
178 |
]. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
179 |
cls isNil ifTrue:[ |
3037 | 180 |
self warn:(resources string:'Sorry, the ''%1''-class is not available.' with:classOrClassName). |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
181 |
^ nil |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
182 |
]. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
183 |
]. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
184 |
^ cls |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
185 |
! |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
186 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
187 |
findWindow:title |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
188 |
"a helper for find & destroy and find & raise operations; |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
189 |
let user choose a view and return it; return nil on cancel" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
190 |
|
2766 | 191 |
^ self findWindow:title windowGroupFilter:nil |
192 |
||
193 |
! |
|
194 |
||
195 |
findWindow:title windowGroupFilter:windowGroupFilterOrNil |
|
196 |
"a helper for find & destroy and find & raise operations; |
|
197 |
let user choose a view and return it; return nil on cancel" |
|
198 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
199 |
|knownTopViews nameList box| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
200 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
201 |
knownTopViews := IdentitySet new. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
202 |
Screen allScreens do:[:aScreen | |
2766 | 203 |
aScreen knownViews do:[:aView | |
204 |
|top showIt wg| |
|
205 |
||
206 |
aView notNil ifTrue:[ |
|
207 |
top := aView topView. |
|
208 |
(top isKindOf:DebugView) ifTrue:[ |
|
209 |
"/ although modal, show it. |
|
210 |
showIt := top realized |
|
211 |
] ifFalse:[ |
|
212 |
wg := top windowGroup. |
|
213 |
showIt := (wg notNil and:[wg isModal not]). |
|
214 |
showIt ifTrue:[ |
|
215 |
windowGroupFilterOrNil notNil ifTrue:[ |
|
216 |
showIt := windowGroupFilterOrNil includes:wg |
|
217 |
] |
|
218 |
] |
|
219 |
]. |
|
220 |
showIt ifTrue:[ |
|
221 |
knownTopViews add:top |
|
222 |
] |
|
223 |
] |
|
224 |
] |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
225 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
226 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
227 |
knownTopViews := knownTopViews asOrderedCollection. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
228 |
knownTopViews sort:[:v1 :v2 | |l1 l2| |
2766 | 229 |
l1 := v1 label ? 'aView'. |
230 |
l2 := v2 label ? 'aView'. |
|
231 |
l1 < l2 |
|
232 |
]. |
|
2041 | 233 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
234 |
nameList := knownTopViews collect:[:v | |
2766 | 235 |
|isDead wg p l| |
236 |
||
237 |
l := v label ? 'aView'. |
|
238 |
v device == Display ifFalse:[ |
|
239 |
l := l , ' [' , (v device displayName ? '?') , ']' |
|
240 |
]. |
|
241 |
((wg := v windowGroup) notNil |
|
242 |
and:[(p := wg process) notNil |
|
243 |
and:[p state ~~ #dead]]) ifTrue:[ |
|
244 |
l |
|
245 |
] ifFalse:[ |
|
246 |
l , ' (dead ?)' |
|
247 |
] |
|
248 |
]. |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
249 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
250 |
box := ListSelectionBox new. |
2766 | 251 |
box selectionChangeCallback:[:selectionIndex | |v| |
252 |
v := knownTopViews at:box selectionIndex. |
|
253 |
v raise. box raise |
|
254 |
]. |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
255 |
box noEnterField. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
256 |
box list:nameList. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
257 |
box label:(resources string:'view selection'). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
258 |
box title:(resources string:title) withCRs. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
259 |
box action:[:selection | |
2766 | 260 |
|v| |
261 |
||
262 |
v := knownTopViews at:box selectionIndex. |
|
263 |
box destroy. |
|
264 |
^ v |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
265 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
266 |
box extent:400@300. |
3293
d7b925f89a7b
dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
267 |
box open. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
268 |
^ nil |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
269 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
270 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
271 |
openApplication: classOrClassName |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
272 |
"open an application, given by the classe name." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
273 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
274 |
self openApplication:classOrClassName nameSpace:nil |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
275 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
276 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
277 |
openApplication:classOrClassName nameSpace:aNameSpace |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
278 |
"open some application, given the classes name. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
279 |
Look for it in Smalltalk and the given nameSpace" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
280 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
281 |
self openApplication:classOrClassName nameSpace:aNameSpace with:#open |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
282 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
283 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
284 |
openApplication:classOrClassName nameSpace:aNameSpace with:aSelector |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
285 |
"open some application, given the classes name. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
286 |
Look for it in Smalltalk and the given nameSpace" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
287 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
288 |
|cls| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
289 |
|
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
290 |
cls := self findApplicationClass:classOrClassName nameSpace:aNameSpace. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
291 |
cls isNil ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
292 |
^ self |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
293 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
294 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
295 |
Autoload autoloadFailedSignal handle:[:ex | |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
296 |
self warn:(resources string:'Sorry, the %1 class seems to be not available.' with:cls name) |
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
297 |
] do:[ |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
298 |
self withWaitCursorDo:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
299 |
cls perform:aSelector |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
300 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
301 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
302 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
303 |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
304 |
openSettings |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
305 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
306 |
| builder| |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
307 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
308 |
builder := SettingsDialog open. |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
309 |
builder application requestor:self. |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
310 |
! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
311 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
312 |
pickAView |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
313 |
"let user pick a view and return it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
314 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
315 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
316 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
317 |
(Delay forSeconds:1) wait. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
318 |
v := Screen current viewFromUser. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
319 |
v isNil ifTrue:[ |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
320 |
self warn:'Sorry, this is not a smalltalk view'. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
321 |
^ nil |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
322 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
323 |
^ v |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
324 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
325 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
326 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
327 |
saveScreenImage:anImage defaultName:defaultName |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
328 |
"save an image into a file |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
329 |
- ask user for filename using a fileSelectionBox." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
330 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
331 |
|fileName| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
332 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
333 |
fileName := Dialog |
3782 | 334 |
requestFileName:(resources string:'Save hardcopy image in:') |
3003
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
335 |
default:(defaultName , '.tiff') |
3782 | 336 |
ok:(resources string:'Save') |
337 |
abort:(resources string:'Cancel') |
|
3003
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
338 |
pattern:'*.tiff' |
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
339 |
fromDirectory:nil |
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
340 |
whenBoxCreatedEvaluate:[:box | |
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
341 |
|editButton| |
4029
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
342 |
UserPreferences current useNewFileDialog ifFalse:[ |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
343 |
editButton := Button label:(resources string:'Edit'). |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
344 |
(DialogBox styleSheet at:'dialogBox.okAtLeft' default:false) ifFalse:[ |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
345 |
box addButton:editButton before:nil |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
346 |
] ifTrue:[ |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
347 |
box addButton:editButton after:nil |
3003
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
348 |
]. |
4029
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
349 |
editButton |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
350 |
action:[ |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
351 |
box hide; destroy. |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
352 |
ImageEditor openOnImage:anImage. |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
353 |
]. |
32736ebb1068
no extra button for save screenshots for new fileDialog
penk
parents:
3992
diff
changeset
|
354 |
] |
3003
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
355 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
356 |
fileName notNil ifTrue:[ |
3003
74e2002951dc
edit button in grab-screen area
Claus Gittinger <cg@exept.de>
parents:
2993
diff
changeset
|
357 |
anImage saveOn:fileName |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
358 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
359 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
360 |
"Modified: / 21.2.1996 / 13:09:28 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
361 |
"Created: / 29.1.1998 / 23:20:36 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
362 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
363 |
|
2001 | 364 |
showDocumentation:aRelativeDocFilePath |
365 |
"open an HTML browser on some document" |
|
366 |
||
367 |
" |
|
368 |
although that one is not yet finished, |
|
369 |
its better than nothing ... |
|
370 |
" |
|
371 |
HTMLDocumentView notNil ifTrue:[ |
|
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
372 |
self withWaitCursorDo:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
373 |
" |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
374 |
temporary kludge; |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
375 |
not all machines can autoload binaries; |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
376 |
however, on my SGI (which can) we want it |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
377 |
to load automatically. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
378 |
" |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
379 |
HTMLDocumentView isLoaded ifFalse:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
380 |
ErrorSignal catch:[HTMLDocumentView autoload] |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
381 |
]. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
382 |
HTMLDocumentView isLoaded ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
383 |
HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
384 |
^ self |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
385 |
]. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
386 |
] |
2001 | 387 |
]. |
388 |
||
389 |
self warn:'Sorry, the ST/X HTML reader is not |
|
390 |
included in this release. |
|
391 |
||
392 |
Please use Mosaic, netscape, chimera or any |
|
393 |
other HTML viewer to see the documentation. |
|
394 |
||
395 |
The documentation is found in the ''doc/online'' directory.'. |
|
396 |
||
397 |
"Modified: / 25.2.1998 / 21:24:20 / cg" |
|
398 |
! ! |
|
399 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
400 |
!AbstractLauncherApplication methodsFor:'private - settings callBacks'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
401 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
402 |
changeViewStyleTo:newStyle |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
403 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
404 |
newStyle notNil ifTrue:[ |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
405 |
self withWaitCursorDo:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
406 |
(transcript ? Transcript) showCR:'change style to ' , newStyle , ' ...'. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
407 |
View defaultStyle:newStyle asSymbol. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
408 |
]. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
409 |
self reopenLauncher. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
410 |
DebugView newDebugger. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
411 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
412 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
413 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
414 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
415 |
fontBoxForEncoding:encodingMatch |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
416 |
"open a fontBox, showing fonts which match some encoding |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
417 |
(used when changing to japanese ...)" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
418 |
|
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
419 |
^ LauncherDialogs fontBoxForEncoding:encodingMatch |
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
420 |
|
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
421 |
"/ |box y b |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
422 |
"/ labelDef buttonDef listDef menuDef textDef |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
423 |
"/ models labels allOfThem filter| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
424 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
425 |
"/ encodingMatch notNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
426 |
"/ filter := [:f | f encoding notNil |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
427 |
"/ and:[encodingMatch match:f encoding]]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
428 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
429 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
430 |
"/ models := OrderedCollection new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
431 |
"/ labels := OrderedCollection new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
432 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
433 |
"/ models add:(allOfThem := nil asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
434 |
"/ models add:(labelDef := Label defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
435 |
"/ models add:(buttonDef := Button defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
436 |
"/ models add:(listDef := SelectionInListView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
437 |
"/ models add:(menuDef := MenuView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
438 |
"/ models add:(textDef := TextView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
439 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
440 |
"/ box := Dialog new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
441 |
"/ box label:(resources string:'Font settings'). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
442 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
443 |
"/ models |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
444 |
"/ with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
445 |
"/ do:[:model :title | |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
446 |
"/ |y2 lbl f i| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
447 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
448 |
"/ f := model value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
449 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
450 |
"/ (box addTextLabel:title) adjust:#left. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
451 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
452 |
"/ y := box yPosition. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
453 |
"/ b := box addComponent:(Button label:(resources string:'change ...')) tabable:true. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
454 |
"/ b relativeExtent:nil; extent:(b preferredExtent). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
455 |
"/ y2 := box yPosition. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
456 |
"/ box yPosition:y. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
457 |
"/ i := box leftIndent. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
458 |
"/ box leftIndent:(b widthIncludingBorder + View viewSpacing). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
459 |
"/ (lbl := box addTextLabel:'') |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
460 |
"/ adjust:#left; |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
461 |
"/ font:(model value); |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
462 |
"/ labelChannel:(BlockValue |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
463 |
"/ with:[:v | |f| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
464 |
"/ f := v value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
465 |
"/ f isNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
466 |
"/ '' |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
467 |
"/ ] ifFalse:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
468 |
"/ f userFriendlyName |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
469 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
470 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
471 |
"/ argument:model). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
472 |
"/ labels add:lbl. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
473 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
474 |
"/ box leftIndent:i. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
475 |
"/ box yPosition:(box yPosition max:y2). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
476 |
"/ box addVerticalSpace. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
477 |
"/ box addHorizontalLine. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
478 |
"/ box addVerticalSpace. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
479 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
480 |
"/ b action:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
481 |
"/ |f| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
482 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
483 |
"/ f := FontPanel |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
484 |
"/ fontFromUserInitial:(model value) |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
485 |
"/ title:(resources string:'font for %1' with:title) |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
486 |
"/ filter:filter. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
487 |
"/ f notNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
488 |
"/ model == allOfThem ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
489 |
"/ models do:[:m | m value:f]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
490 |
"/ labels do:[:l | l font:f] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
491 |
"/ ] ifFalse:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
492 |
"/ model value:f. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
493 |
"/ lbl font:f. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
494 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
495 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
496 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
497 |
"/ model == allOfThem ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
498 |
"/ box addVerticalSpace |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
499 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
500 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
501 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
502 |
"/ box addAbortButton; addOkButton. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
503 |
"/ (box addButton:(Button label:(resources string:'defaults')) before:nil) |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
504 |
"/ action:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
505 |
"/ "/ fetch defaults |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
506 |
"/ View readStyleSheetAndUpdateAllStyleCaches. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
507 |
"/ labelDef value: Label defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
508 |
"/ buttonDef value: Button defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
509 |
"/ listDef value: SelectionInListView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
510 |
"/ menuDef value: MenuView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
511 |
"/ textDef value: TextView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
512 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
513 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
514 |
"/ box open. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
515 |
"/ box accepted ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
516 |
"/ Label defaultFont:labelDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
517 |
"/ Button defaultFont:buttonDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
518 |
"/ Toggle defaultFont:buttonDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
519 |
"/ SelectionInListView defaultFont:listDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
520 |
"/ MenuView defaultFont:menuDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
521 |
"/ PullDownMenu defaultFont:menuDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
522 |
"/ TextView defaultFont:textDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
523 |
"/ EditTextView defaultFont:textDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
524 |
"/ CodeView defaultFont:textDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
525 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
526 |
"/ box destroy. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
527 |
"/ ^ box accepted |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
528 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
529 |
"Modified: / 15.9.1998 / 22:04:56 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
530 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
531 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
532 |
reopenLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
533 |
"reopen a new launcher. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
534 |
for now (since style & language settings currently do |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
535 |
not affect living views ...) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
536 |
WARNING: bad design: Message known in LauncherDialogs" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
537 |
|
2034
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
538 |
|oldOrigin contents builder newLauncher| |
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
539 |
|
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
540 |
oldOrigin := self window origin. |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
541 |
transcript notNil ifTrue:[contents := transcript endEntry; list]. |
2034
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
542 |
builder := self class openAt:oldOrigin. |
3787 | 543 |
builder window waitUntilVisible; origin:oldOrigin. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
544 |
newLauncher := builder application. |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
545 |
transcript notNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
546 |
newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
547 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
548 |
^ newLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
549 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
550 |
"Modified: / 4.8.1998 / 17:08:33 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
551 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
552 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
553 |
!AbstractLauncherApplication methodsFor:'queries'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
554 |
|
3410 | 555 |
bugReporterAvailable |
556 |
^ BugGUI notNil |
|
557 |
! |
|
558 |
||
3120
564ee1530a8e
startPDALauncher item invisible for the normal user
Claus Gittinger <cg@exept.de>
parents:
3100
diff
changeset
|
559 |
hasPDALauncher |
564ee1530a8e
startPDALauncher item invisible for the normal user
Claus Gittinger <cg@exept.de>
parents:
3100
diff
changeset
|
560 |
^ PDALauncher notNil |
564ee1530a8e
startPDALauncher item invisible for the normal user
Claus Gittinger <cg@exept.de>
parents:
3100
diff
changeset
|
561 |
! |
564ee1530a8e
startPDALauncher item invisible for the normal user
Claus Gittinger <cg@exept.de>
parents:
3100
diff
changeset
|
562 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
563 |
processName |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
564 |
"for monitors only - my name" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
565 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
566 |
^ 'ST/X Launcher' |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
567 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
568 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
569 |
|
3575
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
570 |
remoteImageBrowserAvailable |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
571 |
^ SmalltalkShareClient notNil and:[RemoteImage notNil] |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
572 |
! |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
573 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
574 |
transcript |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
575 |
"my transcript" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
576 |
|
3079 | 577 |
transcript isNil ifTrue:[ |
578 |
^ Transcript current |
|
579 |
]. |
|
580 |
^ transcript |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
581 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
582 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
583 |
!AbstractLauncherApplication methodsFor:'startup / release'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
584 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
585 |
addTopViewsToCurrentProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
586 |
"ignored here - the launcher is always global (i.e. not project private)." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
587 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
588 |
^ self |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
589 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
590 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
591 |
|
2314
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
592 |
closeDownViews |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
593 |
OpenLaunchers remove:self ifAbsent:nil. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
594 |
super closeDownViews |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
595 |
! |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
596 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
597 |
postBuildWith:aBuilder |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
598 |
super postBuildWith:aBuilder. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
599 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
600 |
OpenLaunchers isNil ifTrue:[ |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
601 |
OpenLaunchers := IdentitySet new. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
602 |
]. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
603 |
OpenLaunchers add:self |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
604 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
605 |
! |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
606 |
|
2040 | 607 |
requestForWindowClose |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
608 |
"close request from windowing system (window close); |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
609 |
confirm and ask if closing of launcher only or |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
610 |
a smalltalk-exit is wanted" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
611 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
612 |
|answer| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
613 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
614 |
answer := Dialog |
3738 | 615 |
confirmWithCancel:(resources string:'Close %1 only or Exit Smalltalk (Close all) ?' with:self class name) |
2165 | 616 |
labels:(resources array:#('Cancel' 'Close' 'Exit')) |
617 |
default:3. |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
618 |
answer isNil ifTrue:[ |
2165 | 619 |
"/ cancel |
620 |
^ false |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
621 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
622 |
|
2165 | 623 |
answer == false ifTrue:[ |
624 |
^ true |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
625 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
626 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
627 |
self exit |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
628 |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
629 |
"Modified: / 20.5.1999 / 17:24:47 / cg" |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
630 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
631 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
632 |
saveAndTerminateRequest |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
633 |
"some windowManagers can send this, to shutDown an application |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
634 |
but let it save its state before, for later restart. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
635 |
Although I have not yet encountered such a windowManager, |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
636 |
we are already prepared for this ;-)" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
637 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
638 |
self snapshot. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
639 |
super saveAndTerminateRequest |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
640 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
641 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
642 |
|
2001 | 643 |
!AbstractLauncherApplication methodsFor:'user actions - about'! |
644 |
||
645 |
openLicenseConditions |
|
646 |
"open an HTML browser on the 'LICENCE' document" |
|
647 |
||
648 |
self withWaitCursorDo:[ |
|
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
649 |
|lang doc| |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
650 |
|
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
651 |
Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
652 |
doc := 'english/LICENCE_DEMO_STX.html' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
653 |
] ifFalse:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
654 |
((lang := Smalltalk language) = 'de' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
655 |
or:[lang = 'german']) ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
656 |
doc := 'german/LICENCE_STX.html' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
657 |
] ifFalse:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
658 |
doc := 'english/LICENCE_STX.html' |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
659 |
]. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
660 |
]. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
661 |
doc := resources at:'LICENCEFILE' default:doc. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
662 |
self showDocumentation:('../' , doc) |
2001 | 663 |
] |
664 |
||
665 |
"Created: / 5.2.1998 / 21:43:19 / cg" |
|
666 |
"Modified: / 23.4.1998 / 11:45:53 / cg" |
|
667 |
! ! |
|
668 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
669 |
!AbstractLauncherApplication methodsFor:'user actions - classes'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
670 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
671 |
browseAllBreakAndTracePoints |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
672 |
"open a browser showing all breakPointed/traced methods |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
673 |
(but, to get rid of them, there is also a menu itme to remove them all)" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
674 |
|
3140 | 675 |
UserPreferences systemBrowserClass |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
676 |
browseMethods:(WrappedMethod allInstances) |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
677 |
title:'all breakPointed/traced methods' |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
678 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
679 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
680 |
browseImplementors |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
681 |
"open an implementors- browser after asking for a selector" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
682 |
|
3369
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
683 |
|selector| |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
684 |
|
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
685 |
selector := Dialog |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
686 |
requestSelector:(resources at:'Browse implementors of (Tab for completion):') |
3442 | 687 |
okLabel:(resources at:'Browse') |
3369
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
688 |
initialAnswer:''. |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
689 |
|
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
690 |
selector size > 0 ifTrue:[ |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
691 |
self withWaitCursorDo:[ |
4155 | 692 |
UserPreferences systemBrowserClass browseImplementorsMatching:selector |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
693 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
694 |
]. |
3442 | 695 |
|
696 |
"Modified: / 17.11.2001 / 16:33:28 / cg" |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
697 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
698 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
699 |
browseResources |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
700 |
"open a resource- browser after asking for a resource string" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
701 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
702 |
|box resourceHolder valueHolder component rsrc value t anyString| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
703 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
704 |
anyString := resources string:'* any *'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
705 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
706 |
resourceHolder := ValueHolder newString. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
707 |
valueHolder := '*' asValue. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
708 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
709 |
box := DialogBox new. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
710 |
box label:(resources at:'Resource search:'). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
711 |
component := box addTextLabel:(resources at:'Search for methods which contain a\particular resource specification') withCRs. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
712 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
713 |
box addVerticalSpace:10. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
714 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
715 |
component := box addTextLabel:(resources at:'Resource symbol (empty for any; no matchPattern allowed):') withCRs. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
716 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
717 |
component := box addComboBoxOn:resourceHolder tabable:true. |
3014 | 718 |
component list:((Array with:anyString) , #('canvas' 'menu' 'keyboard' 'style' 'image' 'programMenu' '-' 'obsolete' 'needsFix')). |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
719 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
720 |
component := box addTextLabel:(resources at:'Resource value (* for any; matchPattern is allowed):') withCRs. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
721 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
722 |
box addInputFieldOn:valueHolder tabable:true. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
723 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
724 |
box addVerticalSpace:10. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
725 |
box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'. |
2048 | 726 |
box addAbortAndOkButtons. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
727 |
|
3293
d7b925f89a7b
dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
728 |
box open. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
729 |
box destroy. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
730 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
731 |
box accepted ifTrue:[ |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
732 |
rsrc := resourceHolder value. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
733 |
value := valueHolder value. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
734 |
|
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
735 |
(rsrc size == 0 or:[rsrc = '*' or:[rsrc = anyString]]) ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
736 |
t := 'methods with any resource'. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
737 |
rsrc := nil |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
738 |
] ifFalse:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
739 |
t := 'methods with #' , rsrc , '-resource'. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
740 |
rsrc := rsrc withoutSeparators asSymbol |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
741 |
]. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
742 |
(value size == 0 or:[value = '*']) ifTrue:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
743 |
t := t , ' and any value'. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
744 |
value := nil |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
745 |
] ifFalse:[ |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
746 |
t := t , ' and value ' , value. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
747 |
]. |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
748 |
self withWaitCursorDo:[ |
3140 | 749 |
UserPreferences systemBrowserClass |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
750 |
browseForResource:rsrc |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
751 |
containing:value |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
752 |
in:(Smalltalk allClasses) |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
753 |
title:t |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
754 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
755 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
756 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
757 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
758 |
browseSenders |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
759 |
"open a senders- browser after asking for a selector" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
760 |
|
3369
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
761 |
|selector| |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
762 |
|
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
763 |
selector := Dialog |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
764 |
requestSelector:(resources at:'Browse senders of (Tab for completion):') |
3442 | 765 |
okLabel:(resources at:'Browse') |
3369
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
766 |
initialAnswer:''. |
ac3ce702451c
senders/implementors: Tab completion
Claus Gittinger <cg@exept.de>
parents:
3362
diff
changeset
|
767 |
selector size > 0 ifTrue:[ |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
768 |
self withWaitCursorDo:[ |
3140 | 769 |
UserPreferences systemBrowserClass |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
770 |
browseAllCallsOn:selector |
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
771 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
772 |
]. |
3442 | 773 |
|
774 |
"Modified: / 17.11.2001 / 16:33:42 / cg" |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
775 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
776 |
|
4199
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
777 |
browseUnboundGlobals |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
778 |
"open a browser on methods refering to unbound global variables" |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
779 |
|
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
780 |
self withWaitCursorDo:[ |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
781 |
UserPreferences systemBrowserClass |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
782 |
browseReferendsOfUnboundGlobalsWithTitle:(resources string:'References to unbound global variables') |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
783 |
warnIfNone:true |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
784 |
] |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
785 |
! |
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
786 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
787 |
browseUndeclared |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
788 |
"open a browser on methods refering to undeclared variables" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
789 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
790 |
self withWaitCursorDo:[ |
3140 | 791 |
UserPreferences systemBrowserClass |
3778 | 792 |
browseReferendsOf:(Smalltalk undeclaredPrefix , '*') |
4199
f9bc3cbc38f7
added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents:
4155
diff
changeset
|
793 |
title:(resources string:'References to undeclared variables') |
2696
bc8ab69f2a56
allow browserClass to be set in preferences
Claus Gittinger <cg@exept.de>
parents:
2689
diff
changeset
|
794 |
warnIfNone:true |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
795 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
796 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
797 |
|
3778 | 798 |
clearUndeclaredVariables |
799 |
"remove all undeclared variables" |
|
800 |
||
801 |
Smalltalk clearUndeclaredVariables |
|
802 |
! |
|
803 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
804 |
removeAllBreakAndTracePoints |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
805 |
"remove all break- and trace points" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
806 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
807 |
self withCursor:Cursor execute do:[ MessageTracer cleanup] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
808 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
809 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
810 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
811 |
startClassBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
812 |
"open a classBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
813 |
|
3140 | 814 |
UserPreferences systemBrowserClass askThenBrowseClass |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
815 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
816 |
|
3100
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
817 |
startClassBrowserOnChangedClasses |
2854
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
818 |
"open a classBrowser on the changeSet" |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
819 |
|
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
820 |
NewSystemBrowser isNil ifTrue:[ |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
821 |
^ self warn:'This needs the NewSystemBrowser to be loaded.' |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
822 |
]. |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
823 |
NewSystemBrowser openOnClassesInChangeSet |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
824 |
! |
ac97ea47bb08
browse changed classes added
Claus Gittinger <cg@exept.de>
parents:
2845
diff
changeset
|
825 |
|
3100
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
826 |
startClassBrowserOnChangedMethods |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
827 |
"open a classBrowser on the changeSet" |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
828 |
|
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
829 |
NewSystemBrowser isNil ifTrue:[ |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
830 |
^ self warn:'This needs the NewSystemBrowser to be loaded.' |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
831 |
]. |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
832 |
NewSystemBrowser openOnMethodsInChangeSet |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
833 |
! |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
834 |
|
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
835 |
startClassBrowserOnChanges |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
836 |
"open a classBrowser on the changeSet" |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
837 |
|
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
838 |
^ self startClassBrowserOnChangedClasses |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
839 |
! |
8867c882329c
added 'browse changed methods' function.
Claus Gittinger <cg@exept.de>
parents:
3079
diff
changeset
|
840 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
841 |
startClassHierarchyBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
842 |
"open a classHierarchyBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
843 |
|
3140 | 844 |
UserPreferences systemBrowserClass askThenBrowseClassHierarchy |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
845 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
846 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
847 |
startFullClassBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
848 |
"open a fullClass systemBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
849 |
|
3140 | 850 |
UserPreferences systemBrowserClass askThenBrowseFullClassProtocol |
3575
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
851 |
! |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
852 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
853 |
startRemoteImageBrowser |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
854 |
"open a remoteImage browser; asks for hostname. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
855 |
The remote host must have an st/x running with remote browsing enabled. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
856 |
Sorry, for now, only the old browser can be used this way." |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
857 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
858 |
|hostName| |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
859 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
860 |
hostName := Dialog request:'Remote Host:'. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
861 |
SystemBrowser openOnRemoteImageOnHost:hostName port:nil. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
862 |
! |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
863 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
864 |
startSnapshotImageBrowser |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
865 |
"open a snapshotImage browser; asks for filename. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
866 |
Sorry, for now, only the old browser can be used this way." |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
867 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
868 |
|imageFileName| |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
869 |
|
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
870 |
imageFileName := Dialog requestFileName:'Name of Snapshot Image File:' default:'st.img' pattern:'*.img;*.sav'. |
c35b9ba0092c
snapshotImage and remoteImage browser
Claus Gittinger <cg@exept.de>
parents:
3572
diff
changeset
|
871 |
SystemBrowser openOnSnapShotImage:imageFileName |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
872 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
873 |
|
2038 | 874 |
!AbstractLauncherApplication methodsFor:'user actions - demos'! |
875 |
||
3035 | 876 |
startPDALauncher |
877 |
self startRemoteLauncherWithSetup:[:newDisplay | newDisplay bePDA]. |
|
878 |
! |
|
879 |
||
2038 | 880 |
startRemoteLauncher |
3035 | 881 |
self startRemoteLauncherWithSetup:[:newDisplay | ]. |
882 |
! |
|
883 |
||
884 |
startRemoteLauncherWithSetup:aSetupBlock |
|
2754 | 885 |
|host remoteDisplay remoteDisplayClass| |
2038 | 886 |
|
2620 | 887 |
host := Dialog |
888 |
request:(resources string:'Remote Launcher on which display:') |
|
3215 | 889 |
initialAnswer:'{hostName}:0' |
890 |
initialSelection:(1 to:10). |
|
2038 | 891 |
host size > 0 ifTrue:[ |
2359 | 892 |
(host includes:$:) ifFalse:[ |
893 |
host := (host , ':0') |
|
894 |
]. |
|
2754 | 895 |
|
896 |
remoteDisplayClass := XWorkstation. |
|
897 |
||
2755
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
898 |
"/ "/ Q: should we allow GL graphics on the remote display |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
899 |
"/ "/ (Problem: the GL library is not threadsafe, when multiple-display connections |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
900 |
"/ "/ are open - leading to mixing output between views ...) |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
901 |
"/ |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
902 |
"/ "/ only simulated GL can be done remote (i.e. not on SGI) |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
903 |
"/ (Screen current supportsGLDrawing |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
904 |
"/ and:[Screen current isTrueGL not]) |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
905 |
"/ ifTrue:[ |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
906 |
"/ remoteDisplayClass := GLXWorkstation. |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
907 |
"/ ]. |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
908 |
|
3664
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
909 |
[ |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
910 |
remoteDisplay := remoteDisplayClass newDispatchingFor:host. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
911 |
] on:Screen deviceOpenErrorSignal do:[:ex| |
2359 | 912 |
self warn:'Could not connect to display: ''' , host , '''.'. |
913 |
^ self |
|
914 |
]. |
|
3035 | 915 |
aSetupBlock value:remoteDisplay. |
2755
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
916 |
Screen currentScreenQuerySignal |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
917 |
answer:remoteDisplay |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
918 |
do:[ |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
919 |
self class open. |
48769b1546d8
use new utility method to start a remote application
Claus Gittinger <cg@exept.de>
parents:
2754
diff
changeset
|
920 |
] |
2038 | 921 |
]. |
922 |
||
923 |
"Created: / 10.9.1998 / 11:48:42 / cg" |
|
924 |
! ! |
|
925 |
||
2001 | 926 |
!AbstractLauncherApplication methodsFor:'user actions - file'! |
927 |
||
928 |
objectModuleDialog |
|
929 |
"opens a moduleInfo dialog" |
|
930 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
931 |
^ LauncherDialogs objectModuleDialog |
2001 | 932 |
|
933 |
"Modified: / 31.7.1998 / 17:33:24 / cg" |
|
934 |
! |
|
935 |
||
2490
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
936 |
packageDialog |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
937 |
"opens a package dialog" |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
938 |
|
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
939 |
^ LauncherDialogs packageDialog |
2490
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
940 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
941 |
"Modified: / 31.7.1998 / 17:33:24 / cg" |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
942 |
! |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
943 |
|
2001 | 944 |
saveImageAs: aFileName |
945 |
"save image in aFilename" |
|
946 |
||
947 |
aFileName notNil ifTrue:[ |
|
2621 | 948 |
self withCursor:Cursor write do:[ |
949 |
(ObjectMemory snapShotOn:aFileName) ifFalse:[ |
|
950 |
self warn:('Failed to save snapshot image (disk full or not writable)'). |
|
951 |
] |
|
952 |
]. |
|
2001 | 953 |
]. |
954 |
! ! |
|
955 |
||
956 |
!AbstractLauncherApplication methodsFor:'user actions - help'! |
|
957 |
||
958 |
showBookPrintDocument |
|
959 |
"open an HTML browser on the 'book'-printing document" |
|
960 |
||
961 |
self showDocumentation:'BOOK.html' |
|
962 |
! |
|
963 |
||
964 |
startClassDocumentation |
|
965 |
"open an HTML browser on the 'classDoc/TOP' document" |
|
966 |
||
967 |
self showDocumentation:'classDoc/TOP.html' |
|
968 |
||
969 |
! |
|
970 |
||
971 |
startDocumentationIndex |
|
972 |
"open an HTML browser on the 'index' document" |
|
973 |
||
974 |
self showDocumentation:'index.html' |
|
975 |
! |
|
976 |
||
977 |
startDocumentationTool |
|
978 |
"open an HTML browser on the 'TOP' document" |
|
979 |
||
980 |
self showDocumentation:'TOP.html' |
|
981 |
||
982 |
! |
|
983 |
||
984 |
startWhatsNewDocumentation |
|
985 |
"open an HTML browser on the 'whatsNew.html' document" |
|
986 |
||
987 |
self showDocumentation:'whatsNew.html' |
|
988 |
||
2296 | 989 |
! |
990 |
||
991 |
startWhatsNewSTX |
|
992 |
"open an HTML browser on the 'relNotes.html' document" |
|
993 |
||
994 |
self showDocumentation:'newFeatures.html' |
|
995 |
||
2001 | 996 |
! ! |
997 |
||
998 |
!AbstractLauncherApplication methodsFor:'user actions - settings'! |
|
999 |
||
2196 | 1000 |
communicationsSettings |
1001 |
"open a dialog on misc other settings" |
|
1002 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1003 |
self settingsDialog:[:handler | handler communicationsSettings] |
2196 | 1004 |
|
1005 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
1006 |
! |
|
1007 |
||
2001 | 1008 |
compilerSettings |
1009 |
"open a dialog on compiler related settings" |
|
1010 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1011 |
self settingsDialog:[:handler | handler compilerSettings] |
2001 | 1012 |
! |
1013 |
||
1014 |
displaySettings |
|
1015 |
"open a dialog on display related settings" |
|
1016 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1017 |
self settingsDialog:[:handler | handler displaySettings] |
2001 | 1018 |
|
1019 |
"Modified: / 31.7.1998 / 22:45:38 / cg" |
|
1020 |
! |
|
1021 |
||
1022 |
editSettings |
|
1023 |
"open a dialog on edit settings" |
|
1024 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1025 |
self settingsDialog:[:handler | handler editSettings] |
2001 | 1026 |
|
1027 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
1028 |
"Created: / 6.1.1999 / 14:14:48 / cg" |
|
1029 |
! |
|
1030 |
||
1031 |
fontSettings |
|
1032 |
"open a dialog on font related settings" |
|
1033 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1034 |
self settingsDialog:[:handler | handler fontSettingsFor:self] |
2001 | 1035 |
|
1036 |
"Modified: / 31.7.1998 / 22:45:44 / cg" |
|
1037 |
! |
|
1038 |
||
1039 |
javaSettings |
|
1040 |
"open a dialog on java-subsystem related settings" |
|
1041 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1042 |
self settingsDialog:[:handler | handler javaSettings] |
2001 | 1043 |
|
1044 |
"Modified: / 31.7.1998 / 22:46:13 / cg" |
|
1045 |
! |
|
1046 |
||
1047 |
keyboardSetting |
|
1048 |
"open a dialog on keyboard related settings" |
|
1049 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1050 |
self settingsDialog:[:handler | handler keyboardSettings] |
2001 | 1051 |
|
1052 |
"Modified: / 31.7.1998 / 22:45:56 / cg" |
|
1053 |
! |
|
1054 |
||
1055 |
languageSetting |
|
1056 |
"open a dialog on language related settings" |
|
1057 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1058 |
self settingsDialog:[:handler | handler languageSettingsFor:self] |
2001 | 1059 |
|
1060 |
"Modified: / 31.7.1998 / 22:46:13 / cg" |
|
1061 |
! |
|
1062 |
||
1063 |
loadSettings |
|
1064 |
"restore settings from a settings-file." |
|
1065 |
||
1066 |
"a temporary kludge - we need a central systemSettings object for this, |
|
1067 |
which can be saved/restored with a single store/read." |
|
1068 |
||
1069 |
|fileName| |
|
1070 |
||
1071 |
fileName := Dialog |
|
4052 | 1072 |
requestFileName:(resources string:'Load Settings From:') |
3790 | 1073 |
default:'settings.stx' |
1074 |
ok:(resources string:'Load') |
|
1075 |
abort:(resources string:'Cancel') |
|
1076 |
pattern:'*.stx' |
|
1077 |
fromDirectory:nil. |
|
2021 | 1078 |
|
1079 |
(fileName size == 0) ifTrue:[ |
|
3790 | 1080 |
"/ canceled |
1081 |
^ self |
|
2001 | 1082 |
]. |
1083 |
||
1084 |
self withWaitCursorDo:[ |
|
3790 | 1085 |
Smalltalk fileIn:fileName. |
1086 |
self reOpen |
|
2001 | 1087 |
]. |
1088 |
! |
|
1089 |
||
1090 |
memorySettings |
|
1091 |
"open a dialog on objectMemory related settings" |
|
1092 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1093 |
self settingsDialog:[:handler | handler memorySettings] |
2001 | 1094 |
|
1095 |
"Modified: / 31.7.1998 / 22:46:33 / cg" |
|
1096 |
! |
|
1097 |
||
1098 |
messageSettings |
|
1099 |
"open a dialog on infoMessage related settings" |
|
1100 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1101 |
self settingsDialog:[:handler | handler messageSettings] |
2001 | 1102 |
|
1103 |
"Modified: / 31.7.1998 / 22:46:45 / cg" |
|
1104 |
! |
|
1105 |
||
1106 |
miscSettings |
|
1107 |
"open a dialog on misc other settings" |
|
1108 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1109 |
self settingsDialog:[:handler | handler miscSettings] |
2001 | 1110 |
|
1111 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
1112 |
! |
|
1113 |
||
1114 |
printerSettings |
|
1115 |
"open a dialog on printer related settings" |
|
1116 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1117 |
self settingsDialog:[:handler | handler printerSettings] |
2001 | 1118 |
|
1119 |
"Modified: / 31.7.1998 / 22:47:05 / cg" |
|
1120 |
! |
|
1121 |
||
1122 |
saveSettings |
|
1123 |
"save settings to a settings-file." |
|
1124 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1125 |
self settingsDialog:[:handler | handler saveSettings] |
2001 | 1126 |
|
1127 |
"Modified: / 31.7.1998 / 22:48:38 / cg" |
|
1128 |
! |
|
1129 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1130 |
settingsDialog:symbolOrBlock |
2001 | 1131 |
"open a dialog on viewStyle related settings" |
1132 |
||
2196 | 1133 |
|handler| |
1134 |
||
1135 |
RegisteredMenuHandlers notNil ifTrue:[ |
|
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1136 |
handler := RegisteredMenuHandlers at:symbolOrBlock ifAbsent:nil. |
2196 | 1137 |
]. |
1138 |
handler isNil ifTrue:[ |
|
1139 |
handler := LauncherDialogs |
|
1140 |
]. |
|
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1141 |
symbolOrBlock isBlock ifTrue:[ |
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1142 |
symbolOrBlock value:handler |
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1143 |
] ifFalse:[ |
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1144 |
handler perform:symbolOrBlock with:self. |
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1145 |
] |
2001 | 1146 |
|
1147 |
"Modified: / 31.7.1998 / 22:47:33 / cg" |
|
1148 |
! |
|
1149 |
||
1150 |
sourceAndDebuggerSettings |
|
1151 |
"open a dialog on misc other settings" |
|
1152 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1153 |
self settingsDialog:[:handler | handler sourceAndDebuggerSettings] |
2001 | 1154 |
|
1155 |
"Modified: / 31.7.1998 / 22:47:21 / cg" |
|
1156 |
! |
|
1157 |
||
1158 |
toolSettings |
|
1159 |
"open a dialog on tool settings" |
|
1160 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1161 |
self settingsDialog:[:handler | handler toolSettings] |
2001 | 1162 |
|
1163 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
1164 |
"Created: / 13.10.1998 / 15:50:53 / cg" |
|
1165 |
! |
|
1166 |
||
1167 |
viewStyleSetting |
|
1168 |
"open a dialog on viewStyle related settings" |
|
1169 |
||
4062
decb623a8c3d
settings dialogs no longer need a requestor (with few exceptions)
ca
parents:
4052
diff
changeset
|
1170 |
self settingsDialog:[:handler | handler viewStyleSettingsFor:self] |
2001 | 1171 |
|
1172 |
"Modified: / 31.7.1998 / 22:47:33 / cg" |
|
1173 |
! ! |
|
1174 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1175 |
!AbstractLauncherApplication methodsFor:'user actions - system'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1176 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1177 |
compressingGarbageCollect |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1178 |
"perform a compressing garbageCollect" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1179 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1180 |
self withWaitCursorDo:[ObjectMemory verboseGarbageCollect] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1181 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1182 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1183 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1184 |
garbageCollect |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1185 |
"perform a non-compressing garbageCollect" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1186 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1187 |
self withWaitCursorDo:[ObjectMemory reclaimSymbols] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1188 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1189 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1190 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1191 |
startStopEventTrace |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1192 |
"start/stop event tracing for a particular view" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1193 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1194 |
|v wg| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1195 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1196 |
v := Screen current viewFromUser. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1197 |
v notNil ifTrue:[ |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1198 |
v := v topView. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1199 |
wg := v windowGroup. |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1200 |
wg notNil ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1201 |
"/ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1202 |
"/ toggle eventTrace in its windowGroup |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1203 |
"/ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1204 |
wg traceEvents:(wg preEventHook isNil) |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1205 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1206 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1207 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1208 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1209 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1210 |
!AbstractLauncherApplication methodsFor:'user actions - tools'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1211 |
|
2210 | 1212 |
inspectGlobalVariables |
1213 |
"inspect globals" |
|
1214 |
||
1215 |
Smalltalk inspect |
|
1216 |
! |
|
1217 |
||
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1218 |
inspectWorkspaceVariables |
2210 | 1219 |
"inspect workspace variables" |
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1220 |
|
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1221 |
Workspace workspaceVariables inspect |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1222 |
! |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1223 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1224 |
newProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1225 |
"creates a new project & opens a projectView for it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1226 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1227 |
Project notNil ifTrue: [(ProjectView for: Project new) open] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1228 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1229 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1230 |
openTerminal |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1231 |
self openApplication:#VT100TerminalView |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1232 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1233 |
"Created: / 27.7.1998 / 12:48:30 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1234 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1235 |
|
3158 | 1236 |
openWorkspace |
1237 |
WorkspaceApplication notNil ifTrue:[ |
|
1238 |
^ WorkspaceApplication open |
|
1239 |
]. |
|
1240 |
^ self openApplication:Workspace |
|
1241 |
! |
|
1242 |
||
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1243 |
removeAllWorkspaceVariables |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1244 |
"remove workspace variables" |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1245 |
|
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1246 |
Workspace removeAllWorkspaceVariables |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1247 |
! |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1248 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1249 |
selectProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1250 |
"asks for and switch to another project" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1251 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1252 |
|list box| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1253 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1254 |
Project notNil ifTrue:[ |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1255 |
list := Project allInstances. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1256 |
box := ListSelectionBox new. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1257 |
box list:(list collect:[:p | p name]). |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1258 |
box title:(resources string:'select a project'). |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1259 |
box action:[:selection | |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1260 |
|project| |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1261 |
|
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1262 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1263 |
project isNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1264 |
transcript notNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1265 |
transcript showCR:'no such project.' |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1266 |
] |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1267 |
] ifFalse:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1268 |
project showViews. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1269 |
Project current:project |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1270 |
] |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1271 |
]. |
3293
d7b925f89a7b
dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents:
3288
diff
changeset
|
1272 |
box open. |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1273 |
box destroy |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1274 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1275 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1276 |
|
3408 | 1277 |
startBugMessages |
1278 |
"open the SUnit test runner" |
|
1279 |
||
1280 |
self openApplication:#BugGUI |
|
1281 |
||
1282 |
"Modified: / 17.10.1998 / 14:38:18 / cg" |
|
1283 |
! |
|
1284 |
||
3362 | 1285 |
startChangeSetBrowser |
1286 |
"open a change Set Browser" |
|
1287 |
||
1288 |
ChangeSetBrowser open |
|
1289 |
||
1290 |
"Created: / 5.11.2001 / 18:04:05 / cg" |
|
1291 |
! |
|
1292 |
||
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1293 |
startChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1294 |
"open a changebrowser - either new or old GUI, depending on userPrefs" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1295 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1296 |
self openApplication:(UserPreferences current changesBrowserClass) |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1297 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1298 |
"Modified: / 17.10.1998 / 14:38:18 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1299 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1300 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1301 |
startNewChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1302 |
"opens the new changeBrowser" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1303 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1304 |
self openApplication:#NewChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1305 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1306 |
"Created: / 6.6.1998 / 19:47:26 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1307 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1308 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1309 |
startNewLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1310 |
"opens the new launcher" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1311 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1312 |
NewLauncher isNil ifTrue:[ |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1313 |
^ self warn:'The NewLauncher is not available in this release.' |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1314 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1315 |
NewLauncher openAt:(self window origin) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1316 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1317 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1318 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1319 |
startOldChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1320 |
"opens the old changeBrowser" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1321 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1322 |
self openApplication:#ChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1323 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1324 |
"Created: / 6.6.1998 / 19:47:26 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1325 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1326 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1327 |
startOldLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1328 |
"opens the old launcher" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1329 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1330 |
Launcher isNil ifTrue:[ |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1331 |
^ self warn:'The (Old)Launcher is not available in this release.' |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1332 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1333 |
Launcher openAt:(self window origin) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1334 |
|
2883 | 1335 |
! |
1336 |
||
1337 |
startSUnitTestRunner |
|
1338 |
"open the SUnit test runner" |
|
1339 |
||
3037 | 1340 |
self openApplication:#TestRunner |
2883 | 1341 |
|
1342 |
"Modified: / 17.10.1998 / 14:38:18 / cg" |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1343 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1344 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1345 |
!AbstractLauncherApplication methodsFor:'user actions - windows'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1346 |
|
2765 | 1347 |
askForAnotherDisplay |
1348 |
"ask for some other display" |
|
1349 |
||
3664
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1350 |
|displayName| |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1351 |
|
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1352 |
displayName := Dialog request:'Display:' initialAnswer:(Screen default displayName). |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1353 |
displayName size == 0 ifTrue:[^ nil]. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1354 |
|
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1355 |
^ XWorkstation newDispatchingFor:displayName. |
2765 | 1356 |
! |
1357 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1358 |
deIconifyAllWindows |
2144 | 1359 |
|setOfViews currentScreen| |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1360 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1361 |
setOfViews := Project current views asIdentitySet. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1362 |
setOfViews addAll:(Project defaultProject views). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1363 |
|
2144 | 1364 |
currentScreen := Screen current. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1365 |
setOfViews do:[:aTopView | |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1366 |
aTopView device == currentScreen ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1367 |
aTopView expand |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1368 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1369 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1370 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1371 |
" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1372 |
Transcript topView application deIconifyAllWindows |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1373 |
" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1374 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1375 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1376 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1377 |
findAndDestroyWindow |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1378 |
"find a window (by name) and destroy it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1379 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1380 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1381 |
v := self findWindow:'select view to close:'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1382 |
v notNil ifTrue:[v destroy] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1383 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1384 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1385 |
|
2759 | 1386 |
findAndMigrateWindow |
1387 |
"find a window (by name) and migrate it to some other display" |
|
1388 |
||
2766 | 1389 |
|possibleGroups v| |
1390 |
||
1391 |
possibleGroups := WindowGroup allInstances select:[:eachGroup | |
|
3014 | 1392 |
eachGroup graphicsDevice == Screen current |
2766 | 1393 |
and:[eachGroup isModal not |
1394 |
and:[eachGroup topViews size > 0]]]. |
|
1395 |
possibleGroups size == 0 ifTrue:[ |
|
1396 |
self information:'No windows found which could be migrated to some other display.'. |
|
1397 |
^ self |
|
1398 |
]. |
|
1399 |
||
1400 |
v := self findWindow:'Select view to migrate:' windowGroupFilter:possibleGroups. |
|
2759 | 1401 |
v notNil ifTrue:[ |
1402 |
self migrateWindow:v topView |
|
1403 |
] |
|
1404 |
! |
|
1405 |
||
2766 | 1406 |
findAndMigrateWindowBack |
1407 |
"find a window (by name) and migrate it back to this display" |
|
1408 |
||
1409 |
|possibleGroups v| |
|
1410 |
||
1411 |
possibleGroups := WindowGroup allInstances select:[:eachGroup | |
|
3014 | 1412 |
eachGroup graphicsDevice ~~ Screen current |
2766 | 1413 |
and:[eachGroup isModal not |
1414 |
and:[eachGroup topViews size > 0]]]. |
|
1415 |
possibleGroups size == 0 ifTrue:[ |
|
1416 |
self information:'No windows are open on any other display.'. |
|
1417 |
^ self |
|
1418 |
]. |
|
1419 |
||
1420 |
v := self findWindow:'Select view to migrate back:' windowGroupFilter:possibleGroups. |
|
1421 |
v notNil ifTrue:[ |
|
1422 |
v windowGroup migrateTo:(Screen current) |
|
1423 |
] |
|
1424 |
! |
|
1425 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1426 |
findAndRaiseWindow |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1427 |
"find a window (by name) and raise it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1428 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1429 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1430 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1431 |
v := self findWindow:'select view to raise deiconified:'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1432 |
v notNil ifTrue:[v raiseDeiconified] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1433 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1434 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1435 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1436 |
fullScreenHardcopy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1437 |
"after a second (to allow redraw of views under menu ...), |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1438 |
save the contents of the whole screen." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1439 |
|
3326 | 1440 |
self window sensor ctrlDown ifTrue:[ |
1441 |
^ self fullScreenHardcopyUngrabbed |
|
1442 |
]. |
|
1443 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1444 |
Processor |
3326 | 1445 |
addTimedBlock:[ |
1446 |
self |
|
1447 |
saveScreenImage:(Image fromScreen) |
|
1448 |
defaultName:'screen' |
|
1449 |
] |
|
1450 |
afterSeconds:(self window sensor shiftDown ifTrue:5 ifFalse:1) |
|
1451 |
! |
|
1452 |
||
1453 |
fullScreenHardcopyUngrabbed |
|
1454 |
"after a second (to allow redraw of views under menu ...), |
|
1455 |
save the contents of the whole screen." |
|
1456 |
||
1457 |
Processor |
|
1458 |
addTimedBlock:[ |
|
1459 |
|display image| |
|
1460 |
||
1461 |
display := Screen current. |
|
1462 |
image := Image |
|
1463 |
fromScreen:(0@0 corner:(display extent)) |
|
1464 |
on:display |
|
1465 |
grab:false. |
|
1466 |
||
1467 |
self |
|
1468 |
saveScreenImage:image |
|
1469 |
defaultName:'screen' |
|
1470 |
] |
|
1471 |
afterSeconds:(self window sensor shiftDown ifTrue:5 ifFalse:1) |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1472 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1473 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1474 |
iconifyAllWindows |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1475 |
|setOfViews currentScreen| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1476 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1477 |
setOfViews := Project current views asIdentitySet. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1478 |
setOfViews addAll:(Project defaultProject views). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1479 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1480 |
currentScreen := Screen current. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1481 |
setOfViews do:[:aTopView | |
3219
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1482 |
aTopView device == currentScreen ifTrue:[ |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1483 |
aTopView collapse |
2e32f575524c
removed mouseSettings - useless
Claus Gittinger <cg@exept.de>
parents:
3218
diff
changeset
|
1484 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1485 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1486 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1487 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1488 |
|
2765 | 1489 |
migrateAllWindows |
1490 |
"migrate all views to some other display" |
|
1491 |
||
1492 |
|anotherDisplay toMigrate| |
|
1493 |
||
3664
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1494 |
[ |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1495 |
anotherDisplay := self askForAnotherDisplay. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1496 |
anotherDisplay isNil ifTrue:[ |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1497 |
^ self. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1498 |
]. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1499 |
] on:Screen deviceOpenErrorSignal do:[:ex| |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1500 |
^ self warn:'cannot open display: ', ex parameter. |
2765 | 1501 |
]. |
1502 |
||
1503 |
toMigrate := WindowGroup allInstances |
|
3664
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1504 |
select:[:each | each graphicsDevice == Screen current |
2765 | 1505 |
and:[each topViews size > 0 |
1506 |
and:[each isModal not]] |
|
1507 |
]. |
|
1508 |
toMigrate do:[:eachGroup | |
|
1509 |
eachGroup migrateTo:anotherDisplay |
|
1510 |
] |
|
1511 |
! |
|
1512 |
||
2759 | 1513 |
migrateWindow:aWindow |
1514 |
"migrate a view to some other display" |
|
1515 |
||
2778
1e4bf8bf1d37
block migration of a modalBox
Claus Gittinger <cg@exept.de>
parents:
2775
diff
changeset
|
1516 |
aWindow windowGroup isModal ifTrue:[ |
1e4bf8bf1d37
block migration of a modalBox
Claus Gittinger <cg@exept.de>
parents:
2775
diff
changeset
|
1517 |
self warn:'Sorry - I cannot migrate a modalBox; please migrate the owning View.'. |
1e4bf8bf1d37
block migration of a modalBox
Claus Gittinger <cg@exept.de>
parents:
2775
diff
changeset
|
1518 |
^ self |
1e4bf8bf1d37
block migration of a modalBox
Claus Gittinger <cg@exept.de>
parents:
2775
diff
changeset
|
1519 |
]. |
2775 | 1520 |
self migrateWindow:aWindow withBackOption:(self confirm:'Show ''Return Back'' Button on the other display ?') |
1521 |
||
1522 |
! |
|
1523 |
||
1524 |
migrateWindow:aWindow withBackOption:withBackOption |
|
1525 |
"migrate a view to some other display" |
|
1526 |
||
1527 |
|anotherDisplay wg here b| |
|
2765 | 1528 |
|
2766 | 1529 |
aWindow isTopView ifFalse:[ |
1530 |
self information:'Cannto migrate this view'. |
|
1531 |
^ self |
|
1532 |
]. |
|
1533 |
||
3664
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1534 |
[ |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1535 |
anotherDisplay := self askForAnotherDisplay. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1536 |
anotherDisplay isNil ifTrue:[ |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1537 |
^ self. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1538 |
]. |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1539 |
] on:Screen deviceOpenErrorSignal do:[:ex| |
77fb767b5368
Changed Workstation initialization
Stefan Vogel <sv@exept.de>
parents:
3644
diff
changeset
|
1540 |
^ self warn:'cannot open display: ', ex parameter. |
2759 | 1541 |
]. |
1542 |
||
2775 | 1543 |
wg := aWindow windowGroup. |
1544 |
wg migrateTo:anotherDisplay. |
|
1545 |
||
1546 |
withBackOption ifTrue:[ |
|
1547 |
here := Screen current. |
|
1548 |
b := Button onDevice:anotherDisplay. |
|
1549 |
b label:'Return window back to ' , here displayName. |
|
1550 |
b action:[ wg migrateTo:here. b destroy. ]. |
|
1551 |
b origin:0@0. |
|
1552 |
b open. |
|
1553 |
]. |
|
2759 | 1554 |
! |
1555 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1556 |
screenHardcopy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1557 |
"after a second (to allow redraw of views under menu ...), |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1558 |
let user specify a rectangular area on the screen |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1559 |
and save its contents." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1560 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1561 |
|area| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1562 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1563 |
Processor |
3782 | 1564 |
addTimedBlock:[ |
1565 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
|
1566 |
||
1567 |
area := Rectangle fromUser. |
|
1568 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
3856
d2c16db43c66
wait 2 seconds before grabbing
Claus Gittinger <cg@exept.de>
parents:
3826
diff
changeset
|
1569 |
Delay waitForSeconds:2. |
3782 | 1570 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
1571 |
] |
|
1572 |
] |
|
1573 |
afterSeconds:(self window sensor shiftDown ifTrue:5 ifFalse:1) |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1574 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1575 |
"Modified: / 18.8.1998 / 15:00:42 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1576 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1577 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1578 |
startWindowTreeView |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1579 |
"open a windowTree (on a picked topView)" |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1580 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1581 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1582 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1583 |
WindowTreeView isNil ifTrue:[ |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1584 |
^ self warn:'The WindowTreeView is not available in this release.' |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1585 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1586 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1587 |
v := self pickAView. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1588 |
v notNil ifTrue:[ |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1589 |
WindowTreeView openOn:v topView |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1590 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1591 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1592 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1593 |
|
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1594 |
startWindowTreeViewForAll |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1595 |
"open a windowTree on all views in the system" |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1596 |
|
4243 | 1597 |
|v| |
1598 |
||
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1599 |
WindowTreeView isNil ifTrue:[ |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1600 |
^ self warn:'The WindowTreeView is not available in this release.' |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1601 |
]. |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1602 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1603 |
WindowTreeView openOnAll |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1604 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1605 |
! |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1606 |
|
4244 | 1607 |
viewDestroy |
1608 |
"let user pick a view and destroy it. |
|
1609 |
Even allow destroying non-smalltalk views |
|
1610 |
(also for views which I forgot due to some error)" |
|
1611 |
||
1612 |
|device v id i c| |
|
1613 |
||
1614 |
(Delay forSeconds:1) wait. |
|
1615 |
||
1616 |
device := Screen current. |
|
1617 |
i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'. |
|
1618 |
i isNil ifTrue:[ |
|
1619 |
c := Cursor crossHair |
|
1620 |
] ifFalse:[ |
|
1621 |
c := Cursor fromImage:i |
|
1622 |
]. |
|
1623 |
id := device viewIdFromPoint:(device pointFromUserShowing:c). |
|
1624 |
(v := device viewFromId:id) notNil ifTrue:[ |
|
1625 |
v topView destroy. |
|
1626 |
^ self |
|
1627 |
]. |
|
1628 |
id = device rootView id ifTrue:[ |
|
1629 |
^ self |
|
1630 |
]. |
|
1631 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
|
1632 |
ifTrue:[ |
|
1633 |
device destroyView:nil withId:id |
|
1634 |
]. |
|
1635 |
||
1636 |
||
1637 |
! |
|
1638 |
||
1639 |
viewHardcopy |
|
1640 |
"after a second (to allow redraw of views under menu ...), |
|
1641 |
let user specify a view and save its contents." |
|
1642 |
||
1643 |
Processor |
|
1644 |
addTimedBlock:[ |
|
1645 |
|v| |
|
1646 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
|
1647 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
1648 |
] |
|
1649 |
] |
|
1650 |
afterSeconds:(self window sensor shiftDown ifTrue:5 ifFalse:1) |
|
1651 |
! |
|
1652 |
||
1653 |
viewInspect |
|
1654 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
1655 |
||
1656 |
|v| |
|
1657 |
||
1658 |
(v := self pickAView) notNil ifTrue:[ |
|
1659 |
v inspect |
|
1660 |
] |
|
1661 |
||
1662 |
! |
|
1663 |
||
1664 |
viewMigrate |
|
1665 |
"let user pick a view and migrate it to some other display" |
|
1666 |
||
1667 |
|v| |
|
1668 |
||
1669 |
(v := self pickAView) notNil ifTrue:[ |
|
1670 |
self migrateWindow:v topView |
|
1671 |
] |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1672 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1673 |
|
4311 | 1674 |
!AbstractLauncherApplication::HierarchicalSettingsApplList class methodsFor:'accessing'! |
1675 |
||
1676 |
itemClass |
|
1677 |
||
1678 |
^ HierarchicalSettingsApplItem |
|
4291 | 1679 |
! ! |
1680 |
||
4311 | 1681 |
!AbstractLauncherApplication::HierarchicalSettingsApplList class methodsFor:'queries'! |
1682 |
||
1683 |
recursiveGetParentFor:aCategory |
|
4291 | 1684 |
! ! |
1685 |
||
1686 |
!AbstractLauncherApplication::HierarchicalSettingsApplList::HierarchicalSettingsApplItem methodsFor:'accessing'! |
|
1687 |
||
4311 | 1688 |
applClass |
1689 |
"return the value of the instance variable 'applClass' (automatically generated)" |
|
1690 |
||
1691 |
^ applClass |
|
1692 |
! |
|
1693 |
||
1694 |
applClass:something |
|
1695 |
"set the value of the instance variable 'applClass' (automatically generated)" |
|
1696 |
||
1697 |
applClass := something. |
|
1698 |
! |
|
1699 |
||
1700 |
application |
|
1701 |
"return the value of the instance variable 'application' (automatically generated)" |
|
1702 |
||
1703 |
^ application |
|
1704 |
! |
|
1705 |
||
1706 |
application:something |
|
1707 |
"set the value of the instance variable 'application' (automatically generated)" |
|
1708 |
||
1709 |
application := something. |
|
1710 |
! |
|
1711 |
||
4291 | 1712 |
icon |
1713 |
"returns the icon |
|
1714 |
" |
|
4311 | 1715 |
icon isNil ifTrue:[ |
1716 |
^ super icon |
|
1717 |
]. |
|
4291 | 1718 |
^ icon |
1719 |
! |
|
1720 |
||
4311 | 1721 |
icon:something |
1722 |
"set the value of the instance variable 'icon' (automatically generated)" |
|
1723 |
||
1724 |
icon := something. |
|
1725 |
! |
|
1726 |
||
4291 | 1727 |
label |
1728 |
"returns the label |
|
1729 |
" |
|
1730 |
^ label |
|
1731 |
! |
|
1732 |
||
4311 | 1733 |
label:something |
1734 |
"set the value of the instance variable 'label' (automatically generated)" |
|
1735 |
||
1736 |
label := something. |
|
4322 | 1737 |
! |
1738 |
||
1739 |
nameString |
|
1740 |
"return the value of the instance variable 'nameString' (automatically generated)" |
|
1741 |
||
1742 |
^ nameString |
|
1743 |
! |
|
1744 |
||
1745 |
nameString:something |
|
1746 |
"set the value of the instance variable 'nameString' (automatically generated)" |
|
1747 |
||
1748 |
nameString := something. |
|
4311 | 1749 |
! ! |
1750 |
||
1751 |
!AbstractLauncherApplication::HierarchicalSettingsApplList::HierarchicalSettingsApplItem methodsFor:'printing & storing'! |
|
1752 |
||
1753 |
printString |
|
1754 |
||
1755 |
^ self label ? '???' |
|
1756 |
! ! |
|
1757 |
||
1758 |
!AbstractLauncherApplication::HierarchicalSettingsApplList::HierarchicalSettingsApplItem methodsFor:'queries'! |
|
1759 |
||
1760 |
isCategory |
|
1761 |
||
1762 |
^ self applClass isNil |
|
4291 | 1763 |
! ! |
1764 |
||
2001 | 1765 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs'! |
1766 |
||
4244 | 1767 |
communicationsSettings |
1768 |
"open a dialog on communications settings" |
|
1769 |
||
1770 |
|box check in resources y acceptChannel |
|
1771 |
hasRDoitServer rDoitServerPort |
|
1772 |
rDoitsEnabled rDoitLogging rDoitErrorLogging rDoitErrorDebugging |
|
1773 |
org_rDoitsEnabled org_rDoitLogging org_rDoitErrorLogging org_rDoitErrorDebugging org_rDoitServerPort |
|
1774 |
||
1775 |
hasRemoteBrowsingSupport remoteBrowsingEnabled org_remoteBrowsingEnabled |
|
1776 |
||
1777 |
hasWindowMigrationServer windowMigrationAuthenticate windowMigrationPassword |
|
1778 |
windowMigrationEnabled |
|
1779 |
org_windowMigrationEnabled org_windowMigrationAuthenticate org_windowMigrationPassword |
|
1780 |
||
1781 |
hasHTTPServer httpServerRunning httpServerFileRoot httpServerHomeURL |
|
1782 |
httpServerPort httpServerLogFile hasSwiki swikiEnabled swikiRoot |
|
1783 |
allowEmbedded hasSoap soapEnabled |
|
1784 |
org_httpServerRunning org_httpServerFileRoot org_httpServerHomeURL |
|
1785 |
org_httpServerPort org_swikiRoot org_swikiEnabled org_httpServerLogFile |
|
1786 |
org_allowEmbedded org_soapEnabled |
|
1787 |
||
1788 |
osiACSEPresent osiROSEPresent osiCMISEPresent |
|
1789 |
osiACSEErrorLogging osiACSEConnectionLogging osiACSEDataLogging |
|
1790 |
osiROSEErrorLogging osiROSEResponseLogging osiROSEInvokationLogging |
|
1791 |
osiCMISEErrorLogging osiCMISEMessageLogging |
|
1792 |
| |
|
1793 |
||
1794 |
acceptChannel := false asValue. |
|
1795 |
||
1796 |
resources := self owningClass classResources. |
|
1797 |
||
1798 |
"/ |
|
1799 |
"/ extract relevant remoteBrowsing settings ... |
|
1800 |
"/ |
|
1801 |
remoteBrowsingEnabled := false. |
|
1802 |
(hasRemoteBrowsingSupport := SmalltalkShareServer notNil) ifTrue:[ |
|
1803 |
SmalltalkShareServer isLoaded ifTrue:[ |
|
1804 |
remoteBrowsingEnabled := SmalltalkShareServer serverRunning. |
|
1805 |
]. |
|
1806 |
]. |
|
1807 |
org_remoteBrowsingEnabled := remoteBrowsingEnabled. |
|
1808 |
remoteBrowsingEnabled := remoteBrowsingEnabled asValue. |
|
1809 |
||
1810 |
"/ |
|
1811 |
"/ extract relevant windowMigration settings ... |
|
1812 |
"/ |
|
1813 |
windowMigrationEnabled := windowMigrationAuthenticate := false. |
|
1814 |
(hasWindowMigrationServer := WindowMigrationServer notNil) ifTrue:[ |
|
1815 |
WindowMigrationServer isLoaded ifTrue:[ |
|
1816 |
windowMigrationEnabled := WindowMigrationServer serverRunning. |
|
1817 |
]. |
|
1818 |
windowMigrationPassword := WindowMigrationServer password. |
|
1819 |
windowMigrationAuthenticate := windowMigrationPassword notNil. |
|
1820 |
]. |
|
1821 |
org_windowMigrationEnabled := windowMigrationEnabled. |
|
1822 |
windowMigrationEnabled := windowMigrationEnabled asValue. |
|
1823 |
org_windowMigrationAuthenticate := windowMigrationAuthenticate. |
|
1824 |
windowMigrationAuthenticate := windowMigrationAuthenticate asValue. |
|
1825 |
org_windowMigrationPassword := windowMigrationPassword. |
|
1826 |
windowMigrationPassword := windowMigrationPassword asValue. |
|
1827 |
||
1828 |
"/ |
|
1829 |
"/ extract relevant rdoit settings ... |
|
1830 |
"/ |
|
1831 |
rDoitsEnabled := rDoitLogging := rDoitErrorLogging := false. |
|
1832 |
(hasRDoitServer := RDoItServer notNil) ifTrue:[ |
|
1833 |
RDoItServer isLoaded ifTrue:[ |
|
1834 |
rDoitsEnabled := RDoItServer serverRunning. |
|
1835 |
rDoitLogging := RDoItServer isLogging. |
|
1836 |
rDoitErrorLogging := RDoItServer isErrorLogging. |
|
1837 |
rDoitErrorDebugging := RDoItServer isErrorCatching not. |
|
1838 |
rDoitServerPort := RDoItServer defaultPortNumber. |
|
1839 |
] |
|
1840 |
]. |
|
1841 |
org_rDoitsEnabled := rDoitsEnabled. |
|
1842 |
org_rDoitLogging := rDoitLogging. |
|
1843 |
org_rDoitErrorLogging := rDoitErrorLogging. |
|
1844 |
org_rDoitErrorDebugging := rDoitErrorDebugging. |
|
1845 |
org_rDoitServerPort := rDoitServerPort. |
|
1846 |
||
1847 |
rDoitServerPort := rDoitServerPort asValue. |
|
1848 |
rDoitsEnabled := rDoitsEnabled asValue. |
|
1849 |
rDoitLogging := rDoitLogging asValue. |
|
1850 |
rDoitErrorLogging := rDoitErrorLogging asValue. |
|
1851 |
rDoitErrorDebugging := rDoitErrorDebugging asValue. |
|
1852 |
||
1853 |
"/ |
|
1854 |
"/ extract http-server settings |
|
1855 |
"/ |
|
1856 |
hasHTTPServer := httpServerRunning := false. |
|
1857 |
(hasHTTPServer := HTTPServer notNil) ifTrue:[ |
|
1858 |
HTTPServer isLoaded ifTrue:[ |
|
1859 |
httpServerRunning := HTTPServer isRunning. |
|
1860 |
httpServerFileRoot := HTTPServer fileRoot. |
|
1861 |
httpServerHomeURL := HTTPServer homeURL. |
|
1862 |
httpServerPort := HTTPServer defaultPort. |
|
1863 |
httpServerLogFile := HTTPServer defaultLogFile. |
|
1864 |
]. |
|
1865 |
]. |
|
1866 |
org_httpServerRunning := httpServerRunning. |
|
1867 |
httpServerRunning := httpServerRunning asValue. |
|
1868 |
org_httpServerFileRoot := httpServerFileRoot. |
|
1869 |
httpServerFileRoot := httpServerFileRoot asValue. |
|
1870 |
org_httpServerHomeURL := httpServerHomeURL. |
|
1871 |
httpServerHomeURL := httpServerHomeURL asValue. |
|
1872 |
org_httpServerPort := httpServerPort. |
|
1873 |
httpServerPort := httpServerPort asValue. |
|
1874 |
org_httpServerLogFile := httpServerLogFile. |
|
1875 |
httpServerLogFile := httpServerLogFile asValue. |
|
1876 |
||
1877 |
httpServerRunning |
|
1878 |
onChangeEvaluate:[ |
|
1879 |
httpServerFileRoot value:(HTTPServer fileRoot). |
|
1880 |
httpServerHomeURL value:(HTTPServer homeURL). |
|
1881 |
httpServerPort value:(HTTPServer defaultPort). |
|
1882 |
httpServerLogFile value:(HTTPServer defaultLogFile) |
|
1883 |
]. |
|
1884 |
||
1885 |
hasSwiki := false. |
|
1886 |
swikiEnabled := false. |
|
1887 |
soapEnabled := false. |
|
1888 |
||
1889 |
(hasSwiki := PWS::SwikiAction notNil) ifTrue:[ |
|
1890 |
PWS::SwikiAction isLoaded ifTrue:[ |
|
1891 |
(HTTPServer notNil and:[HTTPServer isLoaded]) ifTrue:[ |
|
1892 |
swikiEnabled := HTTPServer hasMySwikiConfigured. |
|
1893 |
swikiRoot := PWS::SwikiAction serverDirectory. |
|
1894 |
] |
|
1895 |
]. |
|
1896 |
]. |
|
1897 |
(hasSoap := SOAP::SoapHttpModule notNil) ifTrue:[ |
|
1898 |
SOAP::SoapHttpModule isLoaded ifTrue:[ |
|
1899 |
(HTTPServer notNil and:[HTTPServer isLoaded]) ifTrue:[ |
|
1900 |
soapEnabled := HTTPServer hasSoapEnabled. |
|
1901 |
] |
|
1902 |
]. |
|
1903 |
]. |
|
1904 |
||
1905 |
org_swikiRoot := swikiRoot. |
|
1906 |
org_swikiEnabled := swikiEnabled. |
|
1907 |
org_soapEnabled := soapEnabled. |
|
1908 |
swikiRoot := swikiRoot asValue. |
|
1909 |
swikiEnabled := swikiEnabled asValue. |
|
1910 |
soapEnabled := soapEnabled asValue. |
|
1911 |
||
1912 |
swikiEnabled |
|
1913 |
onChangeEvaluate:[ |
|
1914 |
swikiRoot value:(PWS::SwikiAction serverDirectory). |
|
1915 |
]. |
|
1916 |
||
1917 |
allowEmbedded := HTTPServer isLoaded and:[HTTPServer enableEmbeddedSmalltalk]. |
|
1918 |
org_allowEmbedded := allowEmbedded. |
|
1919 |
allowEmbedded := allowEmbedded asValue. |
|
1920 |
||
1921 |
"/ |
|
1922 |
"/ osi settings ... |
|
1923 |
"/ |
|
1924 |
osiACSEPresent := OSI::ACSE notNil and:[OSI::ACSE isLoaded]. |
|
1925 |
osiROSEPresent := OSI::ROSE notNil and:[OSI::ROSE isLoaded]. |
|
1926 |
osiCMISEPresent := OSI::CMISE notNil and:[OSI::CMISE isLoaded]. |
|
1927 |
||
1928 |
osiACSEPresent ifTrue:[ |
|
1929 |
osiACSEErrorLogging := OSI::ACSE errorLogging asValue. |
|
1930 |
osiACSEConnectionLogging := OSI::ACSE connectionLogging asValue. |
|
1931 |
osiACSEDataLogging := OSI::ACSE dataLogging asValue. |
|
1932 |
]. |
|
1933 |
osiROSEPresent ifTrue:[ |
|
1934 |
osiROSEErrorLogging := OSI::ROSE errorLogging asValue. |
|
1935 |
osiROSEInvokationLogging := OSI::ROSE invocationLogging asValue. |
|
1936 |
osiROSEResponseLogging := OSI::ROSE responseLogging asValue. |
|
1937 |
]. |
|
1938 |
osiCMISEPresent ifTrue:[ |
|
1939 |
osiCMISEErrorLogging := OSI::CMISE errorLogging asValue. |
|
1940 |
osiCMISEMessageLogging := OSI::CMISE messageLogging asValue. |
|
1941 |
]. |
|
1942 |
||
1943 |
"/ |
|
1944 |
"/ create a box on those values ... |
|
1945 |
"/ |
|
1946 |
box := DialogBox new. |
|
1947 |
box label:(resources string:'Communication settings'). |
|
1948 |
||
1949 |
box addTextLabel:(resources string:'Remote browsing'). |
|
1950 |
||
1951 |
check := box addCheckBox:(resources string:'Remote browsing enabled') on:remoteBrowsingEnabled. |
|
1952 |
hasRemoteBrowsingSupport ifFalse:[ |
|
1953 |
check disable |
|
1954 |
]. |
|
1955 |
box addHorizontalLine. |
|
1956 |
||
1957 |
box addTextLabel:(resources string:'Window migration'). |
|
1958 |
||
1959 |
check := box addCheckBox:(resources string:'Window migration enabled') on:windowMigrationEnabled. |
|
1960 |
hasWindowMigrationServer ifFalse:[ |
|
1961 |
check disable |
|
1962 |
]. |
|
1963 |
check := box addCheckBox:(resources string:'Password check') on:windowMigrationAuthenticate. |
|
1964 |
check enableChannel:windowMigrationEnabled. |
|
1965 |
hasWindowMigrationServer ifFalse:[ |
|
1966 |
check disable |
|
1967 |
]. |
|
1968 |
box leftIndent:20. |
|
1969 |
in := box |
|
1970 |
addLabelledInputField:(resources string:'Password:') |
|
1971 |
adjust:#right |
|
1972 |
on:nil |
|
1973 |
tabable:true |
|
1974 |
separateAtX:0.3. |
|
1975 |
in passwordCharacter:$*. |
|
1976 |
in model:windowMigrationPassword. |
|
1977 |
in acceptChannel:acceptChannel. |
|
1978 |
in enableChannel:windowMigrationAuthenticate. |
|
1979 |
box leftIndent:0. |
|
1980 |
||
1981 |
box addHorizontalLine. |
|
1982 |
||
1983 |
box addTextLabel:'RDoIt Server'. |
|
1984 |
||
1985 |
check := box addCheckBox:(resources string:'Remote doits enabled') on:rDoitsEnabled. |
|
1986 |
hasRDoitServer ifFalse:[ |
|
1987 |
check disable |
|
1988 |
]. |
|
1989 |
box leftIndent:20. |
|
1990 |
rDoitsEnabled onChangeEvaluate:[ rDoitsEnabled value ifTrue:[ |
|
1991 |
rDoitServerPort value isNil ifTrue:[ |
|
1992 |
rDoitServerPort value:(RDoItServer defaultPortNumber). |
|
1993 |
] |
|
1994 |
] |
|
1995 |
]. |
|
1996 |
||
1997 |
in := box |
|
1998 |
addLabelledInputField:(resources string:'Port:') |
|
1999 |
adjust:#right |
|
2000 |
on:nil |
|
2001 |
tabable:true |
|
2002 |
separateAtX:0.3. |
|
2003 |
in converter:(PrintConverter new initForNumber). |
|
2004 |
in model:rDoitServerPort. |
|
2005 |
in acceptChannel:acceptChannel. |
|
2006 |
in enableChannel:rDoitsEnabled. |
|
2007 |
||
2008 |
y := box yPosition. |
|
2009 |
check := box addCheckBox:(resources string:'Log errors') on:rDoitErrorLogging. |
|
2010 |
check width:0.4. |
|
2011 |
check enableChannel:rDoitsEnabled. |
|
2012 |
hasRDoitServer ifFalse:[ |
|
2013 |
check disable |
|
2014 |
]. |
|
2015 |
box yPosition:y. |
|
2016 |
check := box addCheckBox:(resources string:'Log requests') on:rDoitLogging. |
|
2017 |
check left:0.4; width:0.4. |
|
2018 |
check enableChannel:rDoitsEnabled. |
|
2019 |
hasRDoitServer ifFalse:[ |
|
2020 |
check disable |
|
2021 |
]. |
|
2022 |
check := box addCheckBox:(resources string:'Debug errors') on:rDoitErrorDebugging. |
|
2023 |
check width:0.4. |
|
2024 |
check enableChannel:rDoitsEnabled. |
|
2025 |
hasRDoitServer ifFalse:[ |
|
2026 |
check disable |
|
2027 |
]. |
|
2028 |
box leftIndent:0. |
|
2029 |
||
2030 |
box addHorizontalLine. |
|
2031 |
||
2032 |
box addTextLabel:'HTTP Server'. |
|
2033 |
||
2034 |
check := box addCheckBox:(resources string:'Serving HTTP Requests') on:httpServerRunning. |
|
2035 |
hasHTTPServer ifFalse:[ |
|
2036 |
check disable |
|
2037 |
]. |
|
2038 |
box leftIndent:20. |
|
2039 |
in := box |
|
2040 |
addLabelledInputField:(resources string:'Port:') |
|
2041 |
adjust:#right |
|
2042 |
on:nil |
|
2043 |
tabable:true |
|
2044 |
separateAtX:0.3. |
|
2045 |
in converter:(PrintConverter new initForNumber). |
|
2046 |
in model:httpServerPort. |
|
2047 |
in acceptChannel:acceptChannel. |
|
2048 |
in enableChannel:httpServerRunning. |
|
2049 |
||
2050 |
in := box |
|
2051 |
addLabelledInputField:(resources string:'Log File:') |
|
2052 |
adjust:#right |
|
2053 |
on:httpServerLogFile |
|
2054 |
tabable:true |
|
2055 |
separateAtX:0.3. |
|
2056 |
in acceptChannel:acceptChannel. |
|
2057 |
in enableChannel:httpServerRunning. |
|
2058 |
||
2059 |
in := box |
|
2060 |
addLabelledInputField:(resources string:'File Root:') |
|
2061 |
adjust:#right |
|
2062 |
on:httpServerFileRoot |
|
2063 |
tabable:true |
|
2064 |
separateAtX:0.3. |
|
2065 |
in acceptChannel:acceptChannel. |
|
2066 |
in enableChannel:httpServerRunning. |
|
2067 |
||
2068 |
in := box |
|
2069 |
addLabelledInputField:(resources string:'Home URL:') |
|
2070 |
adjust:#right |
|
2071 |
on:httpServerHomeURL |
|
2072 |
tabable:true |
|
2073 |
separateAtX:0.3. |
|
2074 |
in acceptChannel:acceptChannel. |
|
2075 |
in enableChannel:httpServerRunning. |
|
2076 |
||
2077 |
check := box addCheckBox:(resources string:'Swiki enabled') on:swikiEnabled. |
|
2078 |
hasHTTPServer ifFalse:[ |
|
2079 |
check disable |
|
2080 |
]. |
|
2081 |
check enableChannel:httpServerRunning. |
|
2082 |
||
2083 |
"/ box leftIndent:40. |
|
2084 |
||
2085 |
in := box |
|
2086 |
addLabelledInputField:(resources string:'SwikiRoot:') |
|
2087 |
adjust:#right |
|
2088 |
on:swikiRoot |
|
2089 |
tabable:true |
|
2090 |
separateAtX:0.3. |
|
2091 |
in acceptChannel:acceptChannel. |
|
2092 |
in enableChannel:(BlockValue forLogical:httpServerRunning and:swikiEnabled). |
|
2093 |
||
2094 |
check := box addCheckBox:(resources string:'Allow embedded ST applications') on:allowEmbedded. |
|
2095 |
hasHTTPServer ifFalse:[ |
|
2096 |
check disable |
|
2097 |
]. |
|
2098 |
check enableChannel:httpServerRunning. |
|
2099 |
||
2100 |
check := box addCheckBox:(resources string:'Soap enabled') on:soapEnabled. |
|
2101 |
hasHTTPServer ifFalse:[ |
|
2102 |
check disable |
|
2103 |
]. |
|
2104 |
check enableChannel:httpServerRunning. |
|
2105 |
||
2106 |
box leftIndent:0. |
|
2107 |
box addHorizontalLine. |
|
2108 |
||
2109 |
box addTextLabel:(resources string:'OSI Protocols (addOn package)'). |
|
2110 |
||
2111 |
y := box yPosition. |
|
2112 |
check := box addCheckBox:(resources string:'Log %1 Errors' with:'ACSE') on:osiACSEErrorLogging. |
|
2113 |
check width:0.33. |
|
2114 |
osiACSEPresent ifFalse:[ |
|
2115 |
check disable |
|
2116 |
]. |
|
2117 |
||
2118 |
box yPosition:y. |
|
2119 |
check := box addCheckBox:(resources string:'Connections') on:osiACSEConnectionLogging. |
|
2120 |
osiACSEPresent ifFalse:[ |
|
2121 |
check disable |
|
2122 |
]. |
|
2123 |
check left:0.33; width:0.33. |
|
2124 |
||
2125 |
box yPosition:y. |
|
2126 |
check := box addCheckBox:(resources string:'Data Xfer') on:osiACSEDataLogging. |
|
2127 |
osiACSEPresent ifFalse:[ |
|
2128 |
check disable |
|
2129 |
]. |
|
2130 |
check left:0.66; width:0.34. |
|
2131 |
||
2132 |
||
2133 |
box addVerticalSpace. |
|
2134 |
||
2135 |
y := box yPosition. |
|
2136 |
check := box addCheckBox:(resources string:'Log %1 Errors' with:'ROSE') on:osiROSEErrorLogging. |
|
2137 |
osiROSEPresent ifFalse:[ |
|
2138 |
check disable |
|
2139 |
]. |
|
2140 |
check width:0.33. |
|
2141 |
||
2142 |
box yPosition:y. |
|
2143 |
check := box addCheckBox:(resources string:'Invoactions') on:osiROSEInvokationLogging. |
|
2144 |
osiROSEPresent ifFalse:[ |
|
2145 |
check disable |
|
2146 |
]. |
|
2147 |
check left:0.33; width:0.33. |
|
2148 |
||
2149 |
box yPosition:y. |
|
2150 |
check := box addCheckBox:(resources string:'Responses') on:osiROSEResponseLogging. |
|
2151 |
osiROSEPresent ifFalse:[ |
|
2152 |
check disable |
|
2153 |
]. |
|
2154 |
check left:0.66; width:0.34. |
|
2155 |
||
2156 |
box addVerticalSpace. |
|
2157 |
||
2158 |
y := box yPosition. |
|
2159 |
check := box addCheckBox:(resources string:'Log %1 Errors' with:'CMISE') on:osiCMISEErrorLogging. |
|
2160 |
osiCMISEPresent ifFalse:[ |
|
2161 |
check disable |
|
2162 |
]. |
|
2163 |
check width:0.33. |
|
2164 |
||
2165 |
box yPosition:y. |
|
2166 |
check := box addCheckBox:(resources string:'Messages') on:osiCMISEMessageLogging. |
|
2167 |
osiCMISEPresent ifFalse:[ |
|
2168 |
check disable |
|
2169 |
]. |
|
2170 |
check left:0.33; width:0.33. |
|
2171 |
||
2172 |
||
2173 |
box addHorizontalLine. |
|
2174 |
box |
|
2175 |
addHelpButtonFor:'Launcher/communicationsSettings.html'; |
|
2176 |
addAbortAndOkButtons. |
|
2177 |
||
2178 |
"/ |
|
2179 |
"/ show the box ... |
|
2180 |
"/ |
|
2181 |
box open. |
|
2182 |
||
2183 |
"/ |
|
2184 |
"/ update system settings |
|
2185 |
"/ |
|
2186 |
box accepted ifTrue:[ |
|
2187 |
acceptChannel value:false; value:true. |
|
2188 |
||
2189 |
hasRemoteBrowsingSupport ifTrue:[ |
|
2190 |
remoteBrowsingEnabled := remoteBrowsingEnabled value. |
|
2191 |
(remoteBrowsingEnabled ~~ org_remoteBrowsingEnabled) ifTrue:[ |
|
2192 |
remoteBrowsingEnabled ~~ SmalltalkShareServer serverRunning ifTrue:[ |
|
2193 |
remoteBrowsingEnabled ifFalse:[ |
|
2194 |
SmalltalkShareServer killAll |
|
2195 |
] ifTrue:[ |
|
2196 |
SmalltalkShareServer start. |
|
2197 |
"/ must wait a bit; give it a chance to |
|
2198 |
"/ really start (before checking) |
|
2199 |
Delay waitForSeconds:0.5. |
|
2200 |
SmalltalkShareServer serverRunning ifFalse:[ |
|
2201 |
self warn:'SmalltalkShareServer startup failed (see stderr).' |
|
2202 |
] |
|
2203 |
] |
|
2204 |
]. |
|
2205 |
] |
|
2206 |
]. |
|
2207 |
||
2208 |
hasWindowMigrationServer ifTrue:[ |
|
2209 |
windowMigrationEnabled := windowMigrationEnabled value. |
|
2210 |
windowMigrationAuthenticate := windowMigrationAuthenticate value. |
|
2211 |
windowMigrationPassword := windowMigrationPassword value. |
|
2212 |
(windowMigrationEnabled ~~ org_windowMigrationEnabled |
|
2213 |
or:[windowMigrationAuthenticate ~~ org_windowMigrationAuthenticate |
|
2214 |
or:[windowMigrationPassword ~~ org_windowMigrationPassword]]) ifTrue:[ |
|
2215 |
windowMigrationAuthenticate ~~ org_windowMigrationAuthenticate ifTrue:[ |
|
2216 |
windowMigrationAuthenticate ifFalse:[ |
|
2217 |
WindowMigrationServer password:nil |
|
2218 |
] ifTrue:[ |
|
2219 |
WindowMigrationServer password:windowMigrationPassword |
|
2220 |
]. |
|
2221 |
]. |
|
2222 |
windowMigrationEnabled ~~ WindowMigrationServer serverRunning ifTrue:[ |
|
2223 |
windowMigrationEnabled ifFalse:[ |
|
2224 |
WindowMigrationServer stop |
|
2225 |
] ifTrue:[ |
|
2226 |
WindowMigrationServer start. |
|
2227 |
"/ must wait a bit; give it a chance to |
|
2228 |
"/ really start (before checking) |
|
2229 |
Delay waitForSeconds:0.5. |
|
2230 |
WindowMigrationServer serverRunning ifFalse:[ |
|
2231 |
self warn:'WindowMigrationServer startup failed (see stderr).' |
|
2232 |
] |
|
2233 |
] |
|
2234 |
]. |
|
2235 |
] |
|
2236 |
]. |
|
2237 |
||
2238 |
hasRDoitServer ifTrue:[ |
|
2239 |
(rDoitLogging value ~~ org_rDoitLogging |
|
2240 |
or:[rDoitErrorDebugging value ~~ org_rDoitErrorDebugging |
|
2241 |
or:[rDoitErrorLogging value ~~ org_rDoitErrorLogging |
|
2242 |
or:[rDoitsEnabled value ~~ org_rDoitsEnabled |
|
2243 |
or:[rDoitServerPort value ~~ org_rDoitServerPort]]]]) ifTrue:[ |
|
2244 |
RDoItServer autoload. |
|
2245 |
RDoItServer defaultPortNumber:rDoitServerPort value. |
|
2246 |
RDoItServer logging:(rDoitLogging value). |
|
2247 |
RDoItServer errorLogging:(rDoitErrorLogging value). |
|
2248 |
RDoItServer errorCatching:(rDoitErrorDebugging value not). |
|
2249 |
rDoitsEnabled := rDoitsEnabled value. |
|
2250 |
rDoitsEnabled ~~ RDoItServer serverRunning ifTrue:[ |
|
2251 |
rDoitsEnabled ifFalse:[ |
|
2252 |
RDoItServer stop |
|
2253 |
] ifTrue:[ |
|
2254 |
RDoItServer start. |
|
2255 |
"/ must wait a bit; give it a chance to |
|
2256 |
"/ really start (before checking) |
|
2257 |
Delay waitForSeconds:0.5. |
|
2258 |
RDoItServer serverRunning ifFalse:[ |
|
2259 |
self warn:'RDoit startup failed (see stderr).' |
|
2260 |
] |
|
2261 |
] |
|
2262 |
]. |
|
2263 |
]. |
|
2264 |
]. |
|
2265 |
||
2266 |
(hasHTTPServer and:[HTTPServer isLoaded]) ifTrue:[ |
|
2267 |
httpServerPort := httpServerPort value. |
|
2268 |
org_httpServerPort ~= httpServerPort ifTrue:[ |
|
2269 |
HTTPServer defaultPort:httpServerPort. |
|
2270 |
]. |
|
2271 |
||
2272 |
httpServerFileRoot := httpServerFileRoot value. |
|
2273 |
httpServerFileRoot size == 0 ifTrue:[ |
|
2274 |
httpServerFileRoot := nil |
|
2275 |
]. |
|
2276 |
org_httpServerFileRoot ~= httpServerFileRoot ifTrue:[ |
|
2277 |
HTTPServer fileRoot:httpServerFileRoot. |
|
2278 |
]. |
|
2279 |
||
2280 |
httpServerLogFile := httpServerLogFile value. |
|
2281 |
httpServerLogFile size == 0 ifTrue:[ |
|
2282 |
httpServerLogFile := nil |
|
2283 |
]. |
|
2284 |
org_httpServerLogFile ~= httpServerLogFile ifTrue:[ |
|
2285 |
HTTPServer defaultLogFile:httpServerLogFile. |
|
2286 |
]. |
|
2287 |
||
2288 |
httpServerHomeURL := httpServerHomeURL value. |
|
2289 |
httpServerHomeURL size == 0 ifTrue:[ |
|
2290 |
httpServerHomeURL := nil |
|
2291 |
]. |
|
2292 |
org_httpServerHomeURL ~= httpServerHomeURL ifTrue:[ |
|
2293 |
HTTPServer homeURL:httpServerHomeURL. |
|
2294 |
]. |
|
2295 |
||
2296 |
httpServerRunning value ~~ org_httpServerRunning ifTrue:[ |
|
2297 |
httpServerRunning value ifTrue:[ |
|
2298 |
HTTPServer startServer |
|
2299 |
] ifFalse:[ |
|
2300 |
HTTPServer stopServer |
|
2301 |
] |
|
2302 |
]. |
|
2303 |
]. |
|
2304 |
||
2305 |
hasSwiki ifTrue:[ |
|
2306 |
swikiRoot := swikiRoot value. |
|
2307 |
swikiRoot size == 0 ifTrue:[ |
|
2308 |
swikiRoot := nil |
|
2309 |
]. |
|
2310 |
org_swikiRoot ~= swikiRoot ifTrue:[ |
|
2311 |
PWS::ServerAction serverDirectory:swikiRoot. |
|
2312 |
]. |
|
2313 |
||
2314 |
swikiEnabled value ~~ org_swikiEnabled ifTrue:[ |
|
2315 |
swikiEnabled value ifTrue:[ |
|
2316 |
HTTPServer setupMySwiki |
|
2317 |
] ifFalse:[ |
|
2318 |
HTTPServer disableMySwiki |
|
2319 |
] |
|
2320 |
]. |
|
2321 |
allowEmbedded value ~~ org_allowEmbedded ifTrue:[ |
|
2322 |
HTTPServer enableEmbeddedSmalltalk:allowEmbedded value |
|
2323 |
]. |
|
2324 |
]. |
|
2325 |
hasSoap ifTrue:[ |
|
2326 |
soapEnabled value ~~ org_soapEnabled ifTrue:[ |
|
2327 |
soapEnabled value ifTrue:[ |
|
2328 |
HTTPServer setupSoap |
|
2329 |
] ifFalse:[ |
|
2330 |
HTTPServer disableSoap |
|
2331 |
] |
|
2332 |
]. |
|
2333 |
]. |
|
2334 |
||
2335 |
osiACSEPresent ifTrue:[ |
|
2336 |
OSI::ACSE errorLogging:osiACSEErrorLogging value. |
|
2337 |
OSI::ACSE connectionLogging:osiACSEConnectionLogging value. |
|
2338 |
OSI::ACSE dataLogging:osiACSEDataLogging value. |
|
2339 |
]. |
|
2340 |
osiROSEPresent ifTrue:[ |
|
2341 |
OSI::ROSE errorLogging:osiROSEErrorLogging value. |
|
2342 |
OSI::ROSE invocationLogging:osiROSEInvokationLogging value. |
|
2343 |
OSI::ROSE responseLogging:osiROSEResponseLogging value. |
|
2344 |
]. |
|
2345 |
osiCMISEPresent ifTrue:[ |
|
2346 |
OSI::CMISE errorLogging:osiCMISEErrorLogging value. |
|
2347 |
OSI::CMISE messageLogging:osiCMISEMessageLogging value. |
|
2348 |
]. |
|
2349 |
]. |
|
2350 |
box destroy |
|
2351 |
||
2352 |
"Modified: / 28.6.1999 / 15:44:35 / stefan" |
|
2353 |
"Modified: / 20.1.2000 / 19:14:18 / cg" |
|
2354 |
! |
|
2355 |
||
2356 |
compilerSettings |
|
2357 |
"open a dialog on compiler related settings" |
|
2358 |
||
2359 |
|box warnings warnSTX warnUnderscore warnDollar warnOldStyle warnUnusedVars |
|
2360 |
allowDollar allowUnderscore allowSqueakExtensions allowQualifiedNames |
|
2361 |
allowDolphinExtensions allowOldStyleAssignment allowReservedWordsAsSelectors |
|
2362 |
immutableArrays |
|
2363 |
warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox |
|
2364 |
warnCompatibility warnCompatibilityBox warnDollarBox warnUnusedVarsBox |
|
2365 |
stcCompilation compilationList stcCompilationOptions |
|
2366 |
historyLines fullHistoryUpdate |
|
2367 |
catchMethodRedefs catchClassRedefs keepSourceOptions keepSource |
|
2368 |
constantFoldingOptions constantFolding justInTimeCompilation |
|
2369 |
warnEnabler check component oldIndent supportsJustInTimeCompilation y |
|
2370 |
y2 fullDebugSupport yMax |
|
2371 |
compileLazy loadBinaries canLoadBinaries strings idx thisIsADemoVersion |
|
2372 |
resources stcSetupButt| |
|
2373 |
||
2374 |
resources := self owningClass classResources. |
|
2375 |
||
2376 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
2377 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
2378 |
compileLazy := Autoload compileLazy asValue. |
|
2379 |
||
2380 |
warnings := Compiler warnings asValue. |
|
2381 |
||
2382 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
2383 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
2384 |
warnDollar := Compiler warnDollarInIdentifier asValue. |
|
2385 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
2386 |
warnCommonMistakes := Compiler warnCommonMistakes asValue. |
|
2387 |
warnCompatibility := Compiler warnPossibleIncompatibilities asValue. |
|
2388 |
warnUnusedVars := Compiler warnUnusedVars asValue. |
|
2389 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
|
2390 |
allowDollar := Compiler allowDollarInIdentifier asValue. |
|
2391 |
allowSqueakExtensions := Compiler allowSqueakExtensions asValue. |
|
2392 |
allowDolphinExtensions := Compiler allowDolphinExtensions asValue. |
|
2393 |
allowQualifiedNames := Compiler allowQualifiedNames asValue. |
|
2394 |
allowOldStyleAssignment := Compiler allowOldStyleAssignment asValue. |
|
2395 |
allowReservedWordsAsSelectors := Compiler allowReservedWordsAsSelectors asValue. |
|
2396 |
immutableArrays := Compiler arraysAreImmutable asValue. |
|
2397 |
||
2398 |
constantFoldingOptions := #( nil #level1 #level2 #full ). |
|
2399 |
constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')). |
|
2400 |
constantFolding selectionIndex:3. |
|
2401 |
||
2402 |
thisIsADemoVersion := (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn'). |
|
2403 |
thisIsADemoVersion ifTrue:[ |
|
2404 |
stcCompilationOptions := #( never). |
|
2405 |
strings := #('never'). |
|
2406 |
idx := 1. |
|
2407 |
] ifFalse:[ |
|
2408 |
stcCompilationOptions := #( always default never). |
|
2409 |
strings := #('always' 'primitive code only' 'never'). |
|
2410 |
idx := 2. |
|
2411 |
]. |
|
2412 |
||
2413 |
stcCompilation := SelectionInList new list:(resources array:strings). |
|
2414 |
stcCompilation selectionIndex:idx. |
|
2415 |
||
2416 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) |
|
2417 |
ifTrue:[ |
|
2418 |
justInTimeCompilation := ObjectMemory justInTimeCompilation. |
|
2419 |
fullDebugSupport := ObjectMemory fullSingleStepSupport. |
|
2420 |
] ifFalse:[ |
|
2421 |
justInTimeCompilation := false. |
|
2422 |
fullDebugSupport := (Compiler lineNumberInfo == #full) asValue. |
|
2423 |
]. |
|
2424 |
justInTimeCompilation := justInTimeCompilation asValue. |
|
2425 |
fullDebugSupport := fullDebugSupport asValue. |
|
2426 |
||
2427 |
catchMethodRedefs := Class catchMethodRedefinitions asValue. |
|
2428 |
catchClassRedefs := Class catchClassRedefinitions asValue. |
|
2429 |
historyLines := HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]]. |
|
2430 |
historyLines ifFalse:[ |
|
2431 |
fullHistoryUpdate := false asValue |
|
2432 |
] ifTrue:[ |
|
2433 |
fullHistoryUpdate := HistoryManager fullHistoryUpdate asValue. |
|
2434 |
]. |
|
2435 |
historyLines := historyLines asValue. |
|
2436 |
||
2437 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
|
2438 |
keepSource := SelectionInList new |
|
2439 |
list:(resources array:#('Keep as String' 'Reference to Filename' 'Reference to Full Path' 'Append and Ref in `st.src''' 'Discard' )). |
|
2440 |
keepSource selectionIndex:1. |
|
2441 |
||
2442 |
warnEnabler := [ |
|
2443 |
warnings value ifTrue:[ |
|
2444 |
warnSTXBox enable. |
|
2445 |
warnOldStyleBox enable. |
|
2446 |
warnCommonMistakesBox enable. |
|
2447 |
warnCompatibilityBox enable. |
|
2448 |
warnUnusedVarsBox enable. |
|
2449 |
allowUnderscore value ifTrue:[ |
|
2450 |
warnUnderscoreBox enable. |
|
2451 |
] ifFalse:[ |
|
2452 |
warnUnderscoreBox disable. |
|
2453 |
]. |
|
2454 |
allowDollar value ifTrue:[ |
|
2455 |
warnDollarBox enable. |
|
2456 |
] ifFalse:[ |
|
2457 |
warnDollarBox disable. |
|
2458 |
]. |
|
2459 |
] ifFalse:[ |
|
2460 |
warnSTXBox disable. |
|
2461 |
warnUnderscoreBox disable. |
|
2462 |
warnDollarBox disable. |
|
2463 |
warnOldStyleBox disable. |
|
2464 |
warnCommonMistakesBox disable. |
|
2465 |
warnCompatibilityBox disable. |
|
2466 |
warnUnusedVarsBox disable. |
|
2467 |
]]. |
|
2468 |
||
2469 |
warnings onChangeEvaluate:warnEnabler. |
|
2470 |
allowUnderscore onChangeEvaluate:warnEnabler. |
|
2471 |
allowDollar onChangeEvaluate:warnEnabler. |
|
2472 |
"/ allowSqueakExtensions onChangeEvaluate:warnEnabler. |
|
2473 |
"/ allowQualifiedNames onChangeEvaluate:warnEnabler. |
|
2474 |
||
2475 |
box := DialogBox new. |
|
2476 |
box label:(resources string:'Compiler Settings'). |
|
2477 |
||
2478 |
y := box yPosition. |
|
2479 |
check := box addCheckBox:(resources string:'Catch Method Redefinitions') on:catchMethodRedefs. |
|
2480 |
check width:0.5. |
|
2481 |
||
2482 |
box yPosition:y. |
|
2483 |
check := box addCheckBox:(resources string:'Catch Class Redefinitions') on:catchClassRedefs. |
|
2484 |
check left:0.5; width:0.5. |
|
2485 |
||
2486 |
y := box yPosition. |
|
2487 |
check := box addCheckBox:(resources string:'Keep History Line in Methods') on:historyLines. |
|
2488 |
check width:0.5. |
|
2489 |
HistoryManager isNil ifTrue:[check disable]. |
|
2490 |
box yPosition:y. |
|
2491 |
check := box addCheckBox:(resources string:'Keep Full Class History') on:fullHistoryUpdate. |
|
2492 |
check left:0.5; width:0.5. |
|
2493 |
HistoryManager isNil ifTrue:[check disable] ifFalse:[check enableChannel:historyLines]. |
|
2494 |
||
2495 |
box addPopUpList:(resources string:'FileIn Source Mode:') on:keepSource. |
|
2496 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
|
2497 |
||
2498 |
box addHorizontalLine. |
|
2499 |
||
2500 |
box addCheckBox:(resources string:'Lazy Compilation when Autoloading') on:compileLazy. |
|
2501 |
check := box addCheckBox:(resources string:'If Present, Load Binary Objects when Autoloading') on:loadBinaries. |
|
2502 |
canLoadBinaries ifFalse:[ |
|
2503 |
loadBinaries value:false. |
|
2504 |
check disable |
|
2505 |
]. |
|
2506 |
supportsJustInTimeCompilation ifTrue:[ |
|
2507 |
component := box |
|
2508 |
addCheckBox:(resources string:'Just in Time Compilation to Machine Code') |
|
2509 |
on:justInTimeCompilation. |
|
2510 |
]. |
|
2511 |
||
2512 |
box addHorizontalLine. |
|
2513 |
||
2514 |
ObjectFileLoader notNil ifTrue:[ |
|
2515 |
compilationList := box addPopUpList:(resources string:'Stc Compilation to Machine Code') on:stcCompilation. |
|
2516 |
||
2517 |
thisIsADemoVersion ifFalse:[ |
|
2518 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
|
2519 |
||
2520 |
stcSetupButt := box addComponent:(Button label:(resources string:'Stc Compilation Parameters...') |
|
2521 |
action:[|manager| |
|
2522 |
||
2523 |
self stcCompilerSettings. |
|
2524 |
]). |
|
2525 |
]. |
|
2526 |
||
2527 |
box addHorizontalLine. |
|
2528 |
||
2529 |
"/ if there is no compiler around, |
|
2530 |
"/ change to compile nothing, and disable the checkBoxes |
|
2531 |
Compiler canCreateMachineCode ifFalse:[ |
|
2532 |
stcCompilation selectionIndex:(3 min:stcCompilationOptions size). |
|
2533 |
compilationList disable. |
|
2534 |
]. |
|
2535 |
]. |
|
2536 |
||
2537 |
y := box yPosition. |
|
2538 |
||
2539 |
component := box addCheckBox:(resources string:'Allow Underscore in Identifiers') on:allowUnderscore. |
|
2540 |
component width:0.4. |
|
2541 |
||
2542 |
component := box addCheckBox:(resources string:'Allow Dollar in Identifiers') on:allowDollar. |
|
2543 |
component width:0.4. |
|
2544 |
||
2545 |
component := box addCheckBox:(resources string:'Allow VW3 QualifiedNames') on:allowQualifiedNames. |
|
2546 |
component width:0.4. |
|
2547 |
||
2548 |
component := box addCheckBox:(resources string:'Allow Squeak Extensions') on:allowSqueakExtensions. |
|
2549 |
component width:0.4. |
|
2550 |
||
2551 |
component := box addCheckBox:(resources string:'Allow Dolphin Extensions') on:allowDolphinExtensions. |
|
2552 |
component width:0.4. |
|
2553 |
||
2554 |
y2 := box yPosition. |
|
2555 |
||
2556 |
box yPosition:y. |
|
2557 |
box leftIndent:0. |
|
2558 |
||
2559 |
component :=box addPopUpList:(resources string:'Constant Folding:') on:constantFolding. |
|
2560 |
component superView left:0.5; width:0.5. |
|
2561 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
|
2562 |
||
2563 |
component := box addCheckBox:(resources string:'Allow OldStyle Assignment (_)') on:allowOldStyleAssignment. |
|
2564 |
component left:0.5; width:0.4. |
|
2565 |
||
2566 |
component := box addCheckBox:(resources string:'Allow Reserved Words as Selector (self)') on:allowReservedWordsAsSelectors. |
|
2567 |
component left:0.5; width:0.4. |
|
2568 |
||
2569 |
component := box addCheckBox:(resources string:'Full Debug Info') on:fullDebugSupport. |
|
2570 |
component left:0.5; width:0.4. |
|
2571 |
||
2572 |
component := box addCheckBox:(resources string:'Literal Arrays are Immutable') on:immutableArrays. |
|
2573 |
component left:0.5; width:0.4. |
|
2574 |
||
2575 |
box yPosition:(box yPosition max:y2). |
|
2576 |
||
2577 |
||
2578 |
box addHorizontalLine. |
|
2579 |
||
2580 |
box addCheckBox:(resources string:'Warnings') on:warnings. |
|
2581 |
"/ box addVerticalSpace. |
|
2582 |
oldIndent := box leftIndent. |
|
2583 |
box leftIndent:30. |
|
2584 |
||
2585 |
y := box yPosition. |
|
2586 |
||
2587 |
warnSTXBox := box addCheckBox:(resources string:'ST/X Extensions') on:warnSTX. |
|
2588 |
warnSTXBox width:0.4. |
|
2589 |
||
2590 |
warnUnderscoreBox := box addCheckBox:(resources string:'Underscores in Identifiers') on:warnUnderscore. |
|
2591 |
warnUnderscoreBox width:0.4. |
|
2592 |
||
2593 |
warnDollarBox := box addCheckBox:(resources string:'Dollars in Identifiers') on:warnDollar. |
|
2594 |
warnDollarBox width:0.4. |
|
2595 |
||
2596 |
warnUnusedVarsBox := box addCheckBox:(resources string:'Unused Method Variables') on:warnUnusedVars. |
|
2597 |
warnUnusedVarsBox width:0.4. |
|
2598 |
||
2599 |
yMax := box yPosition. |
|
2600 |
||
2601 |
box yPosition:y. |
|
2602 |
box leftIndent:0. |
|
2603 |
warnOldStyleBox := box addCheckBox:(resources string:'OldStyle Assignment') on:warnOldStyle. |
|
2604 |
warnOldStyleBox left:0.5; width:0.4. |
|
2605 |
||
2606 |
warnCommonMistakesBox := box addCheckBox:(resources string:'Common Mistakes') on:warnCommonMistakes. |
|
2607 |
warnCommonMistakesBox left:0.5; width:0.4. |
|
2608 |
||
2609 |
warnCompatibilityBox := box addCheckBox:(resources string:'Possible Incompatibilities') on:warnCompatibility. |
|
2610 |
warnCompatibilityBox left:0.5; width:0.4. |
|
2611 |
||
2612 |
box leftIndent:oldIndent. |
|
2613 |
box yPosition:(yMax max: box yPosition). |
|
2614 |
||
2615 |
box addHorizontalLine. |
|
2616 |
box |
|
2617 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
|
2618 |
addAbortAndOkButtons. |
|
2619 |
||
2620 |
warnEnabler value. |
|
2621 |
box open. |
|
2622 |
||
2623 |
box accepted ifTrue:[ |
|
2624 |
HistoryManager notNil ifTrue:[ |
|
2625 |
HistoryManager fullHistoryUpdate:fullHistoryUpdate value. |
|
2626 |
historyLines value ifTrue:[ |
|
2627 |
HistoryManager activate |
|
2628 |
] ifFalse:[ |
|
2629 |
HistoryManager deactivate |
|
2630 |
]. |
|
2631 |
]. |
|
2632 |
Class catchMethodRedefinitions:catchMethodRedefs value. |
|
2633 |
Class catchClassRedefinitions:catchClassRedefs value. |
|
2634 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
|
2635 |
Compiler warnings:warnings value. |
|
2636 |
Compiler warnSTXSpecials:warnSTX value. |
|
2637 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
|
2638 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
|
2639 |
Compiler warnDollarInIdentifier:warnDollar value. |
|
2640 |
Compiler warnCommonMistakes:warnCommonMistakes value. |
|
2641 |
Compiler warnPossibleIncompatibilities:warnCompatibility value. |
|
2642 |
Compiler warnUnusedVars:warnUnusedVars value. |
|
2643 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
|
2644 |
Compiler allowDollarInIdentifier:allowDollar value. |
|
2645 |
Compiler allowSqueakExtensions:allowSqueakExtensions value. |
|
2646 |
Compiler allowDolphinExtensions:allowDolphinExtensions value. |
|
2647 |
Compiler allowQualifiedNames:allowQualifiedNames value. |
|
2648 |
Compiler allowOldStyleAssignment:allowOldStyleAssignment value. |
|
2649 |
Compiler allowReservedWordsAsSelectors:allowReservedWordsAsSelectors value. |
|
2650 |
||
2651 |
Compiler arraysAreImmutable:immutableArrays value. |
|
2652 |
fullDebugSupport value ifTrue:[ |
|
2653 |
Compiler lineNumberInfo:#full. |
|
2654 |
] ifFalse:[ |
|
2655 |
Compiler lineNumberInfo:true |
|
2656 |
]. |
|
2657 |
||
2658 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
|
2659 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
|
2660 |
||
2661 |
supportsJustInTimeCompilation ifTrue:[ |
|
2662 |
justInTimeCompilation := justInTimeCompilation value. |
|
2663 |
justInTimeCompilation ifTrue:[ |
|
2664 |
Method allInstancesDo:[:m | m checked:false]. |
|
2665 |
]. |
|
2666 |
ObjectMemory justInTimeCompilation:justInTimeCompilation. |
|
2667 |
ObjectMemory fullSingleStepSupport:fullDebugSupport value. |
|
2668 |
]. |
|
2669 |
Autoload compileLazy:compileLazy value. |
|
2670 |
Smalltalk loadBinaries:loadBinaries value. |
|
2671 |
]. |
|
2672 |
box destroy |
|
2673 |
||
2674 |
"Modified: / 10.9.1995 / 19:19:18 / claus" |
|
2675 |
"Modified: / 9.9.1996 / 22:42:47 / stefan" |
|
2676 |
"Modified: / 5.11.1998 / 14:25:59 / cg" |
|
2677 |
! |
|
2678 |
||
2679 |
displaySettings |
|
2680 |
"open a dialog on display related settings" |
|
2681 |
||
2682 |
|box listOfSizes sizeInfos |
|
2683 |
sizes sizeNames sizeList sizeX sizeY deepIcons |
|
2684 |
isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList |
|
2685 |
y component screen visual clipEncodings clipEncodingSyms clipEncodingList resources |
|
2686 |
| |
|
2687 |
||
2688 |
resources := self owningClass classResources. |
|
2689 |
||
2690 |
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default. |
|
2691 |
listOfSizes == #default ifTrue:[ |
|
2692 |
"/ nothing in resource file; offer at least some. |
|
2693 |
sizeInfos := #( |
|
2694 |
( '11.3'' (235mm x 175mm) LCD' (235 175) ) |
|
2695 |
( '17'' (325mm x 245mm)' (325 245) ) |
|
2696 |
( '19'' (340mm x 270mm)' (340 270) ) |
|
2697 |
( '20'' (350mm x 280mm)' (350 280) ) |
|
2698 |
( '21'' (365mm x 285mm)' (365 285) ) |
|
2699 |
). |
|
2700 |
] ifFalse:[ |
|
2701 |
sizeInfos := resources array:listOfSizes. |
|
2702 |
]. |
|
2703 |
sizeNames := sizeInfos collect:[:entry | entry at:1]. |
|
2704 |
sizes := sizeInfos collect:[:entry | entry at:2]. |
|
2705 |
||
2706 |
screen := Screen current. |
|
2707 |
visual := screen visualType. |
|
2708 |
||
2709 |
isColorMonitor := screen hasColors asValue. |
|
2710 |
deepIcons := screen supportsDeepIcons asValue. |
|
2711 |
useFixPalette := screen fixColors notNil asValue. |
|
2712 |
useFixGrayPalette := screen fixGrayColors notNil asValue. |
|
2713 |
||
2714 |
sizeList := SelectionInList with:sizeNames. |
|
2715 |
sizeX := screen widthInMillimeter asValue. |
|
2716 |
sizeY := screen heightInMillimeter asValue. |
|
2717 |
||
2718 |
clipEncodingSyms := #(nil #iso8859 #jis #jis7 #sjis #euc #big5). |
|
2719 |
clipEncodings := resources array:#('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5'). |
|
2720 |
clipEncodingList := SelectionInList new. |
|
2721 |
clipEncodingList list:clipEncodings. |
|
2722 |
clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1). |
|
2723 |
||
2724 |
ditherList := SelectionInList new. |
|
2725 |
||
2726 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[ |
|
2727 |
ditherStyles := #('threshold' 'ordered dither' 'error diffusion'). |
|
2728 |
ditherSyms := #(threshold ordered floydSteinberg). |
|
2729 |
] ifFalse:[ |
|
2730 |
visual ~~ #TrueColor ifTrue:[ |
|
2731 |
ditherStyles := #('nearest color' 'error diffusion'). |
|
2732 |
ditherSyms := #(ordered floydSteinberg). |
|
2733 |
] |
|
2734 |
]. |
|
2735 |
ditherSyms notNil ifTrue:[ |
|
2736 |
ditherList list:ditherStyles. |
|
2737 |
ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold). |
|
2738 |
]. |
|
2739 |
||
2740 |
box := DialogBox new. |
|
2741 |
box label:(resources string:'Display Screen Settings'). |
|
2742 |
||
2743 |
(box addTextLabel:(resources string:'Actual Visible Screen Area:')) |
|
2744 |
adjust:#left. |
|
2745 |
||
2746 |
(box addPopUpList:(resources string:'Common Sizes:') on:sizeList) |
|
2747 |
label:'monitor size'. |
|
2748 |
||
2749 |
idx := sizes findFirst:[:entry | |
|
2750 |
((entry at:1) = sizeX value) |
|
2751 |
and:[((entry at:2) = sizeY value)] |
|
2752 |
]. |
|
2753 |
idx ~~ 0 ifTrue:[ |
|
2754 |
sizeList selectionIndex:idx |
|
2755 |
]. |
|
2756 |
||
2757 |
sizeList onChangeEvaluate:[ |
|
2758 |
|idx| |
|
2759 |
||
2760 |
idx := sizeList selectionIndex. |
|
2761 |
sizeX value:((sizes at:idx) at:1). |
|
2762 |
sizeY value:((sizes at:idx) at:2). |
|
2763 |
]. |
|
2764 |
||
2765 |
y := box yPosition. |
|
2766 |
component := box addTextLabel:(resources string:'Screen Size:'). |
|
2767 |
component width:0.3; adjust:#right; borderWidth:0. |
|
2768 |
||
2769 |
box yPosition:y. |
|
2770 |
component := box addInputFieldOn:nil tabable:true. |
|
2771 |
component width:0.25; left:0.3; |
|
2772 |
immediateAccept:false; acceptOnLeave:false; |
|
2773 |
cursorMovementWhenUpdating:#beginOfLine; |
|
2774 |
converter:(PrintConverter new initForInteger); |
|
2775 |
model:sizeX. |
|
2776 |
||
2777 |
box yPosition:y. |
|
2778 |
component := box addTextLabel:(' x '). |
|
2779 |
component width:0.1; left:0.55; adjust:#center; borderWidth:0. |
|
2780 |
||
2781 |
box yPosition:y. |
|
2782 |
component := box addInputFieldOn:nil tabable:true. |
|
2783 |
component width:0.25; left:0.65; |
|
2784 |
immediateAccept:false; acceptOnLeave:false; |
|
2785 |
cursorMovementWhenUpdating:#beginOfLine; |
|
2786 |
converter:(PrintConverter new initForInteger); |
|
2787 |
model:sizeY. |
|
2788 |
||
2789 |
box yPosition:y. |
|
2790 |
component := box addTextLabel:('(mm)'). |
|
2791 |
component width:0.1; left:0.9; adjust:#center; borderWidth:0. |
|
2792 |
||
2793 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2794 |
||
2795 |
(box addTextLabel:(resources string:'Screen: Depth: %1 Visual: %2 (%3)' |
|
2796 |
with:screen depth printString |
|
2797 |
with:screen visualType |
|
2798 |
with:screen serverVendor)) |
|
2799 |
adjust:#left. |
|
2800 |
||
2801 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2802 |
||
2803 |
box addCheckBox:(resources string:'Color Monitor') on:isColorMonitor. |
|
2804 |
||
2805 |
visual == #PseudoColor ifTrue:[ |
|
2806 |
box addVerticalSpace. |
|
2807 |
component := box addCheckBox:(resources string:'Use Fix Color Palette %1' with:'(4x8x4)') on:useFixPalette. |
|
2808 |
||
2809 |
box addVerticalSpace. |
|
2810 |
component := box addCheckBox:(resources string:'Use Fix Gray Color Palette %1' with:'(32)') on:useFixGrayPalette. |
|
2811 |
]. |
|
2812 |
||
2813 |
ditherSyms notNil ifTrue:[ |
|
2814 |
box addVerticalSpace. |
|
2815 |
component := box addPopUpList:(resources string:'Image Display:') on:ditherList. |
|
2816 |
component defaultLabel:'image display'. |
|
2817 |
component superView horizontalLayout:#leftSpace. |
|
2818 |
]. |
|
2819 |
||
2820 |
box addVerticalSpace. |
|
2821 |
box addCheckBox:(resources string:'Allow Colored/Grayscale Icons') on:deepIcons. |
|
2822 |
||
2823 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2824 |
||
2825 |
component := box addPopUpList:(resources string:'ClipBoard Encoding:') on:clipEncodingList. |
|
2826 |
component superView horizontalLayout:#leftSpace. |
|
2827 |
||
2828 |
box addHorizontalLine. |
|
2829 |
box |
|
2830 |
addHelpButtonFor:'Launcher/screenSettings.html'; |
|
2831 |
addAbortAndOkButtons. |
|
2832 |
box open. |
|
2833 |
||
2834 |
box accepted ifTrue:[ |
|
2835 |
Image flushDeviceImages. |
|
2836 |
||
2837 |
screen visualType == #PseudoColor ifTrue:[ |
|
2838 |
useFixPalette value ifTrue:[ |
|
2839 |
Color colorAllocationFailSignal handle:[:ex | |
|
2840 |
self warn:'Could not allocate colors.'. |
|
2841 |
] do:[ |
|
2842 |
Color getColorsRed:4 green:8 blue:4 on:screen |
|
2843 |
] |
|
2844 |
] ifFalse:[ |
|
2845 |
screen releaseFixColors |
|
2846 |
]. |
|
2847 |
||
2848 |
useFixGrayPalette value ifTrue:[ |
|
2849 |
Color colorAllocationFailSignal handle:[:ex | |
|
2850 |
self warn:'Could not allocate colors.'. |
|
2851 |
] do:[ |
|
2852 |
Color getGrayColors:32 on:screen |
|
2853 |
] |
|
2854 |
] ifFalse:[ |
|
2855 |
screen releaseFixGrayColors |
|
2856 |
] |
|
2857 |
]. |
|
2858 |
screen hasColors:isColorMonitor value. |
|
2859 |
screen widthInMillimeter:sizeX value. |
|
2860 |
screen heightInMillimeter:sizeY value. |
|
2861 |
||
2862 |
screen supportsDeepIcons:deepIcons value. |
|
2863 |
ditherSyms notNil ifTrue:[ |
|
2864 |
Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex). |
|
2865 |
]. |
|
2866 |
||
2867 |
WindowGroup activeGroup withWaitCursorDo:[ |
|
2868 |
View defaultStyle:(View defaultStyle). |
|
2869 |
]. |
|
2870 |
||
2871 |
screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex). |
|
2872 |
]. |
|
2873 |
box destroy |
|
2874 |
||
2875 |
"Modified: / 9.9.1996 / 22:43:04 / stefan" |
|
2876 |
"Modified: / 20.5.1999 / 18:35:21 / cg" |
|
2877 |
! |
|
2878 |
||
2879 |
editSettings |
|
2880 |
"open a dialog on edit settings" |
|
2881 |
||
2882 |
|box st80EditingMode st80DoubleClickSelectMode resources |
|
2883 |
tabsIs4 prevTabsIs4 searchDialogIsModal startTextDragWithControl| |
|
2884 |
||
2885 |
resources := self owningClass classResources. |
|
2886 |
||
2887 |
"/ |
|
2888 |
"/ extract relevant system settings ... |
|
2889 |
"/ |
|
2890 |
st80EditingMode := UserPreferences current st80EditMode asValue. |
|
2891 |
st80DoubleClickSelectMode := TextView st80SelectMode asValue. |
|
2892 |
prevTabsIs4 := (ListView userDefaultTabPositions = ListView tab4Positions). |
|
2893 |
tabsIs4 := prevTabsIs4 asValue. |
|
2894 |
searchDialogIsModal := UserPreferences current searchDialogIsModal asValue. |
|
2895 |
startTextDragWithControl := UserPreferences current startTextDragWithControl asValue. |
|
2896 |
||
2897 |
"/ |
|
2898 |
"/ create a box on those values ... |
|
2899 |
"/ |
|
2900 |
box := DialogBox new. |
|
2901 |
box label:(resources string:'Edit settings'). |
|
2902 |
||
2903 |
box addCheckBox:(resources string:'Cursor has ST80 Line-end Behavior') on:st80EditingMode. |
|
2904 |
box addCheckBox:(resources string:'Double Click Select Behavior as in ST80') on:st80DoubleClickSelectMode. |
|
2905 |
box addCheckBox:(resources string:'Tab Stops in Multiples of 4') on:tabsIs4. |
|
2906 |
box addCheckBox:(resources string:'SearchBox is Modal') on:searchDialogIsModal. |
|
2907 |
box addCheckBox:(resources string:'CTRL-Key to Start TextDrag') on:startTextDragWithControl. |
|
2908 |
||
2909 |
box addHorizontalLine. |
|
2910 |
||
2911 |
box |
|
2912 |
addHelpButtonFor:'Launcher/editSettings.html'; |
|
2913 |
addAbortAndOkButtons. |
|
2914 |
||
2915 |
"/ |
|
2916 |
"/ show the box ... |
|
2917 |
"/ |
|
2918 |
box open. |
|
2919 |
||
2920 |
"/ |
|
2921 |
"/ update system settings |
|
2922 |
"/ |
|
2923 |
box accepted ifTrue:[ |
|
2924 |
UserPreferences current st80EditMode:(st80EditingMode value). |
|
2925 |
TextView st80SelectMode:(st80DoubleClickSelectMode value). |
|
2926 |
tabsIs4 value ~~ prevTabsIs4 ifTrue:[ |
|
2927 |
ListView userDefaultTabPositions:(tabsIs4 value ifTrue:[ListView tab4Positions] ifFalse:[ListView tab8Positions]). |
|
2928 |
ListView allSubInstancesDo:[:eachKindOfListView | |
|
2929 |
tabsIs4 value ifTrue:[eachKindOfListView setTab4] ifFalse:[eachKindOfListView setTab8] |
|
2930 |
]. |
|
2931 |
]. |
|
2932 |
UserPreferences current searchDialogIsModal:searchDialogIsModal value. |
|
2933 |
UserPreferences current startTextDragWithControl:startTextDragWithControl value. |
|
2934 |
]. |
|
2935 |
box destroy |
|
2936 |
||
2937 |
"Created: / 6.1.1999 / 14:12:09 / cg" |
|
2938 |
"Modified: / 6.1.1999 / 14:17:51 / cg" |
|
2939 |
! |
|
2940 |
||
2941 |
fontSettingsFor:requestor |
|
2942 |
"open a dialog on font related settings" |
|
2943 |
||
2944 |
(self fontBoxForEncoding:nil) ifTrue:[ |
|
2945 |
requestor reopenLauncher. |
|
3741
a9d08a1b0d7d
Fix save settings dialog when called with Filename arg
Stefan Vogel <sv@exept.de>
parents:
3738
diff
changeset
|
2946 |
] |
4244 | 2947 |
|
2948 |
"Created: 26.2.1996 / 22:52:51 / cg" |
|
2949 |
"Modified: 8.1.1997 / 14:52:49 / cg" |
|
2950 |
! |
|
2951 |
||
2952 |
javaSettings |
|
2953 |
"open a dialog on settings related to the java subsystem" |
|
2954 |
||
2955 |
|box audio javaHome classPath oldJavaHome oldClassPath resources component |
|
2956 |
extraFileSecurityChecks extraSocketSecurityChecks |
|
2957 |
supportsJustInTimeCompilation |
|
2958 |
javaJustInTimeCompilation javaNativeCodeOptimization |
|
2959 |
showJavaByteCode exceptionDebug nullPointerExceptionDebug pathSep| |
|
2960 |
||
2961 |
resources := self owningClass classResources. |
|
2962 |
||
2963 |
audio := JavaVM audioEnabled asValue. |
|
2964 |
extraFileSecurityChecks := JavaVM fileOpenConfirmation asValue. |
|
2965 |
extraSocketSecurityChecks := JavaVM socketConnectConfirmation asValue. |
|
2966 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) ifTrue:[ |
|
2967 |
javaJustInTimeCompilation := ObjectMemory javaJustInTimeCompilation asValue. |
|
2968 |
javaNativeCodeOptimization := ObjectMemory javaNativeCodeOptimization asValue. |
|
2969 |
] ifFalse:[ |
|
2970 |
javaJustInTimeCompilation := javaNativeCodeOptimization := false |
|
2971 |
]. |
|
2972 |
showJavaByteCode := JavaMethod forceByteCodeDisplay asValue. |
|
2973 |
exceptionDebug := JavaVM exceptionDebug asValue. |
|
2974 |
nullPointerExceptionDebug := JavaVM nullPointerExceptionDebug asValue. |
|
2975 |
||
2976 |
classPath := (Java classPath ? ''). |
|
2977 |
OperatingSystem isUNIXlike ifTrue:[ |
|
2978 |
pathSep := $;. |
|
2979 |
] ifFalse:[ |
|
2980 |
pathSep := $:. |
|
2981 |
]. |
|
2982 |
classPath := (classPath asStringWith:pathSep) asValue. |
|
2983 |
oldClassPath := classPath copy. |
|
2984 |
classPath := classPath asValue. |
|
2985 |
||
2986 |
javaHome := (Java javaHome ? ''). |
|
2987 |
oldJavaHome := javaHome copy. |
|
2988 |
javaHome := javaHome asValue. |
|
2989 |
||
2990 |
box := DialogBox new. |
|
2991 |
box label:(resources string:'Java'). |
|
2992 |
||
2993 |
box addCheckBox:(resources string:'Audio Enabled') on:audio. |
|
2994 |
box addCheckBox:(resources string:'Confirm file open for write') on:extraFileSecurityChecks. |
|
2995 |
box addCheckBox:(resources string:'Confirm socket connect') on:extraSocketSecurityChecks. |
|
2996 |
box addCheckBox:(resources string:'Debug Exceptions') on:exceptionDebug. |
|
2997 |
box addCheckBox:(resources string:'Debug Null Pointer Exceptions') on:nullPointerExceptionDebug. |
|
2998 |
box addHorizontalLine. |
|
2999 |
supportsJustInTimeCompilation ifTrue:[ |
|
3000 |
box |
|
3001 |
addCheckBox:(resources string:'java just in time compilation to machine code') |
|
3002 |
on:javaJustInTimeCompilation. |
|
3003 |
box |
|
3004 |
addCheckBox:(resources string:'optimize native code') |
|
3005 |
on:javaNativeCodeOptimization. |
|
3006 |
]. |
|
3007 |
box addHorizontalLine. |
|
3008 |
box addCheckBox:(resources string:'Display java byteCode (i.e. not source)') on:showJavaByteCode. |
|
3009 |
box addHorizontalLine. |
|
3010 |
component := box |
|
3011 |
addLabelledInputField:(resources string:'classPath:') |
|
3012 |
adjust:#right |
|
3013 |
on:classPath |
|
3014 |
tabable:true |
|
3015 |
separateAtX:0.3. |
|
3016 |
component acceptOnLeave:false. |
|
3017 |
component := box |
|
3018 |
addLabelledInputField:(resources string:'java home:') |
|
3019 |
adjust:#right |
|
3020 |
on:javaHome |
|
3021 |
tabable:true |
|
3022 |
separateAtX:0.3. |
|
3023 |
component acceptOnLeave:false. |
|
3024 |
||
3025 |
box addVerticalSpace. |
|
3026 |
box addComponent:(Button |
|
3027 |
label:(resources string:'Reinit VM now') |
|
3028 |
action:[ |
|
3029 |
box windowGroup withWaitCursorDo:[ |
|
3030 |
"/ Java classPath size == 0 ifTrue:[ |
|
3031 |
"/ Java initialize. |
|
3032 |
"/ ]. |
|
3033 |
"/ Java classPath size == 0 ifTrue:[ |
|
3034 |
"/ self warn:'No JDK found'. |
|
3035 |
"/ ] ifFalse:[ |
|
3036 |
JavaVM initializeVM |
|
3037 |
"/ ] |
|
3038 |
] |
|
3039 |
]). |
|
3040 |
||
3041 |
box addComponent:(Button |
|
3042 |
label:(resources string:'Remove all Java classes now') |
|
3043 |
action:[ |
|
3044 |
box windowGroup withWaitCursorDo:[ |
|
3045 |
Java flushAllJavaResources |
|
3046 |
] |
|
3047 |
]). |
|
3048 |
||
3049 |
"/ box addHorizontalLine. |
|
3050 |
||
3051 |
"/ box addHelpButtonFor:'Launcher/javaSettings.html'. |
|
3052 |
box addAbortAndOkButtons. |
|
3053 |
box open. |
|
3054 |
||
3055 |
box accepted ifTrue:[ |
|
3056 |
classPath value ~= oldClassPath ifTrue:[ |
|
3057 |
OperatingSystem isUNIXlike ifTrue:[ |
|
3058 |
classPath := (classPath value asCollectionOfSubstringsSeparatedBy:$:) |
|
3059 |
] ifFalse:[ |
|
3060 |
classPath := (classPath value asCollectionOfSubstringsSeparatedBy:$;) |
|
3061 |
]. |
|
3062 |
Java classPath:classPath |
|
3063 |
]. |
|
3064 |
Java javaHome:javaHome value. |
|
3065 |
||
3066 |
JavaMethod forceByteCodeDisplay:showJavaByteCode value. |
|
3067 |
JavaVM audioEnabled:audio value. |
|
3068 |
JavaVM exceptionDebug:exceptionDebug value. |
|
3069 |
JavaVM nullPointerExceptionDebug:nullPointerExceptionDebug value. |
|
3070 |
JavaVM fileOpenConfirmation: extraFileSecurityChecks value. |
|
3071 |
JavaVM socketConnectConfirmation: extraSocketSecurityChecks value. |
|
3072 |
||
3073 |
javaJustInTimeCompilation value ~~ ObjectMemory javaJustInTimeCompilation ifTrue:[ |
|
3074 |
ObjectMemory javaJustInTimeCompilation:javaJustInTimeCompilation value. |
|
3075 |
javaJustInTimeCompilation value ifTrue:[ |
|
3076 |
JavaMethod allSubInstancesDo:[:m | m checked:false]. |
|
3077 |
]. |
|
3078 |
]. |
|
3079 |
javaNativeCodeOptimization value ~~ ObjectMemory javaNativeCodeOptimization ifTrue:[ |
|
3080 |
ObjectMemory javaNativeCodeOptimization:javaNativeCodeOptimization value. |
|
3081 |
]. |
|
3082 |
]. |
|
3083 |
box destroy |
|
3084 |
||
3085 |
"Created: / 18.7.1998 / 22:32:58 / cg" |
|
3086 |
"Modified: / 27.1.1999 / 20:16:03 / cg" |
|
3087 |
! |
|
3088 |
||
3089 |
keyboardSettings |
|
3090 |
"open a dialog on keyboard related settings" |
|
3091 |
||
3092 |
|mappings listOfRawKeys listOfFunctions |
|
3093 |
box l |
|
3094 |
list1 list2 listView1 listView2 |
|
3095 |
frame selectionForwarder macroForwarder macroTextView y resources| |
|
3096 |
||
3097 |
resources := self owningClass classResources. |
|
3098 |
||
3099 |
mappings := Screen current keyboardMap. |
|
3100 |
||
3101 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
3102 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
3103 |
||
3104 |
selectionForwarder := Plug new. |
|
3105 |
selectionForwarder respondTo:#showFunction |
|
3106 |
with:[ |
|
3107 |
|raw| |
|
3108 |
raw := list1 selection. |
|
3109 |
list2 retractInterestsFor:selectionForwarder. |
|
3110 |
list2 selection:(mappings at:raw asSymbol) asString. |
|
3111 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
3112 |
]. |
|
3113 |
selectionForwarder respondTo:#showRawKey |
|
3114 |
with:[ |
|
3115 |
|f raw| |
|
3116 |
||
3117 |
f := list2 selection. |
|
3118 |
list1 retractInterestsFor:selectionForwarder. |
|
3119 |
raw := mappings keyAtValue:f asString. |
|
3120 |
raw isNil ifTrue:[ |
|
3121 |
raw := mappings keyAtValue:f first. |
|
3122 |
raw isNil ifTrue:[ |
|
3123 |
raw := mappings keyAtValue:f asSymbol. |
|
3124 |
] |
|
3125 |
]. |
|
3126 |
list1 selection:raw. |
|
3127 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
3128 |
]. |
|
3129 |
||
3130 |
macroForwarder := [ |
|
3131 |
|f macro indent| |
|
3132 |
f := list2 selection. |
|
3133 |
(f startsWith:'Cmd') ifTrue:[ |
|
3134 |
f := f copyFrom:4 |
|
3135 |
]. |
|
3136 |
macro := UserPreferences current functionKeySequences |
|
3137 |
at:(f asSymbol) ifAbsent:nil. |
|
3138 |
macro notNil ifTrue:[ |
|
3139 |
macro := macro asStringCollection. |
|
3140 |
indent := macro |
|
3141 |
inject:99999 into:[:min :element | |
|
3142 |
|stripped| |
|
3143 |
||
3144 |
stripped := element withoutLeadingSeparators. |
|
3145 |
stripped size == 0 ifTrue:[ |
|
3146 |
min |
|
3147 |
] ifFalse:[ |
|
3148 |
min min:(element size - stripped size) |
|
3149 |
] |
|
3150 |
]. |
|
3151 |
indent ~~ 0 ifTrue:[ |
|
3152 |
macro := macro collect:[:line | |
|
3153 |
line size > indent ifTrue:[ |
|
3154 |
line copyFrom:indent+1 |
|
3155 |
] ifFalse:[ |
|
3156 |
line |
|
3157 |
]. |
|
3158 |
] |
|
3159 |
]. |
|
3160 |
]. |
|
3161 |
macroTextView contents:macro. |
|
3162 |
]. |
|
3163 |
||
3164 |
list1 := SelectionInList with:listOfRawKeys. |
|
3165 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
3166 |
||
3167 |
list2 := SelectionInList with:listOfFunctions. |
|
3168 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
3169 |
list2 onChangeEvaluate:macroForwarder. |
|
3170 |
||
3171 |
box := Dialog new. |
|
3172 |
box label:(resources string:'Keyboard Mappings'). |
|
3173 |
||
3174 |
l := box addTextLabel:(resources at:'KEY_MSG' default:'keyboard mapping:') withCRs. |
|
3175 |
l adjust:#left; borderWidth:0. |
|
3176 |
||
3177 |
frame := View new. |
|
3178 |
frame extent:300 @ 300. |
|
3179 |
frame borderWidth:0. |
|
3180 |
||
3181 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
3182 |
listView1 model:list1. |
|
3183 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
3184 |
||
3185 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
3186 |
listView2 model:list2. |
|
3187 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
3188 |
||
3189 |
frame topInset:box yPosition. |
|
3190 |
box addComponent:frame withExtent:350@200. |
|
3191 |
box makeTabable:listView1. |
|
3192 |
box makeTabable:listView2. |
|
3193 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
3194 |
||
3195 |
box addVerticalSpace. |
|
3196 |
||
3197 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
3198 |
l adjust:#left; borderWidth:0. |
|
3199 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
3200 |
l topInset:(View viewSpacing). |
|
3201 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
3202 |
||
3203 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
3204 |
box addComponent:macroTextView tabable:true. |
|
3205 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
3206 |
y := box yPosition. |
|
3207 |
||
3208 |
box |
|
3209 |
addHelpButtonFor:'Launcher/keyboardSetting.html'; |
|
3210 |
"addAbortButton;" |
|
3211 |
addOkButtonLabelled:(resources string:'Close' "'Dismiss'"). |
|
3212 |
||
3213 |
macroTextView topInset:(l preferredExtent y + 5). |
|
3214 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
3215 |
||
3216 |
box open. |
|
3217 |
||
3218 |
box accepted ifTrue:[ |
|
3219 |
"no action yet ..." |
|
3220 |
]. |
|
3221 |
box destroy |
|
3222 |
||
3223 |
"Modified: / 9.9.1996 / 22:43:17 / stefan" |
|
3224 |
"Modified: / 4.5.1998 / 12:40:02 / cg" |
|
3225 |
! |
|
3226 |
||
3227 |
languageSettings |
|
3228 |
self languageSettingsFor:nil |
|
3229 |
! |
|
3230 |
||
3231 |
languageSettingsFor:requestor |
|
3232 |
"open a dialog on language related settings" |
|
3233 |
||
3234 |
|listOfLanguages translatedLanguages switch box languageList flags resources| |
|
3235 |
||
3236 |
resources := self owningClass classResources. |
|
3237 |
||
3238 |
" |
|
3239 |
get list of supported languages from the launchers resources ... |
|
3240 |
" |
|
3241 |
||
3242 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default'). |
|
3243 |
listOfLanguages := listOfLanguages asOrderedCollection. |
|
3244 |
||
3245 |
translatedLanguages := listOfLanguages collect:[:lang | |item| |
|
3246 |
item := resources at:lang. |
|
3247 |
item isString ifTrue:[ |
|
3248 |
item |
|
3249 |
] ifFalse:[ |
|
3250 |
item at:1 |
|
3251 |
] |
|
3252 |
]. |
|
3253 |
flags := listOfLanguages collect:[:lang | |item| |
|
3254 |
item := resources at:lang. |
|
3255 |
item isArray ifTrue:[ |
|
3256 |
item at:2 |
|
3257 |
] ifFalse:[ |
|
3258 |
nil |
|
3259 |
] |
|
3260 |
]. |
|
3261 |
flags := flags collect:[:nm | |img d| nm notNil ifTrue:[ |
|
3262 |
img := Image fromFile:nm. |
|
3263 |
img isNil ifTrue:[ |
|
3264 |
d := Smalltalk getPackageDirectoryForPackage:'stx:goodies'. |
|
3265 |
img := Image fromFile:(d construct:nm). |
|
3266 |
]. |
|
3267 |
] ifFalse:[ |
|
3268 |
nil |
|
3269 |
] |
|
3270 |
]. |
|
3271 |
listOfLanguages := listOfLanguages collect:[:nm | nm copyFrom:'LANG_' size + 1]. |
|
3272 |
languageList := translatedLanguages with:flags collect:[:lang :flag | LabelAndIcon icon:flag string:lang.]. |
|
3273 |
||
3274 |
box := ListSelectionBox title:(resources at:'LANG_MSG' default:'Select a Language') withCRs. |
|
3275 |
box label:(resources string:'Language Selection'). |
|
3276 |
box list:languageList. |
|
3277 |
box initialText:(Language , '-' , LanguageTerritory). |
|
3278 |
box action:[:newLanguage | |
|
3279 |
WindowGroup activeGroup withWaitCursorDo:[ |
|
3280 |
|fontPref idx language oldLanguage territory enc |
|
3281 |
answer matchingFonts l screen| |
|
3282 |
||
3283 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
|
3284 |
idx ~~ 0 ifTrue:[ |
|
3285 |
language := listOfLanguages at:idx |
|
3286 |
] ifFalse:[ |
|
3287 |
language := newLanguage |
|
3288 |
]. |
|
3289 |
(language includes:$-) ifTrue:[ |
|
3290 |
l := language asCollectionOfSubstringsSeparatedBy:$-. |
|
3291 |
language := l at:1. |
|
3292 |
territory := l at:2. |
|
3293 |
]. |
|
3294 |
territory isNil ifTrue:[ |
|
3295 |
territory := language copyTo:2 |
|
3296 |
]. |
|
3297 |
||
3298 |
"/ check if the new language needs a differently encoded font; |
|
3299 |
"/ ask user to switch font and allow cancellation. |
|
3300 |
"/ Otherwise, you are left with unreadable menu & button items ... |
|
3301 |
||
3302 |
oldLanguage := Smalltalk language. |
|
3303 |
Smalltalk language:language asSymbol. |
|
3304 |
ResourcePack flushCachedResourcePacks. |
|
3305 |
"/ refetch resources ... |
|
3306 |
resources := self owningClass classResources. |
|
3307 |
fontPref := resources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'. |
|
3308 |
fontPref := fontPref asLowercase. |
|
3309 |
Smalltalk language:oldLanguage. |
|
3310 |
||
3311 |
switch := true. |
|
3312 |
enc := MenuView defaultFont encoding. |
|
3313 |
(fontPref match:enc asLowercase) ifFalse:[ |
|
3314 |
"/ look if there is one at all. |
|
3315 |
screen := Screen current. |
|
3316 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding asLowercase]. |
|
3317 |
matchingFonts size == 0 ifTrue:[ |
|
3318 |
"/ flush and try again - just in case, the font path has changed. |
|
3319 |
screen flushListOfAvailableFonts. |
|
3320 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding asLowercase]. |
|
3321 |
]. |
|
3322 |
matchingFonts size == 0 ifTrue:[ |
|
3323 |
(Dialog |
|
3324 |
confirm:(resources |
|
3325 |
string:'Your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)' |
|
3326 |
with:fontPref) withCRs) |
|
3327 |
ifFalse:[ |
|
3328 |
switch := false |
|
3329 |
] |
|
3330 |
] ifFalse:[ |
|
3331 |
answer := Dialog |
|
3332 |
confirmWithCancel:(resources |
|
3333 |
string:'menu font is not %1-encoded.\\Change it ?' |
|
3334 |
with:fontPref) withCRs |
|
3335 |
labels:(resources |
|
3336 |
array:#('cancel' 'no' 'yes')) |
|
3337 |
default:3. |
|
3338 |
answer isNil ifTrue:[ |
|
3339 |
switch := false |
|
3340 |
] ifFalse:[ |
|
3341 |
answer ifTrue:[ |
|
3342 |
switch := (requestor fontBoxForEncoding:fontPref) |
|
3343 |
] |
|
3344 |
]. |
|
3345 |
]. |
|
3346 |
]. |
|
3347 |
||
3348 |
switch ifTrue:[ |
|
3349 |
Transcript showCR:'change language to ' , newLanguage , ' ...'. |
|
3350 |
Smalltalk language:language asSymbol. |
|
3351 |
Smalltalk languageTerritory:territory asSymbol. |
|
3352 |
"/ ResourcePack flushCachedResourcePacks - already done by language-change |
|
3353 |
]. |
|
3354 |
]. |
|
3355 |
switch ifTrue:[ |
|
3356 |
requestor reopenLauncher. |
|
3357 |
DebugView newDebugger. |
|
3358 |
] |
|
3359 |
]. |
|
3360 |
box |
|
3361 |
addHelpButtonFor:'Launcher/languageSetting.html'. |
|
3362 |
box open. |
|
3363 |
box destroy |
|
3364 |
||
3365 |
"Modified: / 9.9.1996 / 22:43:27 / stefan" |
|
3366 |
"Modified: / 16.11.2001 / 11:51:35 / cg" |
|
3367 |
! |
|
3368 |
||
3369 |
memorySettings |
|
3370 |
"open a dialog on objectMemory related settings" |
|
3371 |
||
3372 |
|box igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
|
3373 |
compressLimit |
|
3374 |
oldIncr component fields codeLimit codeTrigger stackLimit resources |
|
3375 |
fastMoreLimit maxOldSpace models info acceptChannel| |
|
3376 |
||
3377 |
acceptChannel := false asValue. |
|
3378 |
||
3379 |
resources := self owningClass classResources. |
|
3380 |
||
3381 |
"/ |
|
3382 |
"/ extract relevant system settings ... |
|
3383 |
"/ |
|
3384 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
3385 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
3386 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
3387 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
3388 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
3389 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
|
3390 |
codeLimit := ObjectMemory dynamicCodeLimit asValue. |
|
3391 |
codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue. |
|
3392 |
stackLimit := Process defaultMaximumStackSize asValue. |
|
3393 |
fastMoreLimit := (ObjectMemory fastMoreOldSpaceLimit:-1) asValue. |
|
3394 |
maxOldSpace := ObjectMemory maxOldSpace asValue. |
|
3395 |
||
3396 |
models := OrderedCollection new. |
|
3397 |
info := OrderedCollection new. |
|
3398 |
models add:newSpaceSize. info add:#(number 'Size of newSpace where objects are created' 'Size of NewSpace:' ). |
|
3399 |
models add:fastMoreLimit. info add:#(number 'Quickly allocate more memory (suppress GC) up to this limit' 'Quick Allocation Limit:'). |
|
3400 |
models add:maxOldSpace. info add:#(number 'Never allocate more than this amount of memory' 'Maximum Memory Limit:'). |
|
3401 |
models add:igcLimit. info add:#(number 'Start IGC whenever this amount has been allocated' 'Incremental GC Allocation Trigger:'). |
|
3402 |
models add:igcFreeLimit. info add:#(number 'Start IGC whenever freespace drops below this' 'Incremental GC Freespace Trigger:'). |
|
3403 |
models add:igcFreeAmount. info add:#(number 'Try to keep this amount for peak requests' 'Incremental GC Amount:'). |
|
3404 |
models add:oldIncr. info add:#(number 'Increase oldSpace in chunks of this size' 'Oldspace Increment:'). |
|
3405 |
models add:compressLimit. info add:#(number 'Use 2-pass compressing GC if > 0 and more memory is in use' 'Oldspace Compress Limit:'). |
|
3406 |
models add:stackLimit. info add:#(number 'Trigger recursionInterrupt if more stack is used by a process' 'Stack Limit:'). |
|
3407 |
models add:codeLimit. info add:#(numberOrNil 'Flush dynamic compiled code to stay within this limit' 'Dynamic code Limit:'). |
|
3408 |
models add:codeTrigger. info add:#(numberOrNil 'Start incremental GC whenever this amount of code has been allocated' 'Dynamic Code GC Trigger:'). |
|
3409 |
||
3410 |
"/ |
|
3411 |
"/ create a box on those values ... |
|
3412 |
"/ |
|
3413 |
fields := OrderedCollection new. |
|
3414 |
||
3415 |
box := DialogBox new. |
|
3416 |
box label:(resources string:'Memory Manager Settings'). |
|
3417 |
||
3418 |
(box addTextLabel:'Warning - invalid settings may result in failures or poor performance |
|
3419 |
' , 'You have been warned' allBold , '.') adjust:#left. |
|
3420 |
box addHorizontalLine. |
|
3421 |
||
3422 |
models with:info do:[:m :i | |
|
3423 |
|lbl descr conv| |
|
3424 |
||
3425 |
conv := i at:1. |
|
3426 |
lbl := i at:3. |
|
3427 |
descr := i at:2. |
|
3428 |
||
3429 |
component := box |
|
3430 |
addLabelledInputField:(resources string:lbl) |
|
3431 |
adjust:#right |
|
3432 |
on:nil "/ newSpaceSize |
|
3433 |
tabable:true |
|
3434 |
separateAtX:0.7. |
|
3435 |
component acceptOnLeave:false. |
|
3436 |
"/ component converter:(PrintConverter new perform:conv). |
|
3437 |
component model:((TypeConverter on:m) perform:conv). |
|
3438 |
component acceptChannel:acceptChannel. |
|
3439 |
fields add:component. |
|
3440 |
||
3441 |
(box addTextLabel:descr) adjust:#left. |
|
3442 |
box addHorizontalLine. |
|
3443 |
]. |
|
3444 |
||
3445 |
ObjectMemory supportsJustInTimeCompilation ifFalse:[ |
|
3446 |
(fields at:9) disable. |
|
3447 |
(fields at:10) disable. |
|
3448 |
]. |
|
3449 |
||
3450 |
box addAbortAndOkButtons. |
|
3451 |
box |
|
3452 |
addHelpButtonFor:'Launcher/memorySettings.html'. |
|
3453 |
||
3454 |
"/ |
|
3455 |
"/ show the box ... |
|
3456 |
"/ |
|
3457 |
box open. |
|
3458 |
||
3459 |
"/ |
|
3460 |
"/ update system settings |
|
3461 |
"/ |
|
3462 |
box accepted ifTrue:[ |
|
3463 |
acceptChannel value:true. |
|
3464 |
||
3465 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
|
3466 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
|
3467 |
]. |
|
3468 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
|
3469 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
|
3470 |
]. |
|
3471 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
|
3472 |
ObjectMemory incrementalGCLimit:igcLimit value. |
|
3473 |
]. |
|
3474 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
|
3475 |
ObjectMemory newSpaceSize:newSpaceSize value. |
|
3476 |
]. |
|
3477 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
|
3478 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
|
3479 |
]. |
|
3480 |
stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[ |
|
3481 |
Process defaultMaximumStackSize:stackLimit value. |
|
3482 |
]. |
|
3483 |
fastMoreLimit value ~~ (ObjectMemory fastMoreOldSpaceLimit:-1) ifTrue:[ |
|
3484 |
ObjectMemory fastMoreOldSpaceLimit:fastMoreLimit value. |
|
3485 |
]. |
|
3486 |
maxOldSpace value ~~ ObjectMemory maxOldSpace ifTrue:[ |
|
3487 |
ObjectMemory maxOldSpace:maxOldSpace value. |
|
3488 |
]. |
|
3489 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
|
3490 |
ObjectMemory dynamicCodeLimit:codeLimit value. |
|
3491 |
ObjectMemory dynamicCodeGCTrigger:codeTrigger value. |
|
3492 |
]. |
|
3493 |
box destroy |
|
3494 |
||
3495 |
"Modified: 27.2.1997 / 16:50:12 / cg" |
|
3496 |
! |
|
3497 |
||
3498 |
messageSettings |
|
3499 |
"open a dialog on infoMessage related settings" |
|
3500 |
||
3501 |
|box vmInfo vmErrors displayErrors classInfos resources| |
|
3502 |
||
3503 |
resources := self owningClass classResources. |
|
3504 |
||
3505 |
vmInfo := ObjectMemory infoPrinting asValue. |
|
3506 |
vmErrors := ObjectMemory debugPrinting asValue. |
|
3507 |
classInfos := Object infoPrinting asValue. |
|
3508 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
|
3509 |
||
3510 |
box := DialogBox new. |
|
3511 |
box label:(resources string:'Messages'). |
|
3512 |
||
3513 |
box addCheckBox:(resources string:'VM Info Messages') on:vmInfo. |
|
3514 |
box addCheckBox:(resources string:'VM Error Messages') on:vmErrors. |
|
3515 |
box addHorizontalLine. |
|
3516 |
||
3517 |
box addCheckBox:(resources string:'Display Error Messages (Xlib, Xtlib, WinAPI ...)') on:displayErrors. |
|
3518 |
box addCheckBox:(resources string:'Other Info Messages') on:classInfos. |
|
3519 |
box addHorizontalLine. |
|
3520 |
||
3521 |
box addHelpButtonFor:'Launcher/messageSettings.html'. |
|
3522 |
box addAbortAndOkButtons. |
|
3523 |
box open. |
|
3524 |
||
3525 |
box accepted ifTrue:[ |
|
3526 |
ObjectMemory infoPrinting:vmInfo value. |
|
3527 |
ObjectMemory debugPrinting:vmErrors value. |
|
3528 |
Object infoPrinting:classInfos value. |
|
3529 |
DeviceWorkstation errorPrinting:displayErrors value. |
|
3530 |
]. |
|
3531 |
box destroy |
|
3532 |
||
3533 |
"Modified: 27.1.1997 / 17:46:01 / cg" |
|
3534 |
! |
|
3535 |
||
3536 |
miscSettings |
|
3537 |
"open a dialog on misc other settings" |
|
3538 |
||
3539 |
|box pos pos2 check butt shadows takeFocus focusFollowsMouse returnFocus |
|
3540 |
hostNameInLabel showAccelerators |
|
3541 |
preemptive dynamicPrios hostNameInLabelHolder resources |
|
3542 |
activateOnClick opaqueVariablePanelResize opaqueTableColumnResize currentUserPrefs |
|
3543 |
beepEnabled newWindowLabelFormat| |
|
3544 |
||
3545 |
resources := self owningClass classResources. |
|
3546 |
currentUserPrefs := UserPreferences current. |
|
3547 |
||
3548 |
"/ |
|
3549 |
"/ extract relevant system settings ... |
|
3550 |
"/ |
|
3551 |
shadows := PopUpView shadows asValue. |
|
3552 |
beepEnabled := currentUserPrefs beepEnabled asValue. |
|
3553 |
||
3554 |
hostNameInLabel := StandardSystemView includeHostNameInLabel. |
|
3555 |
hostNameInLabelHolder := hostNameInLabel asValue. |
|
3556 |
returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue. |
|
3557 |
takeFocus := StandardSystemView takeFocusWhenMapped asValue. |
|
3558 |
focusFollowsMouse := (currentUserPrefs focusFollowsMouse ? true) asValue. |
|
3559 |
activateOnClick := (Display activateOnClick:nil) asValue. |
|
3560 |
opaqueVariablePanelResize := currentUserPrefs opaqueVariablePanelResizing asValue. |
|
3561 |
opaqueTableColumnResize := currentUserPrefs opaqueTableColumnResizing asValue. |
|
3562 |
||
3563 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
|
3564 |
preemptive := Processor isTimeSlicing asValue. |
|
3565 |
dynamicPrios := Processor supportDynamicPriorities asValue. |
|
3566 |
||
3567 |
"/ |
|
3568 |
"/ create a box on those values ... |
|
3569 |
"/ |
|
3570 |
box := DialogBox new. |
|
3571 |
box label:(resources string:'Other settings'). |
|
3572 |
||
3573 |
box addCheckBox:(resources string:'Shadows under PopUp Views') on:shadows. |
|
3574 |
box addCheckBox:(resources string:'Beeper enabled') on:beepEnabled. |
|
3575 |
box addCheckBox:(resources string:'Boxes Return Focus to Previously Active View') on:returnFocus. |
|
3576 |
box addCheckBox:(resources string:'Views Catch Focus when Mapped') on:takeFocus. |
|
3577 |
pos := box yPosition. |
|
3578 |
check := box addCheckBox:(resources string:'Hostname in Window Labels') on:hostNameInLabelHolder. |
|
3579 |
check width:0.6. |
|
3580 |
pos2 := box yPosition. |
|
3581 |
box yPosition:pos. |
|
3582 |
butt := box addComponent:(Button label:(resources string:'Format...') |
|
3583 |
action:[ |
|
3584 |
|newFormat| |
|
3585 |
||
3586 |
newFormat := Dialog request: |
|
3587 |
'Define the Format of Window Labels:\\ %1 - Label\ %2 - Hostname\ %3 - Username\ %4 - ProcessId\' |
|
3588 |
withCRs initialAnswer:StandardSystemView windowLabelFormat. |
|
3589 |
||
3590 |
newFormat size > 0 ifTrue:[ |
|
3591 |
newWindowLabelFormat := newFormat |
|
3592 |
]. |
|
3593 |
]). |
|
3594 |
box makeTabable:butt. |
|
3595 |
butt left:0.6; width:0.4. |
|
3596 |
box yPosition:(box yPosition max:pos2). |
|
3597 |
||
3598 |
box addCheckBox:(resources string:'Show Accelerator Keys in Menus') on:showAccelerators. |
|
3599 |
box addCheckBox:(resources string:'Raise & Activate Windows on Click') on:activateOnClick. |
|
3600 |
box addCheckBox:(resources string:'Focus Follows Mouse') on:focusFollowsMouse. |
|
3601 |
box addCheckBox:(resources string:'Opaque Variable Panel Resizing') on:opaqueVariablePanelResize. |
|
3602 |
box addCheckBox:(resources string:'Opaque Table Column Resizing') on:opaqueTableColumnResize. |
|
3603 |
||
3604 |
box addHorizontalLine. |
|
3605 |
||
3606 |
box addCheckBox:(resources string:'Preemptive Scheduling') on:preemptive. |
|
3607 |
box leftIndent:20. |
|
3608 |
check := box addCheckBox:(resources string:'Dynamic Priorities') on:dynamicPrios. |
|
3609 |
check enableChannel:preemptive. |
|
3610 |
box leftIndent:0. |
|
3611 |
||
3612 |
box addHorizontalLine. |
|
3613 |
box |
|
3614 |
addHelpButtonFor:'Launcher/miscSettings.html'; |
|
3615 |
addAbortAndOkButtons. |
|
3616 |
||
3617 |
"/ |
|
3618 |
"/ show the box ... |
|
3619 |
"/ |
|
3620 |
box open. |
|
3621 |
||
3622 |
"/ |
|
3623 |
"/ update system settings |
|
3624 |
"/ |
|
3625 |
box accepted ifTrue:[ |
|
3626 |
PopUpView shadows:shadows value. |
|
3627 |
(hostNameInLabelHolder value ~= hostNameInLabel |
|
3628 |
or:[newWindowLabelFormat ~= StandardSystemView windowLabelFormat]) ifTrue:[ |
|
3629 |
StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value. |
|
3630 |
newWindowLabelFormat notNil ifTrue:[ |
|
3631 |
StandardSystemView windowLabelFormat:newWindowLabelFormat |
|
3632 |
]. |
|
3633 |
||
3634 |
Screen allScreens do:[:aDisplay | |
|
3635 |
aDisplay allViewsDo:[:aView | |
|
3636 |
|l| |
|
3637 |
||
3638 |
aView isTopView ifTrue:[ |
|
3639 |
l := aView label. |
|
3640 |
l notNil ifTrue:[ |
|
3641 |
aView label:(l , ' '); label:l. "/ force a change |
|
3642 |
] |
|
3643 |
] |
|
3644 |
] |
|
3645 |
] |
|
3646 |
]. |
|
3647 |
||
3648 |
currentUserPrefs opaqueVariablePanelResizing:opaqueVariablePanelResize value. |
|
3649 |
currentUserPrefs opaqueTableColumnResizing:opaqueTableColumnResize value. |
|
3650 |
||
3651 |
currentUserPrefs beepEnabled:beepEnabled value. |
|
3652 |
||
3653 |
StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value. |
|
3654 |
StandardSystemView takeFocusWhenMapped:takeFocus value. |
|
3655 |
currentUserPrefs focusFollowsMouse:focusFollowsMouse value. |
|
3656 |
Screen current activateOnClick:(activateOnClick value). |
|
3657 |
||
3658 |
MenuView showAcceleratorKeys:showAccelerators value. |
|
3659 |
Processor isTimeSlicing ~~ preemptive value ifTrue:[ |
|
3660 |
preemptive value ifTrue:[ |
|
3661 |
Processor startTimeSlicing |
|
3662 |
] ifFalse:[ |
|
3663 |
Processor stopTimeSlicing |
|
3664 |
] |
|
3665 |
]. |
|
3666 |
Processor supportDynamicPriorities ~~ dynamicPrios value ifTrue:[ |
|
3667 |
Processor supportDynamicPriorities:dynamicPrios value |
|
3668 |
]. |
|
3669 |
]. |
|
3670 |
box destroy |
|
3671 |
||
3672 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
3673 |
"Modified: / 20.5.1999 / 18:33:55 / cg" |
|
3674 |
"Modified: / 3.12.1999 / 17:11:38 / ps" |
|
3675 |
! |
|
3676 |
||
3677 |
printerSettings |
|
3678 |
"open a dialog on printer related settings; returns true if accepted" |
|
3679 |
||
3680 |
|box accepted |
|
3681 |
possiblePrinters possibleTypes printerType printCommand |
|
3682 |
pageFormat landscape updater |
|
3683 |
formatLabel formatComponent landscapeLabel landscapeComponent |
|
3684 |
topMargin leftMargin rightMargin bottomMargin unitList unit |
|
3685 |
topMarginComponent leftMarginComponent |
|
3686 |
rightMarginComponent |
|
3687 |
bottomMarginComponent supportsColor supportsColorComponent |
|
3688 |
y y1 commandListPop component commandList row resources| |
|
3689 |
||
3690 |
resources := self owningClass classResources. |
|
3691 |
||
3692 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
3693 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
3694 |
||
3695 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
3696 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
3697 |
printCommand := Printer printCommand asValue. |
|
3698 |
||
3699 |
pageFormat := SelectionInList new list:(Printer defaultPageFormats). |
|
3700 |
pageFormat selection:(Printer pageFormat). |
|
3701 |
landscape := Printer landscape asValue. |
|
3702 |
||
3703 |
topMargin := Printer topMargin asValue. |
|
3704 |
leftMargin := Printer leftMargin asValue. |
|
3705 |
rightMargin := Printer rightMargin asValue. |
|
3706 |
bottomMargin := Printer bottomMargin asValue. |
|
3707 |
supportsColor := Printer supportsColor asValue. |
|
3708 |
||
3709 |
box := DialogBox new. |
|
3710 |
box label:(resources string:'Printer Settings'). |
|
3711 |
||
3712 |
"/ either use a popUpList ... |
|
3713 |
"/ box addPopUpList:(resources string:'printer type:') on:printerType. |
|
3714 |
||
3715 |
"/ or a comboList; |
|
3716 |
"/ which one looks better ? |
|
3717 |
y := box yPosition. |
|
3718 |
component := box addTextLabel:(resources string:'Printer Type:'). |
|
3719 |
component width:0.25; adjust:#right; borderWidth:0. |
|
3720 |
box yPosition:y. |
|
3721 |
component := box addComboListOn:printerType tabable:true. |
|
3722 |
component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true. |
|
3723 |
component width:0.75; left:0.25. |
|
3724 |
"/ end of question |
|
3725 |
||
3726 |
y := box yPosition. |
|
3727 |
component := box addTextLabel:(resources string:'Print Command:'). |
|
3728 |
component width:0.25; adjust:#right; borderWidth:0. |
|
3729 |
box yPosition:y. |
|
3730 |
commandListPop := box addComboBoxOn:printCommand tabable:true. |
|
3731 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
3732 |
commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
3733 |
"/ some common print commands ... |
|
3734 |
||
3735 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
|
3736 |
commandList isNil ifTrue:[ |
|
3737 |
commandList := PrinterStream defaultCommands. |
|
3738 |
commandList isNil ifTrue:[ |
|
3739 |
commandList := #('lpr' |
|
3740 |
'lp' |
|
3741 |
). |
|
3742 |
] |
|
3743 |
]. |
|
3744 |
||
3745 |
commandListPop list:commandList. |
|
3746 |
||
3747 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
3748 |
||
3749 |
row := OrderedCollection new. |
|
3750 |
row add:(formatLabel := Label label:(resources string:'Page Format:')). |
|
3751 |
formatLabel borderWidth:0. |
|
3752 |
row add:(formatComponent := PopUpList on:pageFormat). |
|
3753 |
formatComponent label:'unknown'. |
|
3754 |
||
3755 |
row add:(landscapeLabel := Label label:(resources string:'Landscape:')). |
|
3756 |
landscapeLabel borderWidth:0. |
|
3757 |
row add:(landscapeComponent := CheckToggle on:landscape). |
|
3758 |
||
3759 |
y := box yPosition. |
|
3760 |
box |
|
3761 |
addRow:(1 to:2) |
|
3762 |
fromX:0 |
|
3763 |
toX:0.5 |
|
3764 |
collect:[:idx | row at:idx] |
|
3765 |
tabable:false |
|
3766 |
horizontalLayout:#leftSpace |
|
3767 |
verticalLayout:#center. |
|
3768 |
y1 := box yPosition. |
|
3769 |
box yPosition:y. |
|
3770 |
||
3771 |
box |
|
3772 |
addRow:(3 to:4) |
|
3773 |
fromX:0.5 |
|
3774 |
toX:1.0 |
|
3775 |
collect:[:idx | row at:idx] |
|
3776 |
tabable:false |
|
3777 |
horizontalLayout:#leftSpace |
|
3778 |
verticalLayout:#center. |
|
3779 |
||
3780 |
box yPosition:(box yPosition max:y1). |
|
3781 |
||
3782 |
box makeTabable:(formatComponent). |
|
3783 |
box makeTabable:(landscapeComponent). |
|
3784 |
||
3785 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
3786 |
||
3787 |
y := box yPosition. |
|
3788 |
||
3789 |
topMarginComponent := box |
|
3790 |
addLabelledInputField:(resources string:'Top Margin:') |
|
3791 |
adjust:#right |
|
3792 |
on:nil "/ topMargin |
|
3793 |
tabable:true |
|
3794 |
from:0.0 to:0.5 |
|
3795 |
separateAtX:0.6. |
|
3796 |
topMarginComponent converter:(PrintConverter new initForNumber). |
|
3797 |
topMarginComponent model:topMargin. |
|
3798 |
y1 := box yPosition. |
|
3799 |
||
3800 |
box yPosition:y. |
|
3801 |
unitList := SelectionInList with:#('inch' 'mm'). |
|
3802 |
unitList selectionIndex:1. |
|
3803 |
||
3804 |
component := box addComponent:(PopUpList on:unitList). |
|
3805 |
component |
|
3806 |
left:0.6; |
|
3807 |
width:0.3. |
|
3808 |
||
3809 |
box yPosition:y1. |
|
3810 |
||
3811 |
leftMarginComponent := box |
|
3812 |
addLabelledInputField:(resources string:'Left Margin:') |
|
3813 |
adjust:#right |
|
3814 |
on:nil "/ leftMargin |
|
3815 |
tabable:true |
|
3816 |
from:0.0 to:0.5 |
|
3817 |
separateAtX:0.6. |
|
3818 |
leftMarginComponent converter:(PrintConverter new initForNumber). |
|
3819 |
leftMarginComponent model:leftMargin. |
|
3820 |
||
3821 |
rightMarginComponent := box |
|
3822 |
addLabelledInputField:(resources string:'Right Margin:') |
|
3823 |
adjust:#right |
|
3824 |
on:nil "/ rightMargin |
|
3825 |
tabable:true |
|
3826 |
from:0.0 to:0.5 |
|
3827 |
separateAtX:0.6. |
|
3828 |
rightMarginComponent converter:(PrintConverter new initForNumber). |
|
3829 |
rightMarginComponent model:rightMargin. |
|
3830 |
||
3831 |
bottomMarginComponent := box |
|
3832 |
addLabelledInputField:(resources string:'Bottom Margin:') |
|
3833 |
adjust:#right |
|
3834 |
on:nil "/ bottomMargin |
|
3835 |
tabable:true |
|
3836 |
from:0.0 to:0.5 |
|
3837 |
separateAtX:0.6. |
|
3838 |
bottomMarginComponent converter:(PrintConverter new initForNumber). |
|
3839 |
bottomMarginComponent model:bottomMargin. |
|
3840 |
||
3841 |
box addHorizontalLine. |
|
3842 |
supportsColorComponent := box addCheckBox:(resources string:'Color Printer') on:supportsColor. |
|
3843 |
box addVerticalSpace. |
|
3844 |
||
3845 |
updater := [ |p fg hasPageSize hasMargins| |
|
3846 |
||
3847 |
printerType selectionIndex ~~ 0 ifTrue:[ |
|
3848 |
p := possiblePrinters at:(printerType selectionIndex). |
|
3849 |
hasPageSize := p supportsPageSizes. |
|
3850 |
hasMargins := p supportsMargins. |
|
3851 |
] ifFalse:[ |
|
3852 |
hasPageSize := false. |
|
3853 |
hasMargins := false. |
|
3854 |
]. |
|
3855 |
hasPageSize ifTrue:[ |
|
3856 |
fg := Button new foregroundColor. |
|
3857 |
formatComponent enable. |
|
3858 |
landscapeComponent enable. |
|
3859 |
||
3860 |
formatComponent label:p pageFormat. |
|
3861 |
pageFormat value:(p pageFormat). |
|
3862 |
landscape value:(p landscape). |
|
3863 |
] ifFalse:[ |
|
3864 |
fg := Button new disabledForegroundColor. |
|
3865 |
formatComponent disable. |
|
3866 |
landscapeComponent disable. |
|
3867 |
||
3868 |
formatComponent label:'unknown'. |
|
3869 |
landscape value:nil. |
|
3870 |
]. |
|
3871 |
hasMargins ifTrue:[ |
|
3872 |
unitList selectionIndex == 2 ifTrue:[ |
|
3873 |
unit := #mm |
|
3874 |
] ifFalse:[ |
|
3875 |
unit := #inch |
|
3876 |
]. |
|
3877 |
||
3878 |
topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit). |
|
3879 |
leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit). |
|
3880 |
rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit). |
|
3881 |
bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit). |
|
3882 |
||
3883 |
topMarginComponent enable. |
|
3884 |
leftMarginComponent enable. |
|
3885 |
rightMarginComponent enable. |
|
3886 |
bottomMarginComponent enable. |
|
3887 |
] ifFalse:[ |
|
3888 |
topMarginComponent disable. |
|
3889 |
leftMarginComponent disable. |
|
3890 |
rightMarginComponent disable. |
|
3891 |
bottomMarginComponent disable. |
|
3892 |
]. |
|
3893 |
formatLabel foregroundColor:fg. |
|
3894 |
landscapeLabel foregroundColor:fg. |
|
3895 |
||
3896 |
p notNil ifTrue:[ |
|
3897 |
commandList := p defaultCommands. |
|
3898 |
commandList notNil ifTrue:[ |
|
3899 |
commandListPop list:commandList |
|
3900 |
]. |
|
3901 |
||
3902 |
printCommand value:(p printCommand). |
|
3903 |
]. |
|
3904 |
p supportsPostscript ifFalse:[ |
|
3905 |
supportsColorComponent disable. |
|
3906 |
supportsColor value:false |
|
3907 |
] ifTrue:[ |
|
3908 |
supportsColorComponent enable. |
|
3909 |
supportsColor value:(Printer supportsColor). |
|
3910 |
] |
|
3911 |
]. |
|
3912 |
unitList onChangeEvaluate:updater. |
|
3913 |
printerType onChangeEvaluate:updater. |
|
3914 |
updater value. |
|
3915 |
||
3916 |
box addHorizontalLine. |
|
3917 |
box addVerticalSpace; |
|
3918 |
addHelpButtonFor:'Launcher/printerSettings.html'; |
|
3919 |
addAbortAndOkButtons. |
|
3920 |
box open. |
|
3921 |
||
3922 |
(accepted := box accepted) ifTrue:[ |
|
3923 |
Printer := possiblePrinters at:(printerType selectionIndex). |
|
3924 |
Printer printCommand:printCommand value. |
|
3925 |
||
3926 |
Printer supportsPageSizes ifTrue:[ |
|
3927 |
Printer pageFormat:(pageFormat selection). |
|
3928 |
Printer landscape:(landscape value). |
|
3929 |
]. |
|
3930 |
Printer supportsMargins ifTrue:[ |
|
3931 |
unitList selectionIndex == 2 ifTrue:[ |
|
3932 |
unit := #mm |
|
3933 |
] ifFalse:[ |
|
3934 |
unit := #inch |
|
3935 |
]. |
|
3936 |
Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch). |
|
3937 |
Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch). |
|
3938 |
Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch). |
|
3939 |
Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch). |
|
3940 |
]. |
|
3941 |
Printer supportsPostscript ifTrue:[ |
|
3942 |
Printer supportsColor:supportsColor value. |
|
3943 |
]. |
|
3944 |
]. |
|
3945 |
box destroy. |
|
3946 |
^ accepted |
|
3947 |
||
3948 |
"Modified: 9.9.1996 / 22:43:51 / stefan" |
|
3949 |
"Modified: 28.2.1997 / 14:00:13 / cg" |
|
3950 |
! |
|
3951 |
||
3952 |
restoreSettings |
|
3953 |
"restore settings from a settings-file." |
|
3954 |
||
3955 |
"a temporary kludge - we need a central systemSettings object for this, |
|
3956 |
which can be saved/restored with a single store/read. |
|
3957 |
Will move entries over to UserPreferences over time; |
|
3958 |
new items should always go there." |
|
3959 |
||
3960 |
|fileName resources| |
|
3961 |
||
3962 |
resources := self owningClass classResources. |
|
3963 |
||
3964 |
fileName := Dialog |
|
3965 |
requestFileName:(resources string:'restore settings from:') |
|
3966 |
default:'settings.stx' |
|
3967 |
ok:(resources string:'restore') |
|
3968 |
abort:(resources string:'cancel') |
|
3969 |
pattern:'*.stx' |
|
3970 |
fromDirectory:nil. |
|
3971 |
||
3972 |
(fileName size == 0) ifTrue:[ |
|
3973 |
"/ canceled |
|
3974 |
^ self |
|
3975 |
]. |
|
3976 |
||
3977 |
self withWaitCursorDo:[ |
|
3978 |
Smalltalk fileIn:fileName. |
|
3979 |
||
3980 |
self reopenLauncher. |
|
3981 |
]. |
|
3982 |
||
3983 |
"Modified: / 21.7.1998 / 11:37:54 / cg" |
|
3984 |
! |
|
3985 |
||
3986 |
saveSettings |
|
3987 |
"save settings to a settings-file." |
|
3988 |
||
3989 |
"a temporary kludge - we need a central systemSettings object for this, |
|
3990 |
which can be saved/restored with a single store/read. |
|
3991 |
Will move entries over to UserPreferences over time; |
|
3992 |
new items should always go there." |
|
3993 |
||
3994 |
|fileName resources| |
|
3995 |
||
3996 |
resources := self owningClass classResources. |
|
3997 |
||
3998 |
fileName := Dialog |
|
3999 |
requestFileName:(resources string:'Save settings in:') |
|
4000 |
default:'settings.stx' |
|
4001 |
ok:(resources string:'Save') |
|
4002 |
abort:(resources string:'Cancel') |
|
4003 |
pattern:'*.stx' |
|
4004 |
fromDirectory:'.'. |
|
4005 |
||
4006 |
fileName size ~~ 0 ifTrue:[ |
|
4007 |
"not canceled" |
|
4008 |
self saveSettingsIn:fileName. |
|
4009 |
] |
|
4010 |
! |
|
4011 |
||
4012 |
saveSettingsIn:fileName |
|
4013 |
"save settings to a settings-file." |
|
4014 |
||
4015 |
"a temporary kludge - we need a central systemSettings object for this, |
|
4016 |
which can be saved/restored with a single store/read. |
|
4017 |
Will move entries over to UserPreferences over time; |
|
4018 |
new items should always go there." |
|
4019 |
||
4020 |
|resources s screen currentUserPrefs| |
|
4021 |
||
4022 |
resources := self owningClass classResources. |
|
4023 |
||
4024 |
s := fileName asFilename writeStream. |
|
4025 |
s isNil ifTrue:[ |
|
4026 |
self warn:(resources string:'Cannot write the %1 file !!' with:fileName). |
|
4027 |
^ self |
|
4028 |
]. |
|
4029 |
||
4030 |
currentUserPrefs := UserPreferences current. |
|
4031 |
screen := Screen current. |
|
4032 |
||
4033 |
s nextPutLine:'"/ ST/X saved settings'; |
|
4034 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
4035 |
nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
|
4036 |
nextPutLine:'"/'; |
|
4037 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
4038 |
nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
4039 |
nextPutLine:'"/'. |
|
4040 |
s cr. |
|
4041 |
||
4042 |
s nextPutLine:'"/'. |
|
4043 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
4044 |
s nextPutLine:'"/'. |
|
4045 |
s cr. |
|
4046 |
||
4047 |
s nextPutLine:'"/'. |
|
4048 |
s nextPutLine:'"/ Display settings:'. |
|
4049 |
s nextPutLine:'"/'. |
|
4050 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
4051 |
s nextPutLine:'Display notNil ifTrue:['. |
|
4052 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
4053 |
screen fixColors notNil ifTrue:[ |
|
4054 |
s nextPutLine:' Image flushDeviceImages.'. |
|
4055 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
4056 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
4057 |
s nextPutLine:' ].'. |
|
4058 |
] ifFalse:[ |
|
4059 |
s nextPutLine:' Display releaseFixColors.'. |
|
4060 |
]. |
|
4061 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
4062 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
4063 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
4064 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
4065 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
4066 |
s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
|
4067 |
s nextPutLine:' ].'. |
|
4068 |
s nextPutLine:'].'. |
|
4069 |
s cr. |
|
4070 |
||
4071 |
s nextPutLine:'"/'. |
|
4072 |
s nextPutLine:'"/ Compiler settings:'. |
|
4073 |
s nextPutLine:'"/'. |
|
4074 |
s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
4075 |
nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
4076 |
nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
4077 |
nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
4078 |
nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.'; |
|
4079 |
nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
|
4080 |
nextPutLine:'Compiler allowSqueakExtensions: ' , (Compiler allowSqueakExtensions storeString) , '.'; |
|
4081 |
nextPutLine:'Compiler allowDolphinExtensions: ' , (Compiler allowDolphinExtensions storeString) , '.'; |
|
4082 |
nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
4083 |
nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
4084 |
||
4085 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
4086 |
nextPutLine:'Compiler stcCompilation: ' , (Compiler stcCompilation storeString) , '.'; |
|
4087 |
nextPutLine:'OperatingSystem getOSType = ' , (OperatingSystem getOSType storeString) , ' ifTrue:['; |
|
4088 |
nextPutLine:' Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
4089 |
nextPutLine:' Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
4090 |
nextPutLine:' Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
4091 |
nextPutLine:' ' , (Compiler stcModulePath storeString) , ' asFilename exists ifTrue:['; |
|
4092 |
nextPutLine:' Compiler stcModulePath: ' , (Compiler stcModulePath storeString) , '.'; |
|
4093 |
nextPutLine:' ].'; |
|
4094 |
nextPutLine:' Compiler stcPath: ' , (Compiler stcPath storeString) , '.'; |
|
4095 |
nextPutLine:' Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
4096 |
nextPutLine:' Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
4097 |
nextPutLine:' ObjectFileLoader linkArgs: ' , (ObjectFileLoader linkArgs storeString) , '.'; |
|
4098 |
nextPutLine:' ObjectFileLoader linkCommand: ' , (ObjectFileLoader linkCommand storeString) , '.'; |
|
4099 |
nextPutLine:' ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'; |
|
4100 |
nextPutLine:' ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'; |
|
4101 |
nextPutLine:'].'; |
|
4102 |
||
4103 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
4104 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
4105 |
||
4106 |
HistoryManager notNil ifTrue:[ |
|
4107 |
HistoryManager isActive ifTrue:[ |
|
4108 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
4109 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
4110 |
] ifFalse:[ |
|
4111 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
4112 |
]. |
|
4113 |
]. |
|
4114 |
||
4115 |
ObjectFileLoader notNil ifTrue:[ |
|
4116 |
s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
|
4117 |
s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
4118 |
]. |
|
4119 |
||
4120 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
4121 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
4122 |
||
4123 |
s cr. |
|
4124 |
s nextPutLine:'"/'. |
|
4125 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
4126 |
s nextPutLine:'"/'. |
|
4127 |
s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
4128 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
4129 |
nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
4130 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
4131 |
||
4132 |
FlyByHelp isActive ifTrue:[ |
|
4133 |
s nextPutLine:'FlyByHelp start.' |
|
4134 |
]. |
|
4135 |
||
4136 |
s cr. |
|
4137 |
s nextPutLine:'"/'. |
|
4138 |
s nextPutLine:'"/ Edit settings:'. |
|
4139 |
s nextPutLine:'"/'. |
|
4140 |
"/ s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'. |
|
4141 |
s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'. |
|
4142 |
s nextPutLine:'UserPreferences current syntaxColoring: ' , (currentUserPrefs syntaxColoring storeString) , '.'. |
|
4143 |
(ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[ |
|
4144 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab4Positions).'. |
|
4145 |
] ifFalse:[ |
|
4146 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab8Positions).'. |
|
4147 |
]. |
|
4148 |
||
4149 |
s nextPutLine:'"/'. |
|
4150 |
s nextPutLine:'"/ User preference values:'. |
|
4151 |
s nextPutLine:'"/'. |
|
4152 |
currentUserPrefs keysAndValuesDo:[:k :v | |
|
4153 |
(UserPreferences includesSelector:(k , ':') asSymbol) ifTrue:[ |
|
4154 |
s nextPutLine:'UserPreferences current ' , k , ':' , v storeString , '.'. |
|
4155 |
] ifFalse:[ |
|
4156 |
s nextPutLine:'UserPreferences current at:' , k storeString , ' put:' , v storeString , '.'. |
|
4157 |
] |
|
4158 |
]. |
|
4159 |
||
4160 |
s cr. |
|
4161 |
s nextPutLine:'"/'. |
|
4162 |
s nextPutLine:'"/ Misc settings:'. |
|
4163 |
s nextPutLine:'"/'. |
|
4164 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
4165 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
4166 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
4167 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
4168 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
4169 |
||
4170 |
"/ claus - I dont think its a good idea to save those ... |
|
4171 |
nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
4172 |
nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
4173 |
||
4174 |
nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
|
4175 |
nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
4176 |
nextPutLine:'Display notNil ifTrue:['; |
|
4177 |
nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.'; |
|
4178 |
nextPutLine:'].'; |
|
4179 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
|
4180 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
4181 |
(Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[ |
|
4182 |
s nextPutLine:'Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'. |
|
4183 |
]. |
|
4184 |
Processor isTimeSlicing ifTrue:[ |
|
4185 |
s nextPutLine:'Processor startTimeSlicing.'. |
|
4186 |
s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.'). |
|
4187 |
] ifFalse:[ |
|
4188 |
s nextPutLine:'Processor stopTimeSlicing.'. |
|
4189 |
]. |
|
4190 |
||
4191 |
s cr. |
|
4192 |
s nextPutLine:'"/'. |
|
4193 |
s nextPutLine:'"/ Printer settings:'. |
|
4194 |
s nextPutLine:'"/'. |
|
4195 |
s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
4196 |
nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
4197 |
||
4198 |
Printer supportsPageSizes ifTrue:[ |
|
4199 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
|
4200 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
4201 |
]. |
|
4202 |
Printer supportsMargins ifTrue:[ |
|
4203 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
|
4204 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
4205 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
4206 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
4207 |
]. |
|
4208 |
Printer supportsPostscript ifTrue:[ |
|
4209 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
|
4210 |
]. |
|
4211 |
||
4212 |
s cr. |
|
4213 |
s nextPutLine:'"/'. |
|
4214 |
s nextPutLine:'"/ Font settings:'. |
|
4215 |
s nextPutLine:'"/ (only restored, if image is restarted on the same display)'. |
|
4216 |
s nextPutLine:'"/'. |
|
4217 |
s nextPutLine:'Display notNil ifTrue:['. |
|
4218 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
4219 |
s nextPutLine:' View defaultFont: ' , (View defaultFont storeString) , '.'. |
|
4220 |
s nextPutLine:' Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
|
4221 |
s nextPutLine:' Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
|
4222 |
s nextPutLine:' Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
|
4223 |
s nextPutLine:' SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
|
4224 |
s nextPutLine:' MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
|
4225 |
s nextPutLine:' PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
|
4226 |
s nextPutLine:' TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
|
4227 |
s nextPutLine:' EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
|
4228 |
s nextPutLine:' CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
|
4229 |
s nextPutLine:' ].'. |
|
4230 |
s nextPutLine:'].'. |
|
4231 |
||
4232 |
s cr. |
|
4233 |
s nextPutLine:'"/'. |
|
4234 |
s nextPutLine:'"/ Language setting:'. |
|
4235 |
s nextPutLine:'"/'. |
|
4236 |
s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
4237 |
s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
4238 |
||
4239 |
s cr. |
|
4240 |
s nextPutLine:'"/'. |
|
4241 |
s nextPutLine:'"/ SourceCodeManager settings:'. |
|
4242 |
s nextPutLine:'"/ (only restored, if image is restarted on the same host)'. |
|
4243 |
s nextPutLine:'"/'. |
|
4244 |
s nextPutLine:'OperatingSystem getHostName = ' , (OperatingSystem getHostName storeString) , ' ifTrue:['. |
|
4245 |
s nextPutLine:' Class tryLocalSourceFirst:' , Class tryLocalSourceFirst storeString , '.'. |
|
4246 |
(Smalltalk at:#SourceCodeManager) == CVSSourceCodeManager ifTrue:[ |
|
4247 |
s nextPutLine:' Smalltalk at:#SourceCodeManager put: CVSSourceCodeManager.'. |
|
4248 |
s nextPutLine:' AbstractSourceCodeManager cacheDirectoryName:' , AbstractSourceCodeManager cacheDirectoryName storeString , '.'. |
|
4249 |
s nextPutLine:' CVSSourceCodeManager cvsBinDirectory:' , CVSSourceCodeManager cvsBinDirectory storeString , '.'. |
|
4250 |
s nextPutLine:' CVSSourceCodeManager repositoryNamesPerModule:' , CVSSourceCodeManager repositoryNamesPerModule storeString , '.'. |
|
4251 |
s nextPutLine:' CVSSourceCodeManager initializeForRepository:' , CVSSourceCodeManager repositoryName storeString , '.'. |
|
4252 |
]. |
|
4253 |
s nextPutLine:'].'. |
|
4254 |
||
4255 |
s close. |
|
4256 |
||
4257 |
" |
|
4258 |
Transcript topView application saveSettings |
|
4259 |
" |
|
4260 |
||
4261 |
"Modified: / 6.1.1999 / 14:24:16 / cg" |
|
4262 |
! |
|
4263 |
||
4264 |
sourceAndDebuggerSettings |
|
4265 |
"open a dialog on source&debugger other settings" |
|
4266 |
||
4267 |
|box check butt setupButt logDoits updChanges changeFileName |
|
4268 |
useManager hasManager cvsIsSetup |
|
4269 |
repository repositoryHolder localSourceFirst |
|
4270 |
sourceCacheDir cacheEntry |
|
4271 |
component localCheck oldIndent nm fn manager |
|
4272 |
showErrorNotifier showVerboseStack |
|
4273 |
syntaxColoring fullSelectorCheck autoFormat |
|
4274 |
resources pos currentUserPrefs checkClassesWhenCheckingIn checkClassesBox| |
|
4275 |
||
4276 |
currentUserPrefs := UserPreferences current. |
|
4277 |
||
4278 |
resources := self owningClass classResources. |
|
4279 |
||
4280 |
"/ |
|
4281 |
"/ extract relevant system settings ... |
|
4282 |
"/ |
|
4283 |
logDoits := Smalltalk logDoits asValue. |
|
4284 |
updChanges := Class updatingChanges asValue. |
|
4285 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
4286 |
||
4287 |
(AbstractSourceCodeManager notNil |
|
4288 |
and:[AbstractSourceCodeManager isLoaded not]) ifTrue:[ |
|
4289 |
AbstractSourceCodeManager autoload. |
|
4290 |
]. |
|
4291 |
||
4292 |
hasManager := AbstractSourceCodeManager notNil |
|
4293 |
and:[AbstractSourceCodeManager isLoaded]. |
|
4294 |
||
4295 |
repositoryHolder := '' asValue. |
|
4296 |
hasManager ifTrue:[ |
|
4297 |
useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue. |
|
4298 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
|
4299 |
manager notNil ifTrue:[ |
|
4300 |
manager forgetDisabledModules. |
|
4301 |
repository := manager repositoryName. |
|
4302 |
repository notNil ifTrue:[ |
|
4303 |
repositoryHolder := repository asValue. |
|
4304 |
] ifFalse:[ |
|
4305 |
repositoryHolder := '' asValue. |
|
4306 |
]. |
|
4307 |
]. |
|
4308 |
cvsIsSetup := true. |
|
4309 |
] ifFalse:[ |
|
4310 |
useManager := false. |
|
4311 |
localSourceFirst := false. |
|
4312 |
cvsIsSetup := false. |
|
4313 |
]. |
|
4314 |
cvsIsSetup := cvsIsSetup asValue. |
|
4315 |
showErrorNotifier := (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) asValue. |
|
4316 |
showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue. |
|
4317 |
syntaxColoring := currentUserPrefs syntaxColoring asValue. |
|
4318 |
fullSelectorCheck := currentUserPrefs fullSelectorCheck asValue. |
|
4319 |
autoFormat := currentUserPrefs autoFormatting asValue. |
|
4320 |
||
4321 |
sourceCacheDir := nil asValue. |
|
4322 |
checkClassesWhenCheckingIn := (currentUserPrefs at:#checkClassesWhenCheckingIn ifAbsent:true) asValue. |
|
4323 |
||
4324 |
"/ |
|
4325 |
"/ create a box on those values ... |
|
4326 |
"/ |
|
4327 |
box := DialogBox new. |
|
4328 |
box label:(resources string:'Source & Debugger Settings'). |
|
4329 |
||
4330 |
box addCheckBox:(resources string:'Log compiles in Changefile') on:updChanges. |
|
4331 |
box addCheckBox:(resources string:'Log doIts in Changefile') on:logDoits. |
|
4332 |
||
4333 |
component := box |
|
4334 |
addLabelledInputField:(resources string:'Changefile Name:') |
|
4335 |
adjust:#right |
|
4336 |
on:changeFileName |
|
4337 |
tabable:true |
|
4338 |
separateAtX:0.4. |
|
4339 |
component immediateAccept:true; acceptOnLeave:false. |
|
4340 |
||
4341 |
"/ y := box yPosition. |
|
4342 |
"/ component := box addTextLabel:(resources string:'change file name:'). |
|
4343 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
|
4344 |
"/ box yPosition:y. |
|
4345 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
|
4346 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
|
4347 |
||
4348 |
box addHorizontalLine. |
|
4349 |
||
4350 |
hasManager ifTrue:[ |
|
4351 |
pos := box yPosition. |
|
4352 |
check := box addCheckBox:(resources string:'Sourcecode Management') on:useManager. |
|
4353 |
check enableChannel:cvsIsSetup. |
|
4354 |
box makeTabable:check. |
|
4355 |
||
4356 |
CVSSourceCodeManager notNil ifTrue:[ |
|
4357 |
check width:0.6. |
|
4358 |
box yPosition:pos. |
|
4359 |
setupButt := box addComponent:(Button label:(resources string:'Setup...') |
|
4360 |
action:[|manager| |
|
4361 |
||
4362 |
self cvsConfigurationDialog. |
|
4363 |
manager := (Smalltalk at:#SourceCodeManager). |
|
4364 |
cvsIsSetup value:manager notNil. |
|
4365 |
manager notNil ifTrue:[ |
|
4366 |
repositoryHolder value: manager repositoryName. |
|
4367 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
|
4368 |
]. |
|
4369 |
]). |
|
4370 |
setupButt enableChannel:useManager. |
|
4371 |
box makeTabable:setupButt. |
|
4372 |
setupButt left:0.6; width:0.4. |
|
4373 |
]. |
|
4374 |
oldIndent := box leftIndent. |
|
4375 |
box leftIndent:30. |
|
4376 |
||
4377 |
box addVerticalSpace:10. |
|
4378 |
"/ component := box |
|
4379 |
"/ addLabelledInputField:(resources string:'CVS repository:') |
|
4380 |
"/ adjust:#right |
|
4381 |
"/ on:repositoryHolder |
|
4382 |
"/ tabable:true |
|
4383 |
"/ separateAtX:0.5. |
|
4384 |
"/ component immediateAccept:true; acceptOnLeave:false. |
|
4385 |
"/ component enableChannel:useManager. |
|
4386 |
"/ component readOnly:true. |
|
4387 |
"/ |
|
4388 |
cacheEntry := box |
|
4389 |
addLabelledInputField:(resources string:'Source Cache Dir:') |
|
4390 |
adjust:#right |
|
4391 |
on:sourceCacheDir |
|
4392 |
tabable:true |
|
4393 |
separateAtX:0.5. |
|
4394 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
|
4395 |
cacheEntry enableChannel:useManager. |
|
4396 |
||
4397 |
pos := box yPosition. |
|
4398 |
butt := Button label:(resources string:'Flush Cache now'). |
|
4399 |
butt action:[ box withWaitCursorDo:[ AbstractSourceCodeManager flushSourceCache ] ]. |
|
4400 |
box addComponent:butt tabable:true. |
|
4401 |
butt left:0.6; width:0.4; leftInset:0. |
|
4402 |
butt enableChannel:useManager. |
|
4403 |
||
4404 |
butt := Button label:(resources string:'Condense Cache now'). |
|
4405 |
butt action:[ box withWaitCursorDo:[ AbstractSourceCodeManager condenseSourceCache ] ]. |
|
4406 |
box addComponent:butt tabable:true. |
|
4407 |
butt left:0.6; width:0.4; leftInset:0. |
|
4408 |
butt enableChannel:useManager. |
|
4409 |
||
4410 |
localCheck := box addCheckBox:(resources string:'If Present, Use Local Source (Suppress Checkout)') on:localSourceFirst. |
|
4411 |
localCheck enableChannel:useManager. |
|
4412 |
||
4413 |
checkClassesBox := box addCheckBox:(resources string:'Check for halt/error-Sends when Checking in') on:checkClassesWhenCheckingIn. |
|
4414 |
checkClassesBox enableChannel:useManager. |
|
4415 |
||
4416 |
box leftIndent:oldIndent. |
|
4417 |
||
4418 |
(AbstractSourceCodeManager isNil |
|
4419 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
|
4420 |
useManager value:false. |
|
4421 |
"/ cacheEntry disable. |
|
4422 |
"/ localCheck enable. |
|
4423 |
] ifFalse:[ |
|
4424 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
|
4425 |
]. |
|
4426 |
box addHorizontalLine. |
|
4427 |
]. |
|
4428 |
||
4429 |
pos := box yPosition. |
|
4430 |
check := box addCheckBox:(resources string:'Syntax Coloring') on:syntaxColoring. |
|
4431 |
check width:0.6. |
|
4432 |
box yPosition:pos. |
|
4433 |
butt := box addComponent:(Button label:(resources string:'Configure...') action:[self syntaxColorConfigurationDialog]). |
|
4434 |
box makeTabable:butt. |
|
4435 |
butt enableChannel:syntaxColoring. |
|
4436 |
butt left:0.6; width:0.4. |
|
4437 |
||
4438 |
check := box addCheckBox:(resources string:'Immediate Selector Check') on:fullSelectorCheck. |
|
4439 |
check enableChannel:syntaxColoring. |
|
4440 |
||
4441 |
pos := box yPosition. |
|
4442 |
check := box addCheckBox:(resources string:'Auto Format') on:autoFormat. |
|
4443 |
check width:0.6. |
|
4444 |
box yPosition:pos. |
|
4445 |
butt := box addComponent:(Button label:(resources string:'Configure...') action:[self formattingConfigurationDialog]). |
|
4446 |
box makeTabable:butt. |
|
4447 |
butt left:0.6; width:0.4. |
|
4448 |
||
4449 |
box addHorizontalLine. |
|
4450 |
||
4451 |
||
4452 |
box addCheckBox:(resources string:'Show Error Notifier before Opening Debugger') on:showErrorNotifier. |
|
4453 |
box addCheckBox:(resources string:'Verbose Backtrace by Default in Debugger') on:showVerboseStack. |
|
4454 |
||
4455 |
box addHorizontalLine. |
|
4456 |
box |
|
4457 |
addHelpButtonFor:'Launcher/sourceSettings.html'; |
|
4458 |
addAbortAndOkButtons. |
|
4459 |
||
4460 |
box maxExtent:1000@600. |
|
4461 |
||
4462 |
"/ |
|
4463 |
"/ show the box ... |
|
4464 |
"/ |
|
4465 |
box open. |
|
4466 |
||
4467 |
"/ |
|
4468 |
"/ update system settings |
|
4469 |
"/ |
|
4470 |
box accepted ifTrue:[ |
|
4471 |
Smalltalk logDoits:logDoits value. |
|
4472 |
Class updateChanges:updChanges value. |
|
4473 |
ObjectMemory nameForChanges:changeFileName value. |
|
4474 |
||
4475 |
(hasManager and:[useManager value]) ifTrue:[ |
|
4476 |
manager isNil ifTrue:[ |
|
4477 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager). |
|
4478 |
manager := Smalltalk at:#SourceCodeManager. |
|
4479 |
]. |
|
4480 |
Class tryLocalSourceFirst:(localSourceFirst value). |
|
4481 |
||
4482 |
manager notNil ifTrue:[ |
|
4483 |
"/ localSourceFirst value ifFalse:[ |
|
4484 |
||
4485 |
nm := sourceCacheDir value. |
|
4486 |
nm size > 0 ifTrue:[ |
|
4487 |
(fn := nm asFilename) exists ifFalse:[ |
|
4488 |
(self confirm:('CVS cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[ |
|
4489 |
fn makeDirectory; |
|
4490 |
makeReadableForAll; |
|
4491 |
makeWritableForAll; |
|
4492 |
makeExecutableForAll. |
|
4493 |
] |
|
4494 |
]. |
|
4495 |
(fn exists |
|
4496 |
and:[fn isDirectory |
|
4497 |
and:[fn isReadable |
|
4498 |
and:[fn isWritable]]]) ifTrue:[ |
|
4499 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
|
4500 |
] ifFalse:[ |
|
4501 |
self warn:'Invalid sourceCache directory.' |
|
4502 |
] |
|
4503 |
] |
|
4504 |
"/ ] |
|
4505 |
]. |
|
4506 |
||
4507 |
repositoryHolder notNil ifTrue:[ |
|
4508 |
repositoryHolder value size > 0 ifTrue:[ |
|
4509 |
manager notNil ifTrue:[ |
|
4510 |
manager initializeForRepository:repositoryHolder value. |
|
4511 |
] |
|
4512 |
]. |
|
4513 |
]. |
|
4514 |
] ifFalse:[ |
|
4515 |
Smalltalk at:#SourceCodeManager put:nil |
|
4516 |
]. |
|
4517 |
||
4518 |
showErrorNotifier value ifFalse:[ |
|
4519 |
Exception emergencyHandler:nil |
|
4520 |
] ifTrue:[ |
|
4521 |
Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler) |
|
4522 |
]. |
|
4523 |
DebugView defaultVerboseBacktrace:(showVerboseStack value). |
|
4524 |
currentUserPrefs syntaxColoring:syntaxColoring value. |
|
4525 |
currentUserPrefs at:#fullSelectorCheck put:fullSelectorCheck value. |
|
4526 |
currentUserPrefs autoFormatting:autoFormat value. |
|
4527 |
||
4528 |
UserPreferences current at:#checkClassesWhenCheckingIn put:checkClassesWhenCheckingIn value. |
|
4529 |
]. |
|
4530 |
box destroy |
|
4531 |
||
4532 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
4533 |
"Created: / 17.1.1997 / 17:39:33 / cg" |
|
4534 |
"Modified: / 16.4.1998 / 17:18:47 / ca" |
|
4535 |
"Modified: / 13.10.1998 / 15:47:31 / cg" |
|
4536 |
! |
|
4537 |
||
4538 |
stcCompilerSettings |
|
4539 |
"open an extra dialog on stc-compiler related settings" |
|
4540 |
||
4541 |
|box |
|
4542 |
stcIncludes stcDefines stcOptions |
|
4543 |
stcLibraries stcLibraryPath cc stc ccOptions |
|
4544 |
linkCommand linkArgs |
|
4545 |
component t |
|
4546 |
canLoadBinaries thisIsADemoVersion |
|
4547 |
resources| |
|
4548 |
||
4549 |
resources := self owningClass classResources. |
|
4550 |
||
4551 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
4552 |
||
4553 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
|
4554 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
4555 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
4556 |
ccOptions := Compiler ccCompilationOptions asValue. |
|
4557 |
||
4558 |
cc := Compiler ccPath asValue. |
|
4559 |
stc := Compiler stcPath asValue. |
|
4560 |
linkCommand := ObjectFileLoader linkCommand asValue. |
|
4561 |
linkArgs := ObjectFileLoader linkArgs asValue. |
|
4562 |
||
4563 |
ObjectFileLoader notNil ifTrue:[ |
|
4564 |
(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[ |
|
4565 |
stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue. |
|
4566 |
]. |
|
4567 |
(t := ObjectFileLoader libPath) notNil ifTrue:[ |
|
4568 |
stcLibraryPath := t asValue. |
|
4569 |
] |
|
4570 |
]. |
|
4571 |
||
4572 |
box := DialogBox new. |
|
4573 |
box label:(resources string:'STC Compilation Settings'). |
|
4574 |
||
4575 |
thisIsADemoVersion := (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn'). |
|
4576 |
ObjectFileLoader notNil ifTrue:[ |
|
4577 |
thisIsADemoVersion ifFalse:[ |
|
4578 |
||
4579 |
component := box |
|
4580 |
addLabelledInputField:(resources string:'stc Command:') |
|
4581 |
adjust:#right |
|
4582 |
on:stc |
|
4583 |
tabable:true |
|
4584 |
separateAtX:0.3. |
|
4585 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4586 |
component preferredExtent:(100 @ component preferredExtent y). |
|
4587 |
canLoadBinaries ifFalse:[component disable]. |
|
4588 |
||
4589 |
component := box |
|
4590 |
addLabelledInputField:(resources string:'stc Options:') |
|
4591 |
adjust:#right |
|
4592 |
on:stcOptions |
|
4593 |
tabable:true |
|
4594 |
separateAtX:0.3. |
|
4595 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4596 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4597 |
canLoadBinaries ifFalse:[component disable]. |
|
4598 |
||
4599 |
component := box |
|
4600 |
addLabelledInputField:(resources string:'cc Command:') |
|
4601 |
adjust:#right |
|
4602 |
on:cc |
|
4603 |
tabable:true |
|
4604 |
separateAtX:0.3. |
|
4605 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4606 |
component preferredExtent:(150 @ component preferredExtent y). |
|
4607 |
canLoadBinaries ifFalse:[component disable]. |
|
4608 |
||
4609 |
component := box |
|
4610 |
addLabelledInputField:(resources string:'cc Options:') |
|
4611 |
adjust:#right |
|
4612 |
on:ccOptions |
|
4613 |
tabable:true |
|
4614 |
separateAtX:0.3. |
|
4615 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4616 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4617 |
canLoadBinaries ifFalse:[component disable]. |
|
4618 |
||
4619 |
component := box |
|
4620 |
addLabelledInputField:(resources string:'Include Directories:') |
|
4621 |
adjust:#right |
|
4622 |
on:stcIncludes |
|
4623 |
tabable:true |
|
4624 |
separateAtX:0.3. |
|
4625 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4626 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4627 |
canLoadBinaries ifFalse:[component disable]. |
|
4628 |
||
4629 |
"/ box addVerticalSpace. |
|
4630 |
||
4631 |
component := box |
|
4632 |
addLabelledInputField:(resources string:'Defines:') |
|
4633 |
adjust:#right |
|
4634 |
on:stcDefines |
|
4635 |
tabable:true |
|
4636 |
separateAtX:0.3. |
|
4637 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4638 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4639 |
canLoadBinaries ifFalse:[component disable]. |
|
4640 |
||
4641 |
"/ box addVerticalSpace. |
|
4642 |
||
4643 |
"/ box addVerticalSpace. |
|
4644 |
||
4645 |
component := box |
|
4646 |
addLabelledInputField:(resources string:'Link Command:') |
|
4647 |
adjust:#right |
|
4648 |
on:linkCommand |
|
4649 |
tabable:true |
|
4650 |
separateAtX:0.3. |
|
4651 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4652 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4653 |
canLoadBinaries ifFalse:[component disable]. |
|
4654 |
||
4655 |
component := box |
|
4656 |
addLabelledInputField:(resources string:'Link Args:') |
|
4657 |
adjust:#right |
|
4658 |
on:linkArgs |
|
4659 |
tabable:true |
|
4660 |
separateAtX:0.3. |
|
4661 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4662 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4663 |
canLoadBinaries ifFalse:[component disable]. |
|
4664 |
||
4665 |
stcLibraries notNil ifTrue:[ |
|
4666 |
"/ box addVerticalSpace. |
|
4667 |
||
4668 |
component := box |
|
4669 |
addLabelledInputField:(resources string:'C-libraries:') |
|
4670 |
adjust:#right |
|
4671 |
on:stcLibraries |
|
4672 |
tabable:true |
|
4673 |
separateAtX:0.3. |
|
4674 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4675 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4676 |
canLoadBinaries ifFalse:[component disable]. |
|
4677 |
]. |
|
4678 |
||
4679 |
stcLibraryPath notNil ifTrue:[ |
|
4680 |
"/ box addVerticalSpace. |
|
4681 |
||
4682 |
component := box |
|
4683 |
addLabelledInputField:(resources string:'stc LibPath:') |
|
4684 |
adjust:#right |
|
4685 |
on:stcLibraryPath |
|
4686 |
tabable:true |
|
4687 |
separateAtX:0.3. |
|
4688 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4689 |
component preferredExtent:(250 @ component preferredExtent y). |
|
4690 |
canLoadBinaries ifFalse:[component disable]. |
|
4691 |
]. |
|
4692 |
]. |
|
4693 |
]. |
|
4694 |
||
4695 |
box |
|
4696 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
|
4697 |
addAbortAndOkButtons. |
|
4698 |
||
4699 |
box open. |
|
4700 |
||
4701 |
box accepted ifTrue:[ |
|
4702 |
thisIsADemoVersion ifFalse:[ |
|
4703 |
Compiler stcCompilationIncludes:stcIncludes value. |
|
4704 |
Compiler stcCompilationDefines:stcDefines value. |
|
4705 |
Compiler stcCompilationOptions:stcOptions value. |
|
4706 |
Compiler ccCompilationOptions:ccOptions value. |
|
4707 |
Compiler ccPath:cc value. |
|
4708 |
stc value ~= Compiler stcPath ifTrue:[ |
|
4709 |
Compiler stcPath:stc value |
|
4710 |
]. |
|
4711 |
ObjectFileLoader linkCommand:linkCommand value. |
|
4712 |
ObjectFileLoader linkArgs:linkArgs value. |
|
4713 |
]. |
|
4714 |
||
4715 |
ObjectFileLoader notNil ifTrue:[ |
|
4716 |
stcLibraries notNil ifTrue:[ |
|
4717 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
|
4718 |
]. |
|
4719 |
stcLibraryPath notNil ifTrue:[ |
|
4720 |
ObjectFileLoader libPath:(stcLibraryPath value). |
|
4721 |
] |
|
4722 |
]. |
|
4723 |
]. |
|
4724 |
box destroy |
|
4725 |
||
4726 |
"Modified: / 10.9.1995 / 19:19:18 / claus" |
|
4727 |
"Modified: / 9.9.1996 / 22:42:47 / stefan" |
|
4728 |
"Created: / 2.10.1998 / 16:27:49 / cg" |
|
4729 |
"Modified: / 21.10.1998 / 19:15:10 / cg" |
|
4730 |
! |
|
4731 |
||
4732 |
toolSettings |
|
4733 |
"open a dialog on tool settings" |
|
4734 |
||
4735 |
|box resources currentUserPrefs in acceptChannel |
|
4736 |
useNewInspector useNewChangesBrowser useNewSystemBrowser useNewVersionDiffBrowser |
|
4737 |
useNewFileBrowser showClockInLauncher showClock launcher transcriptBufferSize | |
|
4738 |
||
4739 |
currentUserPrefs := UserPreferences current. |
|
4740 |
||
4741 |
resources := self owningClass classResources. |
|
4742 |
||
4743 |
"/ |
|
4744 |
"/ extract relevant system settings ... |
|
4745 |
"/ |
|
4746 |
useNewInspector := currentUserPrefs useNewInspector asValue. |
|
4747 |
useNewChangesBrowser := currentUserPrefs useNewChangesBrowser asValue. |
|
4748 |
useNewSystemBrowser := currentUserPrefs useNewSystemBrowser asValue. |
|
4749 |
showClockInLauncher := currentUserPrefs showClockInLauncher asValue. |
|
4750 |
useNewVersionDiffBrowser := currentUserPrefs useNewVersionDiffBrowser asValue. |
|
4751 |
useNewFileBrowser := currentUserPrefs useNewFileBrowser asValue. |
|
4752 |
transcriptBufferSize := Transcript current lineLimit printString asValue. |
|
4753 |
||
4754 |
acceptChannel := false asValue. |
|
4755 |
||
4756 |
"/ |
|
4757 |
"/ create a box on those values ... |
|
4758 |
"/ |
|
4759 |
box := DialogBox new. |
|
4760 |
box label:(resources string:'Tool Settings'). |
|
4761 |
||
4762 |
||
4763 |
box addCheckBox:(resources string:'Use the New Changes Browser') on:useNewChangesBrowser. |
|
4764 |
box addHorizontalLine. |
|
4765 |
box addCheckBox:(resources string:'Use the New System Browser') on:useNewSystemBrowser. |
|
4766 |
box addHorizontalLine. |
|
4767 |
box addCheckBox:(resources string:'Use the New VersionDiff Browser') on:useNewVersionDiffBrowser. |
|
4768 |
box addHorizontalLine. |
|
4769 |
(Smalltalk at:#FileBrowserV2) isBehavior ifTrue:[ |
|
4770 |
box addCheckBox:(resources string:'Use the New File Browser') on:useNewFileBrowser. |
|
4771 |
box addHorizontalLine. |
|
4772 |
]. |
|
4773 |
box addCheckBox:(resources string:'Use Hierarchical Inspector') on:useNewInspector. |
|
4774 |
box addHorizontalLine. |
|
4775 |
box addCheckBox:(resources string:'Show Clock in Launcher') on:showClockInLauncher. |
|
4776 |
box addHorizontalLine. |
|
4777 |
in := box |
|
4778 |
addLabelledInputField:(resources string:'Transcripts Buffer Size:') |
|
4779 |
adjust:#right |
|
4780 |
on:transcriptBufferSize |
|
4781 |
tabable:true |
|
4782 |
separateAtX:0.6. |
|
4783 |
in acceptChannel:acceptChannel. |
|
4784 |
box addHorizontalLine. |
|
4785 |
||
4786 |
box |
|
4787 |
addHelpButtonFor:'Launcher/toolSettings.html'; |
|
4788 |
addAbortAndOkButtons. |
|
4789 |
||
4790 |
"/ |
|
4791 |
"/ show the box ... |
|
4792 |
"/ |
|
4793 |
box open. |
|
4794 |
||
4795 |
"/ |
|
4796 |
"/ update system settings |
|
4797 |
"/ |
|
4798 |
box accepted ifTrue:[ |
|
4799 |
acceptChannel value:false; value:true. |
|
4800 |
||
4801 |
currentUserPrefs useNewInspector:useNewInspector value. |
|
4802 |
currentUserPrefs useNewChangesBrowser:useNewChangesBrowser value. |
|
4803 |
currentUserPrefs useNewSystemBrowser:useNewSystemBrowser value. |
|
4804 |
currentUserPrefs useNewVersionDiffBrowser:useNewVersionDiffBrowser value. |
|
4805 |
currentUserPrefs useNewFileBrowser:useNewFileBrowser value. |
|
4806 |
(Smalltalk at:#FileBrowserV2) isBehavior ifTrue:[ |
|
4807 |
useNewFileBrowser value ifTrue:[ |
|
4808 |
FileBrowserV2 installInLauncher. |
|
4809 |
] ifFalse:[ |
|
4810 |
FileBrowserV2 isLoaded ifTrue:[ |
|
4811 |
FileBrowserV2 removeFromLauncher. |
|
4812 |
] |
|
4813 |
]. |
|
4814 |
]. |
|
4815 |
showClock := showClockInLauncher value. |
|
4816 |
currentUserPrefs showClockInLauncher ~= showClock ifTrue:[ |
|
4817 |
currentUserPrefs showClockInLauncher:showClock. |
|
4818 |
launcher := Transcript application. |
|
4819 |
(launcher isKindOf:ToolApplicationModel) ifTrue:[ |
|
4820 |
showClock ifTrue:[ |
|
4821 |
launcher startClock |
|
4822 |
] ifFalse:[ |
|
4823 |
launcher stopClock |
|
4824 |
] |
|
4825 |
] |
|
4826 |
]. |
|
4827 |
||
4828 |
Inspector := currentUserPrefs inspectorClassSetting. |
|
4829 |
||
4830 |
transcriptBufferSize := Integer readFrom:transcriptBufferSize value onError:Transcript current lineLimit. |
|
4831 |
Transcript current lineLimit:transcriptBufferSize. |
|
4832 |
||
4833 |
]. |
|
4834 |
box destroy |
|
4835 |
||
4836 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
4837 |
"Modified: / 16.4.1998 / 17:18:47 / ca" |
|
4838 |
"Created: / 13.10.1998 / 15:44:36 / cg" |
|
4839 |
"Modified: / 12.11.2001 / 15:48:54 / cg" |
|
4840 |
! |
|
4841 |
||
4842 |
viewStyleSettings |
|
4843 |
self viewStyleSettingsFor:nil |
|
4844 |
! |
|
4845 |
||
4846 |
viewStyleSettingsFor:requestor |
|
4847 |
"open a dialog on viewStyle related settings" |
|
4848 |
||
4849 |
|resourceDir dir box |
|
4850 |
list listView scrView infoLabel infoForwarder newStyle |
|
4851 |
someRsrcFile didApply resources listUpdater showStandardStylesOnly standardStyles| |
|
4852 |
||
4853 |
showStandardStylesOnly := true asValue. |
|
4854 |
standardStyles := #( |
|
4855 |
'decWindows' |
|
4856 |
'iris' |
|
4857 |
'motif' |
|
4858 |
'mswindows95' |
|
4859 |
'next' |
|
4860 |
'normal' |
|
4861 |
'os2' |
|
4862 |
'st80' |
|
4863 |
). |
|
4864 |
||
4865 |
resources := self owningClass classResources. |
|
4866 |
||
4867 |
" |
|
4868 |
search resources directory for a list of .style files ... |
|
4869 |
" |
|
4870 |
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style'). |
|
4871 |
someRsrcFile isNil ifTrue:[ |
|
4872 |
someRsrcFile := Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'. |
|
4873 |
someRsrcFile isNil ifTrue:[ |
|
4874 |
someRsrcFile := Smalltalk getResourceFileName:'styles/normal.style' forPackage:'stx:libview'. |
|
4875 |
]. |
|
4876 |
]. |
|
4877 |
someRsrcFile notNil ifTrue:[ |
|
4878 |
resourceDir := someRsrcFile asFilename directoryName |
|
4879 |
] ifFalse:[ |
|
4880 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
|
4881 |
]. |
|
4882 |
||
4883 |
resourceDir isNil ifTrue:[ |
|
4884 |
self warn:'no styles found (missing ''resources'' directory)'. |
|
4885 |
^ self |
|
4886 |
]. |
|
4887 |
dir := resourceDir asFilename directoryContents. |
|
4888 |
||
4889 |
list := SelectionInList new. |
|
4890 |
||
4891 |
listUpdater := [ |
|
4892 |
|listOfStyles lastSelection| |
|
4893 |
||
4894 |
lastSelection := list selection. |
|
4895 |
listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style']. |
|
4896 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name]. |
|
4897 |
Filename isCaseSensitive ifFalse:[ |
|
4898 |
listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase]. |
|
4899 |
]. |
|
4900 |
listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil. |
|
4901 |
showStandardStylesOnly value ifTrue:[ |
|
4902 |
listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName]. |
|
4903 |
]. |
|
4904 |
||
4905 |
listOfStyles sort. |
|
4906 |
list list:listOfStyles. |
|
4907 |
list selection:lastSelection. |
|
4908 |
]. |
|
4909 |
listUpdater value. |
|
4910 |
||
4911 |
showStandardStylesOnly onChangeEvaluate:listUpdater. |
|
4912 |
||
4913 |
infoForwarder := [ |
|
4914 |
|nm sheet comment| |
|
4915 |
||
4916 |
comment := ''. |
|
4917 |
nm := list selection. |
|
4918 |
nm notNil ifTrue:[ |
|
4919 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
4920 |
comment := (sheet at:#comment ifAbsent:'') withoutSeparators. |
|
4921 |
]. |
|
4922 |
comment := comment withCRs asStringCollection. |
|
4923 |
comment size == 1 ifTrue:[ |
|
4924 |
comment := comment first |
|
4925 |
]. |
|
4926 |
infoLabel label:comment |
|
4927 |
]. |
|
4928 |
||
4929 |
list onChangeEvaluate:infoForwarder. |
|
4930 |
||
4931 |
box := Dialog new. |
|
4932 |
box label:(resources string:'Style Selection'). |
|
4933 |
||
4934 |
(box addTextLabel:(resources at:'STYLE_MSG' default:'Select a Style') withCRs) adjust:#left. |
|
4935 |
listView := SelectionInListView on:list. |
|
4936 |
listView doubleClickAction:[:sel | box acceptChannel value:true. box hide]. |
|
4937 |
box addCheckBox:(resources string:'standard styles only') on:showStandardStylesOnly. |
|
4938 |
scrView := box addComponent:(ScrollableView forView:listView) tabable:true. |
|
4939 |
||
4940 |
box addVerticalSpace. |
|
4941 |
||
4942 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
|
4943 |
||
4944 |
box addAbortAndOkButtons. |
|
4945 |
"/ mhmh - the newLauncher does not yet handle apply (without close) correctly |
|
4946 |
"/ b := box addButton:(Button label:(resources string:'apply')). |
|
4947 |
"/ b action:[didApply := true. requestor changeViewStyleTo:(list selection)]. |
|
4948 |
||
4949 |
(standardStyles includes:View defaultStyle) ifFalse:[ |
|
4950 |
showStandardStylesOnly value:false |
|
4951 |
]. |
|
4952 |
list selection:(View defaultStyle). |
|
4953 |
||
4954 |
box stickAtBottomWithVariableHeight:scrView. |
|
4955 |
box stickAtBottomWithFixHeight:infoLabel. |
|
4956 |
didApply := false. |
|
4957 |
box open. |
|
4958 |
||
4959 |
box destroy. |
|
4960 |
box accepted ifTrue:[ |
|
4961 |
((newStyle := list selection) ~= View defaultStyle |
|
4962 |
or:[didApply ~~ true]) ifTrue:[ |
|
4963 |
requestor notNil ifTrue:[requestor changeViewStyleTo:newStyle]. |
|
4964 |
]. |
|
4965 |
]. |
|
4966 |
||
4967 |
" |
|
4968 |
self viewStyleSettingsFor:nil |
|
4969 |
" |
|
4970 |
||
4971 |
"Modified: / 14.9.1998 / 20:33:59 / cg" |
|
2001 | 4972 |
! ! |
4973 |
||
4974 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs - file'! |
|
4975 |
||
4244 | 4976 |
objectModuleDialog |
4977 |
"opens a moduleInfo dialog" |
|
4978 |
||
4979 |
<resource: #programMenu > |
|
4980 |
||
4981 |
|allModules moduleNames |
|
4982 |
allObjects methodObjects methodNames |
|
4983 |
cObjects cObjectNames |
|
4984 |
otherObjects otherObjectNames |
|
4985 |
box l handles unloadButton unloadAndRemoveButton |
|
4986 |
list1 list2 listView1 listView2 |
|
4987 |
y panel |
|
4988 |
showBuiltIn showModules showMethods showCObjects showOthers |
|
4989 |
moduleListUpdater check canDoIt menu |
|
4990 |
resources middleLabel| |
|
4991 |
||
4992 |
resources := self owningClass classResources. |
|
4993 |
||
4994 |
showBuiltIn := true asValue. |
|
4995 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
4996 |
||
4997 |
showModules := canDoIt asValue. |
|
4998 |
showMethods := canDoIt asValue. |
|
4999 |
showCObjects := canDoIt asValue. |
|
5000 |
showOthers := canDoIt asValue. |
|
5001 |
||
5002 |
list1 := SelectionInList new. |
|
5003 |
list2 := SelectionInList new. |
|
5004 |
||
5005 |
moduleListUpdater := [ |
|
5006 |
|l| |
|
5007 |
||
5008 |
list2 list:nil. |
|
5009 |
||
5010 |
l := Array new. |
|
5011 |
handles := Array new. |
|
5012 |
||
5013 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
5014 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
5015 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
5016 |
allModules := allModules select:[:i | |
|
5017 |
|wantToSee| |
|
5018 |
||
5019 |
wantToSee := i dynamic. |
|
5020 |
showBuiltIn value ifTrue:[ |
|
5021 |
wantToSee := wantToSee not |
|
5022 |
]. |
|
5023 |
wantToSee |
|
5024 |
] |
|
5025 |
]. |
|
5026 |
||
5027 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
5028 |
allModules sort:[:a :b | (a id) > (b id)]. |
|
5029 |
moduleNames := allModules collect:[:entry | entry name]. |
|
5030 |
l := l , moduleNames. |
|
5031 |
handles := handles , allModules. |
|
5032 |
]. |
|
5033 |
||
5034 |
showMethods value ifTrue:[ |
|
5035 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
5036 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
5037 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
5038 |
'compiled method - removed' " , ' (in ' , mH pathName , ')' " |
|
5039 |
] ifFalse:[ |
|
5040 |
'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' " |
|
5041 |
]. |
|
5042 |
]. |
|
5043 |
l := l , methodNames. |
|
5044 |
handles := handles , methodObjects. |
|
5045 |
]. |
|
5046 |
||
5047 |
showCObjects value ifTrue:[ |
|
5048 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
5049 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
|
5050 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
|
5051 |
l := l , cObjectNames. |
|
5052 |
handles := handles , cObjects. |
|
5053 |
]. |
|
5054 |
||
5055 |
showOthers value ifTrue:[ |
|
5056 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
5057 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
|
5058 |
or:[h isMethodHandle |
|
5059 |
or:[h isClassLibHandle]]) not]) asArray. |
|
5060 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
|
5061 |
l := l , otherObjectNames. |
|
5062 |
handles := handles , otherObjects. |
|
5063 |
]. |
|
5064 |
||
5065 |
showBuiltIn value ifTrue:[ |
|
5066 |
l := #('VM') , l. |
|
5067 |
handles := #(VM) , handles. |
|
5068 |
allModules := #(VM) , allModules. |
|
5069 |
]. |
|
5070 |
||
5071 |
list1 list:l. |
|
5072 |
unloadButton disable. |
|
5073 |
unloadAndRemoveButton disable. |
|
5074 |
]. |
|
5075 |
||
5076 |
showBuiltIn onChangeEvaluate:moduleListUpdater. |
|
5077 |
showModules onChangeEvaluate:moduleListUpdater. |
|
5078 |
showMethods onChangeEvaluate:moduleListUpdater. |
|
5079 |
showCObjects onChangeEvaluate:moduleListUpdater. |
|
5080 |
showOthers onChangeEvaluate:moduleListUpdater. |
|
5081 |
||
5082 |
box := Dialog new. |
|
5083 |
box label:(resources string:'ST/X & Module Version information'). |
|
5084 |
||
5085 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
5086 |
listView1 model:list1. |
|
5087 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
5088 |
listView1 action:[:sel | |
|
5089 |
|info classNames tabs module| |
|
5090 |
||
5091 |
listView1 middleButtonMenu:nil. |
|
5092 |
||
5093 |
box withWaitCursorDo:[ |
|
5094 |
|nm fileName addr entry1 entry2 entry3 method l| |
|
5095 |
||
5096 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6 3.5). |
|
5097 |
||
5098 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
5099 |
info := allModules at:sel ifAbsent:nil. |
|
5100 |
]. |
|
5101 |
info isNil ifTrue:[ |
|
5102 |
"/ selected a method, cObject or unknown |
|
5103 |
||
5104 |
module := handles at:sel. |
|
5105 |
fileName := module pathName. |
|
5106 |
||
5107 |
module isMethodHandle ifTrue:[ |
|
5108 |
middleLabel label:'contains method:'. |
|
5109 |
||
5110 |
(method := module method) isNil ifTrue:[ |
|
5111 |
nm := '** removed **'. |
|
5112 |
] ifFalse:[ |
|
5113 |
menu := PopUpMenu |
|
5114 |
labels:#('inspect' 'browse') |
|
5115 |
selectors:#(inspect browse). |
|
5116 |
menu actionAt:#inspect put:[ method inspect ]. |
|
5117 |
menu actionAt:#browse put:[ |who| |
|
5118 |
who := method who. |
|
5119 |
UserPreferences systemBrowserClass |
|
5120 |
openInClass:(who methodClass) |
|
5121 |
selector:(who methodSelector) |
|
5122 |
]. |
|
5123 |
listView1 middleButtonMenu:menu. |
|
5124 |
||
5125 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
|
5126 |
]. |
|
5127 |
entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5128 |
entry1 colAt:1 put:'compiled method'; colAt:2 put:nm. |
|
5129 |
||
5130 |
entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5131 |
entry2 colAt:1 put:'path'; colAt:2 put:fileName. |
|
5132 |
||
5133 |
entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5134 |
entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)). |
|
5135 |
||
5136 |
list2 list:(Array with:entry1 with:entry2 with:entry3). |
|
5137 |
] ifFalse:[ |
|
5138 |
(module isFunctionObjectHandle |
|
5139 |
and:[module functions notEmpty]) ifTrue:[ |
|
5140 |
middleLabel label:'contains function:'. |
|
5141 |
||
5142 |
menu := PopUpMenu |
|
5143 |
labels:#('inspect') |
|
5144 |
selectors:#(inspect). |
|
5145 |
menu actionAt:#inspect put:[ module functions inspect ]. |
|
5146 |
listView1 middleButtonMenu:menu. |
|
5147 |
||
5148 |
list2 list:((module functions select:[:f | f notNil]) |
|
5149 |
collect:[:f | |entry| |
|
5150 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5151 |
entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)). |
|
5152 |
entry colAt:2 put:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)). |
|
5153 |
entry |
|
5154 |
]). |
|
5155 |
] ifFalse:[ |
|
5156 |
list2 list:#('nothing known about contents (no functions have been extracted)'). |
|
5157 |
] |
|
5158 |
]. |
|
5159 |
||
5160 |
unloadButton enable. |
|
5161 |
unloadAndRemoveButton disable. |
|
5162 |
] ifFalse:[ |
|
5163 |
info == #VM ifTrue:[ |
|
5164 |
"/ dummy entry for VM; |
|
5165 |
"/ show file versions in lower view. |
|
5166 |
||
5167 |
middleLabel label:'contains modules:'. |
|
5168 |
l := (ObjectMemory getVMIdentificationStrings). |
|
5169 |
l := l select:[:entry | entry includesString:'$Header']. |
|
5170 |
l := l select:[:entry | entry includesString:',v']. |
|
5171 |
l := l collect:[:entry | |
|
5172 |
|i1 i2 file revision date listEntry| |
|
5173 |
||
5174 |
listEntry := MultiColListEntry new:3 tabulatorSpecification:tabs. |
|
5175 |
||
5176 |
i1 := entry indexOfSubCollection:'librun'. |
|
5177 |
i1 ~~ 0 ifTrue:[ |
|
5178 |
i2 := entry indexOfSubCollection:',v' startingAt:i1. |
|
5179 |
i2 ~~ 0 ifTrue:[ |
|
5180 |
file := entry copyFrom:i1+7 to:(i2-1). |
|
5181 |
listEntry colAt:1 put:file. |
|
5182 |
||
5183 |
i1 := i2+3. |
|
5184 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
5185 |
revision := entry copyFrom:i1 to:(i2-1). |
|
5186 |
listEntry colAt:2 put:revision. |
|
5187 |
||
5188 |
i1 := i2+1. |
|
5189 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
5190 |
date := entry copyFrom:i1 to:(i2-1). |
|
5191 |
listEntry colAt:3 put:date. |
|
5192 |
]. |
|
5193 |
]. |
|
5194 |
listEntry. |
|
5195 |
"/ entry |
|
5196 |
]. |
|
5197 |
list2 list:l. |
|
5198 |
||
5199 |
unloadButton disable. |
|
5200 |
unloadAndRemoveButton disable. |
|
5201 |
] ifFalse:[ |
|
5202 |
"/ selected a package |
|
5203 |
||
5204 |
"/ fill bottom list with class-info |
|
5205 |
||
5206 |
middleLabel label:'contains classes:'. |
|
5207 |
classNames := info classNames asSortedCollection. |
|
5208 |
classNames := classNames select:[:cName | |
|
5209 |
|cls| |
|
5210 |
||
5211 |
cls := Smalltalk classNamed:cName. |
|
5212 |
cls isNil ifTrue:[ |
|
5213 |
true "a removed class" |
|
5214 |
] ifFalse:[ |
|
5215 |
cls isPrivate not |
|
5216 |
]. |
|
5217 |
]. |
|
5218 |
||
5219 |
classNames := classNames collect:[:cName | |
|
5220 |
|cls entry rev listEntry| |
|
5221 |
||
5222 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5223 |
listEntry colAt:1 put:cName. |
|
5224 |
||
5225 |
cls := Smalltalk classNamed:cName. |
|
5226 |
cls isNil ifTrue:[ |
|
5227 |
listEntry colAt:2 put:'(class removed)'. |
|
5228 |
] ifFalse:[ |
|
5229 |
rev := cls binaryRevision. |
|
5230 |
rev notNil ifTrue:[ |
|
5231 |
cls isLoaded ifFalse:[ |
|
5232 |
entry := '(stub for: ' , rev. |
|
5233 |
] ifTrue:[ |
|
5234 |
entry :='(bin: ' , rev. |
|
5235 |
]. |
|
5236 |
cls revision ~= rev ifTrue:[ |
|
5237 |
entry := entry , ' / src: ' , (cls revision printString) |
|
5238 |
]. |
|
5239 |
listEntry colAt:2 put:entry , ')' |
|
5240 |
] ifFalse:[ |
|
5241 |
cls revision notNil ifTrue:[ |
|
5242 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
|
5243 |
] |
|
5244 |
] |
|
5245 |
]. |
|
5246 |
listEntry |
|
5247 |
]. |
|
5248 |
list2 list:classNames. |
|
5249 |
info dynamic ifTrue:[ |
|
5250 |
unloadButton enable. |
|
5251 |
unloadAndRemoveButton enable. |
|
5252 |
] ifFalse:[ |
|
5253 |
unloadButton disable. |
|
5254 |
unloadAndRemoveButton disable. |
|
5255 |
]. |
|
5256 |
]. |
|
5257 |
] |
|
5258 |
] |
|
5259 |
]. |
|
5260 |
||
5261 |
||
5262 |
panel := HorizontalPanelView new. |
|
5263 |
||
5264 |
panel add:(l := Label label:'show:'). |
|
5265 |
l adjust:#left; borderWidth:0. |
|
5266 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
|
5267 |
box makeTabable:check. |
|
5268 |
panel add:(check := CheckBox label:'classLibs' model:showModules). |
|
5269 |
canDoIt ifFalse:[ |
|
5270 |
check disable |
|
5271 |
] ifTrue:[ |
|
5272 |
box makeTabable:check. |
|
5273 |
]. |
|
5274 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
|
5275 |
canDoIt ifFalse:[ |
|
5276 |
check disable |
|
5277 |
] ifTrue:[ |
|
5278 |
box makeTabable:check. |
|
5279 |
]. |
|
5280 |
panel add:(check := CheckBox label:'c-objects' model:showCObjects). |
|
5281 |
canDoIt ifFalse:[ |
|
5282 |
check disable |
|
5283 |
] ifTrue:[ |
|
5284 |
box makeTabable:check. |
|
5285 |
]. |
|
5286 |
panel add:(check := CheckBox label:'others' model:showOthers). |
|
5287 |
canDoIt ifFalse:[ |
|
5288 |
check disable |
|
5289 |
] ifTrue:[ |
|
5290 |
box makeTabable:check. |
|
5291 |
]. |
|
5292 |
||
5293 |
panel horizontalLayout:#fitSpace. |
|
5294 |
"/ panel horizontalLayout:#leftSpace. |
|
5295 |
||
5296 |
box addComponent:panel tabable:false. |
|
5297 |
||
5298 |
box addVerticalSpace. |
|
5299 |
box addComponent:listView1 tabable:true. |
|
5300 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
5301 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
5302 |
||
5303 |
l := box addTextLabel:(resources string:'contains:'). |
|
5304 |
l adjust:#left; borderWidth:0. |
|
5305 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
5306 |
l topInset:(View viewSpacing). |
|
5307 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
5308 |
middleLabel := l. |
|
5309 |
||
5310 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
5311 |
listView2 model:list2; printItems:false. |
|
5312 |
box addComponent:listView2 tabable:true. |
|
5313 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
5314 |
listView2 disable. |
|
5315 |
||
5316 |
unloadButton := Button label:(resources string:'unload'). |
|
5317 |
unloadButton action:[ |
|
5318 |
box withWaitCursorDo:[ |
|
5319 |
|info idx pathName| |
|
5320 |
||
5321 |
idx := list1 selectionIndex. |
|
5322 |
info := allModules at:idx ifAbsent:nil. |
|
5323 |
||
5324 |
list1 selectionIndex:nil. |
|
5325 |
||
5326 |
info isNil ifTrue:[ |
|
5327 |
"/ selected a method |
|
5328 |
"/ idx := idx - allModules size. |
|
5329 |
pathName := (handles at:idx) pathName. |
|
5330 |
||
5331 |
] ifFalse:[ |
|
5332 |
"/ selected a package |
|
5333 |
pathName := info pathName. |
|
5334 |
]. |
|
5335 |
ObjectFileLoader unloadObjectFile:pathName. |
|
5336 |
moduleListUpdater value. |
|
5337 |
unloadButton disable. |
|
5338 |
] |
|
5339 |
]. |
|
5340 |
||
5341 |
unloadAndRemoveButton := Button label:(resources string:'remove classes & unload'). |
|
5342 |
unloadAndRemoveButton action:[ |
|
5343 |
box withWaitCursorDo:[ |
|
5344 |
|info idx pathName| |
|
5345 |
||
5346 |
idx := list1 selectionIndex. |
|
5347 |
info := allModules at:idx ifAbsent:nil. |
|
5348 |
||
5349 |
list1 selectionIndex:nil. |
|
5350 |
||
5351 |
info isNil ifTrue:[ |
|
5352 |
"/ selected a method |
|
5353 |
"/ idx := idx - allModules size. |
|
5354 |
pathName := (handles at:idx) pathName. |
|
5355 |
||
5356 |
] ifFalse:[ |
|
5357 |
"/ selected a package |
|
5358 |
pathName := info pathName. |
|
5359 |
]. |
|
5360 |
ObjectFileLoader unloadObjectFileAndRemoveClasses:pathName. |
|
5361 |
moduleListUpdater value. |
|
5362 |
unloadAndRemoveButton disable. |
|
5363 |
] |
|
5364 |
]. |
|
5365 |
||
5366 |
moduleListUpdater value. |
|
5367 |
||
5368 |
box addButton:unloadButton. |
|
5369 |
box addButton:unloadAndRemoveButton. |
|
5370 |
box addAbortButtonLabelled:(resources string:'dismiss'). |
|
5371 |
||
5372 |
y := box yPosition. |
|
5373 |
listView2 topInset:(l preferredExtent y + 5). |
|
5374 |
listView2 bottomInset:(box preferredExtent y - y). |
|
5375 |
||
5376 |
box width:(400 min:(box device width * 2 // 3)); |
|
5377 |
height:(450 min:(box device height - 50)). |
|
5378 |
||
5379 |
"/ box sizeFixed:true. |
|
5380 |
box openWithExtent:(600 min:(box device width * 2 // 3)) |
|
5381 |
@ |
|
5382 |
(500 min:(box device height - 50)) . |
|
5383 |
||
5384 |
box destroy. |
|
5385 |
||
5386 |
"Modified: / 17.9.1995 / 16:47:50 / claus" |
|
5387 |
"Created: / 31.7.1998 / 15:49:45 / cg" |
|
5388 |
"Modified: / 10.8.1998 / 11:33:22 / cg" |
|
5389 |
! |
|
5390 |
||
5391 |
packageDialog |
|
5392 |
"opens a package dialog" |
|
5393 |
||
5394 |
|allPackages packageList packageUpdater |
|
5395 |
box listView tabs |
|
5396 |
menu resources selectedPackage| |
|
5397 |
||
5398 |
resources := self owningClass classResources. |
|
5399 |
||
5400 |
box := Dialog new. |
|
5401 |
box label:(resources string:'Packages'). |
|
5402 |
||
5403 |
allPackages := Set new. |
|
5404 |
allPackages addAll:(Smalltalk knownPackages). |
|
5405 |
||
5406 |
Project knownProjects do:[:package | |
|
5407 |
allPackages add:(package name) |
|
5408 |
]. |
|
5409 |
Project loadedProjects do:[:package | |
|
5410 |
allPackages add:(package name) |
|
5411 |
]. |
|
5412 |
allPackages := allPackages asOrderedCollection sort. |
|
5413 |
||
5414 |
packageUpdater := [ |
|
5415 |
tabs := TabulatorSpecification unit:#inch positions:#(0 4). |
|
5416 |
packageList := allPackages collect:[:pName | |pkg entry| |
|
5417 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
5418 |
pkg := Project projectWithId:pName asSymbol. |
|
5419 |
(pkg notNil and:[pkg isLoaded]) ifTrue:[ |
|
5420 |
entry colAt:1 put:pName allBold. |
|
5421 |
entry colAt:2 put:'loaded'. |
|
5422 |
] ifFalse:[ |
|
5423 |
entry colAt:1 put:pName. |
|
5424 |
||
5425 |
(Smalltalk allClasses |
|
5426 |
contains:[:cls | cls package = pName and:[cls isLoaded not]]) |
|
5427 |
ifTrue:[ |
|
5428 |
(Smalltalk allClasses |
|
5429 |
contains:[:cls | cls package = pName and:[cls isLoaded]]) |
|
5430 |
ifTrue:[ |
|
5431 |
entry colAt:2 put:'loaded/autoloaded'. |
|
5432 |
] ifFalse:[ |
|
5433 |
entry colAt:2 put:'autoloaded'. |
|
5434 |
] |
|
5435 |
] |
|
5436 |
]. |
|
5437 |
entry |
|
5438 |
]. |
|
5439 |
]. |
|
5440 |
packageUpdater value. |
|
5441 |
||
5442 |
listView := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
5443 |
listView list:packageList. |
|
5444 |
||
5445 |
box addComponent:listView tabable:true. |
|
5446 |
listView origin:0.0@0.0 corner:1.0@1.0. |
|
5447 |
listView bottomInset:40. |
|
5448 |
listView action:[:selIndex | |pkg| |
|
5449 |
selectedPackage := (allPackages at:selIndex) asSymbol. |
|
5450 |
||
5451 |
pkg := Project projectWithId:selectedPackage. |
|
5452 |
(pkg notNil and:[pkg isLoaded]) ifTrue:[ |
|
5453 |
menu disable:#load. |
|
5454 |
"/ menu enable:#unload. |
|
5455 |
] ifFalse:[ |
|
5456 |
"/ menu disable:#unload. |
|
5457 |
menu enable:#load. |
|
5458 |
] |
|
5459 |
]. |
|
5460 |
||
5461 |
menu := PopUpMenu |
|
5462 |
itemList:#( |
|
5463 |
('load...' load ) |
|
5464 |
"/ ('-' nil ) |
|
5465 |
"/ ('unload...' unload) |
|
5466 |
) |
|
5467 |
resources:resources. |
|
5468 |
listView middleButtonMenu:menu. |
|
5469 |
menu actionAt:#load put:[ |
|
5470 |
box withWaitCursorDo:[ |
|
5471 |
Smalltalk loadPackage:selectedPackage. |
|
5472 |
packageUpdater value. |
|
5473 |
] |
|
5474 |
]. |
|
5475 |
"/ menu actionAt:#unload put:[ |
|
5476 |
"/ box withWaitCursorDo:[ |
|
5477 |
"/ Smalltalk unloadPackage:selectedPackage. |
|
5478 |
"/ packageUpdater value. |
|
5479 |
"/ ]. |
|
5480 |
"/ ]. |
|
5481 |
menu disable:#load. |
|
5482 |
"/ menu disable:#unload. |
|
5483 |
||
5484 |
box addAbortButtonLabelled:(resources string:'dismiss'). |
|
5485 |
||
5486 |
box width:(400 min:(box device width * 2 // 3)); |
|
5487 |
height:(450 min:(box device height - 50)). |
|
5488 |
||
5489 |
box openWithExtent:(600 min:(box device width * 2 // 3)) |
|
5490 |
@ |
|
5491 |
(500 min:(box device height - 50)) . |
|
5492 |
||
5493 |
box destroy. |
|
2001 | 5494 |
! ! |
5495 |
||
2884
587baa691c68
fixes & adds for multiple CVSRoots
Claus Gittinger <cg@exept.de>
parents:
2883
diff
changeset
|
5496 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs - private'! |
2001 | 5497 |
|
4244 | 5498 |
cvsConfigurationDialog |
5499 |
|cvsRootHolder resources defaultsList bindings dialog |
|
5500 |
listOfModules selectedPerModuleRoot rootsPerModule acceptChannel |
|
5501 |
removeEnabled cvsBinDirectoryHolder| |
|
5502 |
||
5503 |
resources := self owningClass classResources. |
|
5504 |
||
5505 |
OperatingSystem isUNIXlike ifTrue:[ |
|
5506 |
defaultsList := #( |
|
5507 |
'/files/CVS' |
|
5508 |
'/CVS' |
|
5509 |
'host:/files/CVS' |
|
5510 |
'host:/CVS' |
|
5511 |
':pserver:user@host:/files/CVS' |
|
5512 |
). |
|
5513 |
] ifFalse:[ |
|
5514 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
5515 |
defaultsList := #( |
|
5516 |
':local:c:\files\CVS' |
|
5517 |
':local:c:\CVS' |
|
5518 |
'host:/files/CVS' |
|
5519 |
'host:/CVS' |
|
5520 |
':pserver:user@host:/files/CVS' |
|
5521 |
). |
|
5522 |
] ifFalse:[ |
|
5523 |
defaultsList := #('host:/files/CVS' 'host:/CVS' ':pserver:user@host:/files/CVS'). |
|
5524 |
] |
|
5525 |
]. |
|
5526 |
||
5527 |
cvsRootHolder := CVSSourceCodeManager repositoryName ? '/files/CVS'. |
|
5528 |
cvsRootHolder := cvsRootHolder asValue. |
|
5529 |
rootsPerModule := Dictionary new declareAllFrom:(CVSSourceCodeManager repositoryNamesPerModule). |
|
5530 |
cvsBinDirectoryHolder := CVSSourceCodeManager cvsBinDirectory asValue. |
|
5531 |
||
5532 |
bindings := IdentityDictionary new. |
|
5533 |
bindings at:#acceptChannel put:(acceptChannel := TriggerValue new). |
|
5534 |
||
5535 |
bindings at:#cvsRootPrototypeList put:defaultsList. |
|
5536 |
bindings at:#cvsRootHolder put:cvsRootHolder. |
|
5537 |
bindings at:#perModuleRootModule put:nil asValue. |
|
5538 |
bindings at:#perModuleRoot put:nil asValue. |
|
5539 |
bindings at:#removeEnabled put:(removeEnabled := false asValue). |
|
5540 |
bindings at:#listOfModules put:(listOfModules := rootsPerModule keys asList). |
|
5541 |
bindings at:#cvsBinDirectoryHolder put:cvsBinDirectoryHolder. |
|
5542 |
listOfModules sort. |
|
5543 |
||
5544 |
bindings at:#selectedPerModuleRoot put:(selectedPerModuleRoot := nil asValue). |
|
5545 |
selectedPerModuleRoot |
|
5546 |
onChangeEvaluate:[ |
|
5547 |
|module cvsRoot| |
|
5548 |
||
5549 |
acceptChannel value:true. |
|
5550 |
module := selectedPerModuleRoot value. |
|
5551 |
removeEnabled value:true. |
|
5552 |
cvsRoot := rootsPerModule at:module ifAbsent:''. |
|
5553 |
(bindings at:#perModuleRootModule) value:module. |
|
5554 |
(bindings at:#perModuleRoot) value:cvsRoot. |
|
5555 |
]. |
|
5556 |
||
5557 |
bindings at:#help put:[ |
|
5558 |
WindowGroup activeGroup withWaitCursorDo:[ |
|
5559 |
HTMLDocumentView openFullOnHelpFile:'Launcher/cvsSetup.html' |
|
5560 |
] |
|
5561 |
]. |
|
5562 |
||
5563 |
bindings at:#addPerModuleRoot put:[ |
|
5564 |
|module cvsRoot| |
|
5565 |
||
5566 |
acceptChannel value:true. |
|
5567 |
module := (bindings at:#perModuleRootModule) value. |
|
5568 |
cvsRoot := (bindings at:#perModuleRoot) value. |
|
5569 |
(listOfModules includes:module) ifFalse:[ |
|
5570 |
listOfModules add:module. |
|
5571 |
listOfModules sort. |
|
5572 |
]. |
|
5573 |
cvsRoot size > 0 ifTrue:[ |
|
5574 |
rootsPerModule at:module put:cvsRoot. |
|
5575 |
]. |
|
5576 |
]. |
|
5577 |
bindings at:#removePerModuleRoot put:[ |
|
5578 |
|module| |
|
5579 |
||
5580 |
acceptChannel value:true. |
|
5581 |
module := (bindings at:#perModuleRootModule) value. |
|
5582 |
listOfModules remove:module ifAbsent:nil. |
|
5583 |
rootsPerModule removeKey:module ifAbsent:nil. |
|
5584 |
(bindings at:#perModuleRootModule) value:nil. |
|
5585 |
(bindings at:#perModuleRoot) value:nil. |
|
5586 |
]. |
|
5587 |
||
5588 |
dialog := SimpleDialog new. |
|
5589 |
dialog resources:resources. |
|
5590 |
(dialog openSpec:(self cvsSetupSpec) withBindings:bindings) ifFalse:[ |
|
5591 |
^ self |
|
5592 |
]. |
|
5593 |
||
5594 |
acceptChannel value. |
|
5595 |
||
5596 |
"/ |
|
5597 |
"/ update system settings |
|
5598 |
"/ |
|
5599 |
CVSSourceCodeManager cvsBinDirectory:cvsBinDirectoryHolder value. |
|
5600 |
CVSSourceCodeManager initializeForRepository:cvsRootHolder value. |
|
5601 |
CVSSourceCodeManager repositoryNamesPerModule:rootsPerModule. |
|
5602 |
! |
|
5603 |
||
5604 |
fontBoxForEncoding:encodingMatch |
|
5605 |
"open a fontBox, showing fonts which match some encoding |
|
5606 |
(used when changing to japanese ...)" |
|
5607 |
||
5608 |
|box y b |
|
5609 |
labelDef buttonDef listDef menuDef textDef |
|
5610 |
models labels allOfThem filter resources defaultButton| |
|
5611 |
||
5612 |
resources := self owningClass classResources. |
|
5613 |
||
5614 |
encodingMatch notNil ifTrue:[ |
|
5615 |
filter := [:f | f encoding notNil |
|
5616 |
and:[encodingMatch match:f encoding]]. |
|
5617 |
]. |
|
5618 |
||
5619 |
models := OrderedCollection new. |
|
5620 |
labels := OrderedCollection new. |
|
5621 |
||
5622 |
models add:(allOfThem := nil asValue). |
|
5623 |
models add:(labelDef := Label defaultFont asValue). |
|
5624 |
models add:(buttonDef := Button defaultFont asValue). |
|
5625 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
5626 |
models add:(menuDef := MenuView defaultFont asValue). |
|
5627 |
models add:(textDef := TextView defaultFont asValue). |
|
5628 |
||
5629 |
box := Dialog new. |
|
5630 |
box label:(resources string:'Font Settings'). |
|
5631 |
||
5632 |
models |
|
5633 |
with:(resources array:#('All' 'Labels' 'Buttons' 'Lists' 'Menus' 'Edited Text')) |
|
5634 |
do:[:model :title | |
|
5635 |
|y2 lbl f i| |
|
5636 |
||
5637 |
f := model value. |
|
5638 |
||
5639 |
(box addTextLabel:title) adjust:#left. |
|
5640 |
||
5641 |
y := box yPosition. |
|
5642 |
b := box addComponent:(Button label:(resources string:'Change ...')) tabable:true. |
|
5643 |
b relativeExtent:nil; extent:(b preferredExtent). |
|
5644 |
y2 := box yPosition. |
|
5645 |
box yPosition:y. |
|
5646 |
i := box leftIndent. |
|
5647 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
|
5648 |
(lbl := box addTextLabel:'') |
|
5649 |
adjust:#left; |
|
5650 |
font:(model value); |
|
5651 |
labelChannel:(BlockValue |
|
5652 |
with:[:v | |f| |
|
5653 |
f := v value. |
|
5654 |
f isNil ifTrue:[ |
|
5655 |
'' |
|
5656 |
] ifFalse:[ |
|
5657 |
f userFriendlyName |
|
5658 |
] |
|
5659 |
] |
|
5660 |
argument:model). |
|
5661 |
labels add:lbl. |
|
5662 |
||
5663 |
box leftIndent:i. |
|
5664 |
box yPosition:(box yPosition max:y2). |
|
5665 |
||
5666 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
5667 |
||
5668 |
b action:[ |
|
5669 |
|f| |
|
5670 |
||
5671 |
f := FontPanel |
|
5672 |
fontFromUserInitial:(model value) |
|
5673 |
title:(resources string:'Font for %1' with:title) |
|
5674 |
filter:filter. |
|
5675 |
f notNil ifTrue:[ |
|
5676 |
model == allOfThem ifTrue:[ |
|
5677 |
models do:[:m | m value:f]. |
|
5678 |
labels do:[:l | l font:f] |
|
5679 |
] ifFalse:[ |
|
5680 |
model value:f. |
|
5681 |
lbl font:f. |
|
5682 |
]. |
|
5683 |
] |
|
5684 |
]. |
|
5685 |
model == allOfThem ifTrue:[ |
|
5686 |
box addVerticalSpace |
|
5687 |
] |
|
5688 |
]. |
|
5689 |
||
5690 |
box addAbortAndOkButtons. |
|
5691 |
defaultButton := Button label:(resources string:'Defaults'). |
|
5692 |
||
5693 |
(DialogBox styleSheet at:'dialogBox.okAtLeft') ifTrue:[ |
|
5694 |
box addButton:defaultButton after:nil. |
|
5695 |
] ifFalse:[ |
|
5696 |
box addButton:defaultButton before:nil. |
|
5697 |
]. |
|
5698 |
defaultButton |
|
5699 |
action:[ |
|
5700 |
"/ fetch defaults |
|
5701 |
View readStyleSheetAndUpdateAllStyleCaches. |
|
5702 |
labelDef value: Label defaultFont. |
|
5703 |
buttonDef value: Button defaultFont. |
|
5704 |
listDef value: SelectionInListView defaultFont. |
|
5705 |
menuDef value: MenuView defaultFont. |
|
5706 |
textDef value: TextView defaultFont. |
|
5707 |
]. |
|
5708 |
||
5709 |
box open. |
|
5710 |
box accepted ifTrue:[ |
|
5711 |
Label defaultFont:labelDef value. |
|
5712 |
Button defaultFont:buttonDef value. |
|
5713 |
Toggle defaultFont:buttonDef value. |
|
5714 |
TextView withAllSubclasses do:[:cls | cls defaultFont:textDef value]. |
|
5715 |
SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:listDef value]. |
|
5716 |
MenuView defaultFont:menuDef value. |
|
5717 |
PullDownMenu defaultFont:menuDef value. |
|
5718 |
]. |
|
5719 |
box destroy. |
|
5720 |
^ box accepted |
|
5721 |
||
5722 |
"Created: / 27.2.1996 / 01:44:16 / cg" |
|
5723 |
"Modified: / 17.6.1996 / 13:38:48 / stefan" |
|
5724 |
"Modified: / 15.9.1998 / 22:04:51 / cg" |
|
5725 |
! |
|
5726 |
||
5727 |
formattingConfigurationDialog |
|
5728 |
|dialog |
|
5729 |
resources exampleText formattedText reformatAction |
|
5730 |
reformatLocked |
|
5731 |
oldUserPreferences |
|
5732 |
currentUserPrefs |
|
5733 |
tabIndent |
|
5734 |
spaceAroundTemporaries emptyLineAfterTemporaries |
|
5735 |
spaceAfterReturnToken spaceAfterKeywordSelector cStyleBlocks |
|
5736 |
blockArgumentsOnNewLine |
|
5737 |
maxLengthForSingleLineBlocks resetValue bindings| |
|
5738 |
||
5739 |
RBFormatter isNil ifTrue:[ |
|
5740 |
^ self warn:'Sorry, no RBFormatter class'. |
|
5741 |
]. |
|
5742 |
||
5743 |
RBFormatter isLoaded ifFalse:[ |
|
5744 |
WindowGroup activeGroup withWaitCursorDo:[ |
|
5745 |
RBFormatter autoload |
|
5746 |
] |
|
5747 |
]. |
|
5748 |
||
5749 |
resources := self owningClass classResources. |
|
5750 |
currentUserPrefs := UserPreferences current. |
|
5751 |
||
5752 |
exampleText := |
|
5753 |
'methodSelector:methodArg |
|
5754 |
"method comment: |
|
5755 |
some stupid code to show the current settings" |
|
5756 |
||
5757 |
|index| |
|
5758 |
||
5759 |
"/ another comment ... |
|
5760 |
self at:index. "/ a message |
|
5761 |
self at:index put:methodArg. "/ a two arg message |
|
5762 |
self from:1 to:index put:methodArg. "/ a three arg message |
|
5763 |
methodArg ifTrue:[ |
|
5764 |
Transcript showCR:''hello''. "/ condition |
|
5765 |
]. |
|
5766 |
methodArg ifTrue:[ |
|
5767 |
Transcript showCR:''hello''. "/ condition |
|
5768 |
] ifFalse:[ |
|
5769 |
Transcript showCR:''world''. |
|
5770 |
]. |
|
5771 |
[methodArg] whileTrue:[ |
|
5772 |
Transcript showCR:''hello''. "/ looping |
|
5773 |
]. |
|
5774 |
[self aVeryLongConditionBlock and:[self toMakeBlockLonger]] whileTrue:[ |
|
5775 |
Transcript showCR:''hello''. "/ long blocks |
|
5776 |
]. |
|
5777 |
methodArg do:[:element | |
|
5778 |
Transcript showCR:''hello''. "/ looping |
|
5779 |
]. |
|
5780 |
1 to:methodArg size do:[:index | |
|
5781 |
Transcript showCR:''hello''. "/ looping |
|
5782 |
]. |
|
5783 |
methodArg keysAndValuesDo:[:index | |
|
5784 |
Transcript showCR:''hello''. "/ looping |
|
5785 |
]. |
|
5786 |
Object errorSignal handle:[:ex | |
|
5787 |
ex return |
|
5788 |
] do:[ "/ exception handling |
|
5789 |
self someAction "/ blocks |
|
5790 |
]. |
|
5791 |
^ self. |
|
5792 |
'. |
|
5793 |
||
5794 |
formattedText := '' asValue. |
|
5795 |
reformatLocked := false. |
|
5796 |
||
5797 |
reformatAction := [ |tree |
|
5798 |
s_tabIndent s_spaceAroundTemporaries s_emptyLineAfterTemporaries |
|
5799 |
s_spaceAfterReturnToken s_spaceAfterKeywordSelector s_cStyleBlocks |
|
5800 |
s_maxLengthForSingleLineBlocks s_blockArgumentsOnNewLine| |
|
5801 |
||
5802 |
reformatLocked ifFalse:[ |
|
5803 |
"/ |
|
5804 |
"/ temporary change the RBFormatters settings ... |
|
5805 |
"/ |
|
5806 |
s_tabIndent := RBFormatter tabIndent. |
|
5807 |
s_spaceAroundTemporaries := RBFormatter spaceAroundTemporaries. |
|
5808 |
s_emptyLineAfterTemporaries := RBFormatter emptyLineAfterTemporaries. |
|
5809 |
s_spaceAfterReturnToken := RBFormatter spaceAfterReturnToken. |
|
5810 |
s_spaceAfterKeywordSelector := RBFormatter spaceAfterKeywordSelector. |
|
5811 |
s_cStyleBlocks := RBFormatter cStyleBlocks. |
|
5812 |
s_blockArgumentsOnNewLine := RBFormatter blockArgumentsOnNewLine. |
|
5813 |
s_maxLengthForSingleLineBlocks := RBFormatter maxLengthForSingleLineBlocks. |
|
5814 |
||
5815 |
RBFormatter |
|
5816 |
tabIndent:tabIndent value; |
|
5817 |
spaceAroundTemporaries:spaceAroundTemporaries value; |
|
5818 |
emptyLineAfterTemporaries:emptyLineAfterTemporaries value; |
|
5819 |
spaceAfterReturnToken:spaceAfterReturnToken value; |
|
5820 |
spaceAfterKeywordSelector:spaceAfterKeywordSelector value; |
|
5821 |
cStyleBlocks:cStyleBlocks value; |
|
5822 |
blockArgumentsOnNewLine:blockArgumentsOnNewLine value; |
|
5823 |
maxLengthForSingleLineBlocks:maxLengthForSingleLineBlocks value. |
|
5824 |
||
5825 |
tree := RBParser |
|
5826 |
parseMethod:exampleText |
|
5827 |
onError: [:aString :position | nil]. |
|
5828 |
tree do:[:node | |
|
5829 |
(node ~~ tree and:[node parent isNil]) ifTrue:[ |
|
5830 |
self error:'No parent for node'. |
|
5831 |
] |
|
5832 |
]. |
|
5833 |
formattedText value:tree printString. |
|
5834 |
||
5835 |
RBFormatter |
|
5836 |
tabIndent:s_tabIndent; |
|
5837 |
spaceAroundTemporaries:s_spaceAroundTemporaries; |
|
5838 |
emptyLineAfterTemporaries:s_emptyLineAfterTemporaries; |
|
5839 |
spaceAfterReturnToken:s_spaceAfterReturnToken; |
|
5840 |
spaceAfterKeywordSelector:s_spaceAfterKeywordSelector; |
|
5841 |
cStyleBlocks:s_cStyleBlocks; |
|
5842 |
blockArgumentsOnNewLine:s_blockArgumentsOnNewLine; |
|
5843 |
maxLengthForSingleLineBlocks:s_maxLengthForSingleLineBlocks. |
|
5844 |
]. |
|
5845 |
]. |
|
5846 |
||
5847 |
bindings := IdentityDictionary new. |
|
5848 |
bindings at:#formattedText put:formattedText. |
|
5849 |
||
5850 |
oldUserPreferences := currentUserPrefs copy. |
|
5851 |
||
5852 |
tabIndent := RBFormatter tabIndent asValue. |
|
5853 |
tabIndent onChangeEvaluate:reformatAction. |
|
5854 |
bindings at:#tabIndent put:tabIndent. |
|
5855 |
||
5856 |
spaceAroundTemporaries := RBFormatter spaceAroundTemporaries asValue. |
|
5857 |
spaceAroundTemporaries onChangeEvaluate:reformatAction. |
|
5858 |
bindings at:#spaceAroundTemporaries put:spaceAroundTemporaries. |
|
5859 |
||
5860 |
emptyLineAfterTemporaries := RBFormatter emptyLineAfterTemporaries asValue. |
|
5861 |
emptyLineAfterTemporaries onChangeEvaluate:reformatAction. |
|
5862 |
bindings at:#emptyLineAfterTemporaries put:emptyLineAfterTemporaries. |
|
5863 |
||
5864 |
spaceAfterReturnToken := RBFormatter spaceAfterReturnToken asValue. |
|
5865 |
spaceAfterReturnToken onChangeEvaluate:reformatAction. |
|
5866 |
bindings at:#spaceAfterReturnToken put:spaceAfterReturnToken. |
|
5867 |
||
5868 |
spaceAfterKeywordSelector := RBFormatter spaceAfterKeywordSelector asValue. |
|
5869 |
spaceAfterKeywordSelector onChangeEvaluate:reformatAction. |
|
5870 |
bindings at:#spaceAfterKeywordSelector put:spaceAfterKeywordSelector. |
|
5871 |
||
5872 |
cStyleBlocks := RBFormatter cStyleBlocks asValue. |
|
5873 |
cStyleBlocks onChangeEvaluate:reformatAction. |
|
5874 |
bindings at:#cStyleBlocks put:cStyleBlocks. |
|
5875 |
||
5876 |
blockArgumentsOnNewLine := RBFormatter blockArgumentsOnNewLine asValue. |
|
5877 |
blockArgumentsOnNewLine onChangeEvaluate:reformatAction. |
|
5878 |
bindings at:#blockArgumentsOnNewLine put:blockArgumentsOnNewLine. |
|
5879 |
||
5880 |
maxLengthForSingleLineBlocks := RBFormatter maxLengthForSingleLineBlocks asValue. |
|
5881 |
maxLengthForSingleLineBlocks onChangeEvaluate:reformatAction. |
|
5882 |
bindings at:#maxLengthForSingleLineBlocks put:maxLengthForSingleLineBlocks. |
|
5883 |
||
5884 |
bindings at:#resetList put:#( 'ST/X default' 'RB default' ). |
|
5885 |
bindings at:#resetValue put:(resetValue := nil asValue). |
|
5886 |
resetValue onChangeEvaluate: |
|
5887 |
[ |
|
5888 |
resetValue value == 1 ifTrue:[ |
|
5889 |
"/ ST/X defaults |
|
5890 |
reformatLocked := true. |
|
5891 |
tabIndent value: 4. |
|
5892 |
spaceAfterReturnToken value: true. |
|
5893 |
spaceAfterKeywordSelector value: false. |
|
5894 |
spaceAroundTemporaries value: false. |
|
5895 |
emptyLineAfterTemporaries value: true. |
|
5896 |
cStyleBlocks value: true. |
|
5897 |
blockArgumentsOnNewLine value:false. |
|
5898 |
maxLengthForSingleLineBlocks value: 20. |
|
5899 |
reformatLocked := false. |
|
5900 |
reformatAction value. |
|
5901 |
]. |
|
5902 |
resetValue value == 2 ifTrue:[ |
|
5903 |
"/ RBParser defaults |
|
5904 |
reformatLocked := true. |
|
5905 |
tabIndent value: 8. |
|
5906 |
spaceAfterReturnToken value: false. |
|
5907 |
spaceAfterKeywordSelector value: true. |
|
5908 |
spaceAroundTemporaries value: true. |
|
5909 |
emptyLineAfterTemporaries value: false. |
|
5910 |
cStyleBlocks value: false. |
|
5911 |
blockArgumentsOnNewLine value:false. |
|
5912 |
maxLengthForSingleLineBlocks value: 20. |
|
5913 |
reformatLocked := false. |
|
5914 |
reformatAction value. |
|
5915 |
]. |
|
5916 |
resetValue value:nil. "/ to force default label |
|
5917 |
]. |
|
5918 |
||
5919 |
reformatAction value. |
|
5920 |
||
5921 |
"/ |
|
5922 |
"/ create a box on those ... |
|
5923 |
"/ |
|
5924 |
dialog := SimpleDialog new. |
|
5925 |
dialog postBuildBlock:[:builder | |
|
5926 |
(builder componentAt:#sampleTextView) |
|
5927 |
cursorMovementWhenUpdating:nil; |
|
5928 |
scrollWhenUpdating:nil. |
|
5929 |
]. |
|
5930 |
(dialog openFor:nil |
|
5931 |
spec:(self formatterDialogSpec) |
|
5932 |
withBindings:bindings) |
|
5933 |
ifTrue:[ |
|
5934 |
currentUserPrefs at:#'formatter.tabIndent' put:tabIndent value. |
|
5935 |
currentUserPrefs at:#'formatter.spaceAroundTemporaries' put:spaceAroundTemporaries value. |
|
5936 |
currentUserPrefs at:#'formatter.emptyLineAfterTemporaries' put:emptyLineAfterTemporaries value. |
|
5937 |
currentUserPrefs at:#'formatter.spaceAfterReturnToken' put:spaceAfterReturnToken value. |
|
5938 |
currentUserPrefs at:#'formatter.spaceAfterKeywordSelector' put:spaceAfterKeywordSelector value. |
|
5939 |
currentUserPrefs at:#'formatter.cStyleBlocks' put:cStyleBlocks value. |
|
5940 |
currentUserPrefs at:#'formatter.blockArgumentsOnNewLine' put:blockArgumentsOnNewLine value. |
|
5941 |
currentUserPrefs at:#'formatter.maxLengthForSingleLineBlocks' put:maxLengthForSingleLineBlocks value. |
|
5942 |
RBFormatter |
|
5943 |
tabIndent:tabIndent value; |
|
5944 |
spaceAroundTemporaries:spaceAroundTemporaries value; |
|
5945 |
emptyLineAfterTemporaries:emptyLineAfterTemporaries value; |
|
5946 |
spaceAfterReturnToken:spaceAfterReturnToken value; |
|
5947 |
spaceAfterKeywordSelector:spaceAfterKeywordSelector value; |
|
5948 |
cStyleBlocks:cStyleBlocks value; |
|
5949 |
blockArgumentsOnNewLine:blockArgumentsOnNewLine value; |
|
5950 |
maxLengthForSingleLineBlocks:maxLengthForSingleLineBlocks value. |
|
5951 |
] ifFalse: [ |
|
5952 |
(UserPreferences reset; current) declareAllFrom: oldUserPreferences |
|
5953 |
]. |
|
5954 |
! |
|
5955 |
||
5956 |
syntaxColorConfigurationDialog |
|
5957 |
|box frame exampleView y |
|
5958 |
resources exampleText coloredText recolorAction |
|
5959 |
syntaxColor syntaxColors colorMenu oldUserPreferences |
|
5960 |
syntaxEmphasises syntaxColorSelector syntaxEmphasisSelector syntaxColoringBox |
|
5961 |
syntaxEmphasisesBox syntaxColoringResetButton b resetList |
|
5962 |
resetListBox currentUserPrefs| |
|
5963 |
||
5964 |
resources := self owningClass classResources. |
|
5965 |
currentUserPrefs := UserPreferences current. |
|
5966 |
||
5967 |
exampleText := |
|
5968 |
'methodSelector:methodArg |
|
5969 |
"method comment: |
|
5970 |
some stupid code to show the current settings" |
|
5971 |
||
5972 |
|methodVar| |
|
5973 |
||
5974 |
"/ another comment ... |
|
5975 |
self at:methodArg. "/ a message |
|
5976 |
self fooBarBaz:methodVar. "/ a bad message |
|
5977 |
methodVar := Array new:1. |
|
5978 |
unknonVar := 1. "/ a bad variable |
|
5979 |
UnknonVar := 1. "/ another bad variable |
|
5980 |
"self bar:methodVar. detect commented code easily" |
|
5981 |
1 to:5 do:[:i | self at:i + 1]. |
|
5982 |
Transcript showCR:''some string'' , #someSymbol. |
|
5983 |
^ self. |
|
5984 |
'. |
|
5985 |
||
5986 |
coloredText := '' asValue. |
|
5987 |
recolorAction := [ coloredText value:(SyntaxHighlighter formatMethod:exampleText in:nil) ]. |
|
5988 |
recolorAction value. |
|
5989 |
||
5990 |
"/ |
|
5991 |
"/ create a box on those values ... |
|
5992 |
"/ |
|
5993 |
box := DialogBox new. |
|
5994 |
box label:(resources string:'Syntax Colors'). |
|
5995 |
||
5996 |
frame := View new. |
|
5997 |
frame extent:1.0 @ 200. |
|
5998 |
frame borderWidth:0. |
|
5999 |
||
6000 |
exampleView := HVScrollableView for:TextView in:frame. |
|
6001 |
exampleView model:coloredText. |
|
6002 |
exampleView origin:0.0@0.0 corner:1.0@1.0; inset:2. |
|
6003 |
||
6004 |
frame topInset:box yPosition. |
|
6005 |
box addComponent:frame withExtent:1.0@200. |
|
6006 |
box makeTabable:exampleView. |
|
6007 |
frame width:1.0. |
|
6008 |
||
6009 |
box addVerticalSpace. |
|
6010 |
||
6011 |
oldUserPreferences := currentUserPrefs copy. |
|
6012 |
||
6013 |
syntaxColoringBox := box addComboListOn: (syntaxColors := SelectionInList with:UserPreferences syntaxColorNames initialSelection:1). |
|
6014 |
syntaxColorSelector := [(syntaxColors selection replChar:$ withString: '') asLowercaseFirst asSymbol]. |
|
6015 |
syntaxEmphasisSelector := [((syntaxColorSelector value readStream upToAll: 'Color'), 'Emphasis') asLowercaseFirst asSymbol]. |
|
6016 |
syntaxColor := (currentUserPrefs perform: syntaxColorSelector value) asValue. |
|
6017 |
colorMenu := ColorMenu new. |
|
6018 |
colorMenu model: syntaxColor. |
|
6019 |
syntaxColor onChangeEvaluate: |
|
6020 |
[currentUserPrefs at: syntaxColorSelector value put: syntaxColor value. |
|
6021 |
recolorAction value.]. |
|
6022 |
syntaxColors onChangeEvaluate: |
|
6023 |
[|eVal| |
|
6024 |
syntaxColor value: (currentUserPrefs perform:syntaxColorSelector value). |
|
6025 |
eVal := currentUserPrefs perform: syntaxEmphasisSelector value. |
|
6026 |
eVal isArray ifTrue:[ |
|
6027 |
eVal = (Array with:#underwave with:#underlineColor->(Color red:100.0 green:0.0 blue:0.0)) ifTrue:[ |
|
6028 |
eVal := #'red underwave' |
|
6029 |
]. |
|
6030 |
eVal = (Array with:#bold with:#underwave with:#underlineColor->(Color red:100.0 green:0.0 blue:0.0)) ifTrue:[ |
|
6031 |
eVal := #'bold+red underwave' |
|
6032 |
]. |
|
6033 |
eVal = (Array with:#bold with:#underlineColor->(Color red:100.0 green:0.0 blue:0.0)) ifTrue:[ |
|
6034 |
eVal := #'bold+red underline' |
|
6035 |
]. |
|
6036 |
eVal = (Array with:#italic with:#underwave with:#underlineColor->(Color red:100.0 green:0.0 blue:0.0)) ifTrue:[ |
|
6037 |
eVal := #'italic+red underwave' |
|
6038 |
]. |
|
6039 |
eVal = (Array with:#italic with:#underlineColor->(Color red:100.0 green:0.0 blue:0.0)) ifTrue:[ |
|
6040 |
eVal := #'italic+red underline' |
|
6041 |
]. |
|
6042 |
]. |
|
6043 |
syntaxEmphasises selection: eVal. |
|
6044 |
recolorAction value.]. |
|
6045 |
||
6046 |
syntaxEmphasises := SelectionInList |
|
6047 |
with:#( |
|
6048 |
normal |
|
6049 |
underline |
|
6050 |
#'red underline' |
|
6051 |
underwave |
|
6052 |
#'red underwave' |
|
6053 |
bold |
|
6054 |
boldUnderline |
|
6055 |
#'bold+red underline' |
|
6056 |
boldUnderwave |
|
6057 |
#'bold+red underwave' |
|
6058 |
italic |
|
6059 |
italicUnderline |
|
6060 |
#'italic+red underline' |
|
6061 |
italicUnderwave |
|
6062 |
#'italic+red underwave' |
|
6063 |
reverse |
|
6064 |
) |
|
6065 |
initialSelection:1. |
|
6066 |
syntaxEmphasisesBox := box addComboListOn:syntaxEmphasises. |
|
6067 |
syntaxEmphasises |
|
6068 |
onChangeEvaluate:[ |em| |
|
6069 |
em := syntaxEmphasises selection. |
|
6070 |
em notNil ifTrue:[ |
|
6071 |
em := em asSymbol. |
|
6072 |
em == #'red underline' ifTrue:[ em := Array with:#underline with:(#underlineColor->Color red)]. |
|
6073 |
em == #'red underwave' ifTrue:[ em := Array with:#underwave with:(#underlineColor->Color red)]. |
|
6074 |
em == #'bold+red underline' ifTrue:[ em := Array with:#bold with:#underline with:(#underlineColor->Color red)]. |
|
6075 |
em == #'bold+red underwave' ifTrue:[ em := Array with:#bold with:#underwave with:(#underlineColor->Color red)]. |
|
6076 |
em == #'italic+red underline' ifTrue:[ em := Array with:#italic with:#underline with:(#underlineColor->Color red)]. |
|
6077 |
em == #'italic+red underwave' ifTrue:[ em := Array with:#italic with:#underwave with:(#underlineColor->Color red)]. |
|
6078 |
||
6079 |
currentUserPrefs at: syntaxEmphasisSelector value put:em. |
|
6080 |
]. |
|
6081 |
recolorAction value |
|
6082 |
]. |
|
6083 |
syntaxColors changed:#value. "/ to force initial update of emphasis |
|
6084 |
box addComponent:colorMenu tabable:true. |
|
6085 |
||
6086 |
y := box yPosition. |
|
6087 |
||
6088 |
b := Button new label: (resources string:'reset to:'). |
|
6089 |
b action:[ |
|
6090 |
|resetSelector| |
|
6091 |
||
6092 |
resetSelector := (currentUserPrefs listOfPredefinedSyntaxColoringSchemes |
|
6093 |
collect:[:eachEntry | eachEntry first]) |
|
6094 |
at:resetList selectionIndex. |
|
6095 |
currentUserPrefs perform:resetSelector. |
|
6096 |
recolorAction value. |
|
6097 |
]. |
|
6098 |
syntaxColoringResetButton := box addComponent:b. |
|
6099 |
box makeTabable:syntaxColoringResetButton. |
|
6100 |
||
6101 |
box yPosition:y. |
|
6102 |
||
6103 |
resetList := SelectionInList |
|
6104 |
with:(currentUserPrefs listOfPredefinedSyntaxColoringSchemes |
|
6105 |
collect:[:eachEntry | eachEntry second]) |
|
6106 |
initialSelection:1. |
|
6107 |
resetListBox := box addComboListOn:resetList. |
|
6108 |
box makeTabable:resetListBox. |
|
6109 |
||
6110 |
syntaxColoringBox enable. |
|
6111 |
colorMenu enable. |
|
6112 |
syntaxEmphasisesBox enable. |
|
6113 |
syntaxColoringResetButton enable. |
|
6114 |
||
6115 |
box |
|
6116 |
"/ addHelpButtonFor:'Launcher/sourceSettings.html'; |
|
6117 |
addAbortAndOkButtons. |
|
6118 |
||
6119 |
box stickAtBottomWithVariableHeight:frame. |
|
6120 |
box stickAtBottomWithFixHeight:syntaxColoringBox. |
|
6121 |
box stickAtBottomWithFixHeight:syntaxEmphasisesBox. |
|
6122 |
box stickAtBottomWithFixHeight:colorMenu. |
|
6123 |
box stickAtBottomWithFixHeight:syntaxColoringResetButton left:0.0 right:0.5. |
|
6124 |
box stickAtBottomWithFixHeight:resetListBox left:0.5 right:1.0. |
|
6125 |
||
6126 |
"/ |
|
6127 |
"/ show the box ... |
|
6128 |
"/ |
|
6129 |
box extent:600@400. |
|
6130 |
box openModal. |
|
6131 |
||
6132 |
"/ |
|
6133 |
"/ update system settings |
|
6134 |
"/ |
|
6135 |
box accepted ifTrue:[ |
|
6136 |
] ifFalse: [ |
|
6137 |
(UserPreferences reset; current) declareAllFrom: oldUserPreferences |
|
6138 |
]. |
|
6139 |
box destroy |
|
6140 |
||
6141 |
"Modified: / 16.4.1998 / 17:18:16 / ca" |
|
6142 |
"Modified: / 7.7.1999 / 00:27:02 / cg" |
|
2001 | 6143 |
! ! |
6144 |
||
2596 | 6145 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'interface specs'! |
6146 |
||
4244 | 6147 |
cvsSetupSpec |
6148 |
"This resource specification was automatically generated |
|
6149 |
by the UIPainter of ST/X." |
|
6150 |
||
6151 |
"Do not manually edit this!! If it is corrupted, |
|
6152 |
the UIPainter may not be able to read the specification." |
|
6153 |
||
6154 |
" |
|
6155 |
UIPainter new openOnClass:AbstractLauncherApplication::LauncherDialogs andSelector:#cvsSetupSpec |
|
6156 |
" |
|
6157 |
||
6158 |
<resource: #canvas> |
|
6159 |
||
6160 |
^ |
|
6161 |
#(#FullSpec |
|
6162 |
#name: #cvsSetupSpec |
|
6163 |
#window: |
|
6164 |
#(#WindowSpec |
|
6165 |
#label: 'CVS Setup' |
|
6166 |
#name: 'CVS Setup' |
|
6167 |
#min: #(#Point 436 316) |
|
6168 |
#max: #(#Point 1280 1024) |
|
6169 |
#bounds: #(#Rectangle 13 23 449 377) |
|
6170 |
) |
|
6171 |
#component: |
|
6172 |
#(#SpecCollection |
|
6173 |
#collection: #( |
|
6174 |
#(#LabelSpec |
|
6175 |
#label: 'CVS BinDirectory:' |
|
6176 |
#name: 'Label1' |
|
6177 |
#layout: #(#LayoutFrame 0 0.0 36 0 40 0.25 53 0) |
|
6178 |
#level: 0 |
|
6179 |
#translateLabel: true |
|
6180 |
#adjust: #right |
|
6181 |
) |
|
6182 |
#(#InputFieldSpec |
|
6183 |
#name: 'BinDirectoryField' |
|
6184 |
#layout: #(#LayoutFrame 44 0.25 34 0 -1 1 56 0) |
|
6185 |
#tabable: true |
|
6186 |
#model: #cvsBinDirectoryHolder |
|
6187 |
#acceptChannel: #acceptChannel |
|
6188 |
#acceptOnPointerLeave: false |
|
6189 |
) |
|
6190 |
#(#DividerSpec |
|
6191 |
#name: 'Separator3' |
|
6192 |
#layout: #(#LayoutFrame 0 0.0 60 0 0 1.0 64 0) |
|
6193 |
) |
|
6194 |
#(#LabelSpec |
|
6195 |
#label: 'CVS SourceCodeManager setup' |
|
6196 |
#name: 'label' |
|
6197 |
#layout: #(#LayoutFrame 1 0.0 3 0 -1 1.0 20 0) |
|
6198 |
#translateLabel: true |
|
6199 |
#adjust: #left |
|
6200 |
) |
|
6201 |
#(#LabelSpec |
|
6202 |
#label: 'CVSRoot default:' |
|
6203 |
#name: 'defaultCvsRootLabel' |
|
6204 |
#layout: #(#LayoutFrame 0 0.0 71 0 40 0.25 88 0) |
|
6205 |
#level: 0 |
|
6206 |
#translateLabel: true |
|
6207 |
#adjust: #right |
|
6208 |
) |
|
6209 |
#(#ComboBoxSpec |
|
6210 |
#name: 'cvsRootComboBox' |
|
6211 |
#layout: #(#LayoutFrame 44 0.25 71 0 -1 1.0 93 0) |
|
6212 |
#tabable: true |
|
6213 |
#model: #cvsRootHolder |
|
6214 |
#immediateAccept: true |
|
6215 |
#acceptOnLeave: true |
|
6216 |
#acceptOnReturn: true |
|
6217 |
#acceptOnTab: true |
|
6218 |
#acceptOnLostFocus: true |
|
6219 |
#acceptChannel: #acceptChannel |
|
6220 |
#acceptOnPointerLeave: false |
|
6221 |
#comboList: #cvsRootPrototypeList |
|
6222 |
) |
|
6223 |
#(#DividerSpec |
|
6224 |
#name: 'Separator1' |
|
6225 |
#layout: #(#LayoutFrame 0 0.0 96 0 0 1.0 100 0) |
|
6226 |
) |
|
6227 |
#(#LabelSpec |
|
6228 |
#label: 'CVSRoot per Module:' |
|
6229 |
#name: 'knownModulesLabel' |
|
6230 |
#layout: #(#LayoutFrame 0 0.0 109 0 40 0.25 126 0) |
|
6231 |
#translateLabel: true |
|
6232 |
#adjust: #right |
|
6233 |
) |
|
6234 |
#(#SequenceViewSpec |
|
6235 |
#name: 'List1' |
|
6236 |
#layout: #(#LayoutFrame 44 0.25 104 0 -1 1 202 0) |
|
6237 |
#tabable: true |
|
6238 |
#model: #selectedPerModuleRoot |
|
6239 |
#hasHorizontalScrollBar: true |
|
6240 |
#hasVerticalScrollBar: true |
|
6241 |
#miniScrollerHorizontal: true |
|
6242 |
#useIndex: false |
|
6243 |
#sequenceList: #listOfModules |
|
6244 |
) |
|
6245 |
#(#LabelSpec |
|
6246 |
#label: 'Module:' |
|
6247 |
#name: 'moduleLabel' |
|
6248 |
#layout: #(#LayoutFrame 0 0.0 209 0 40 0.25 226 0) |
|
6249 |
#translateLabel: true |
|
6250 |
#adjust: #right |
|
6251 |
) |
|
6252 |
#(#InputFieldSpec |
|
6253 |
#name: 'perModuleRootModuleEntryField' |
|
6254 |
#layout: #(#LayoutFrame 44 0.25 205 0 -1 1 227 0) |
|
6255 |
#tabable: true |
|
6256 |
#model: #perModuleRootModule |
|
6257 |
#acceptChannel: #acceptChannel |
|
6258 |
#acceptOnPointerLeave: false |
|
6259 |
) |
|
6260 |
#(#LabelSpec |
|
6261 |
#label: 'CVSRoot:' |
|
6262 |
#name: 'cvsRootLabel' |
|
6263 |
#layout: #(#LayoutFrame 0 0.0 236 0 40 0.25 253 0) |
|
6264 |
#translateLabel: true |
|
6265 |
#adjust: #right |
|
6266 |
) |
|
6267 |
#(#ComboBoxSpec |
|
6268 |
#name: 'perModuleRootComboBox' |
|
6269 |
#layout: #(#LayoutFrame 44 0.25 232 0 -1 1.0 254 0) |
|
6270 |
#tabable: true |
|
6271 |
#model: #perModuleRoot |
|
6272 |
#immediateAccept: true |
|
6273 |
#acceptOnLeave: true |
|
6274 |
#acceptOnReturn: true |
|
6275 |
#acceptOnTab: true |
|
6276 |
#acceptOnLostFocus: true |
|
6277 |
#acceptChannel: #acceptChannel |
|
6278 |
#acceptOnPointerLeave: false |
|
6279 |
#comboList: #cvsRootPrototypeList |
|
6280 |
) |
|
6281 |
#(#HorizontalPanelViewSpec |
|
6282 |
#name: 'HorizontalPanel1' |
|
6283 |
#layout: #(#LayoutFrame 44 0.25 258 0 -1 1 289 0) |
|
6284 |
#horizontalLayout: #fitSpace |
|
6285 |
#verticalLayout: #center |
|
6286 |
#horizontalSpace: 3 |
|
6287 |
#verticalSpace: 3 |
|
6288 |
#component: |
|
6289 |
#(#SpecCollection |
|
6290 |
#collection: #( |
|
6291 |
#(#ActionButtonSpec |
|
6292 |
#label: 'Add/Apply' |
|
6293 |
#name: 'addButton' |
|
6294 |
#translateLabel: true |
|
6295 |
#tabable: true |
|
6296 |
#model: #addPerModuleRoot |
|
6297 |
#extent: #(#Point 136 22) |
|
6298 |
) |
|
6299 |
#(#ActionButtonSpec |
|
6300 |
#label: 'Remove' |
|
6301 |
#name: 'removeButton' |
|
6302 |
#translateLabel: true |
|
6303 |
#tabable: true |
|
6304 |
#model: #removePerModuleRoot |
|
6305 |
#enableChannel: #removeEnabled |
|
6306 |
#extent: #(#Point 137 22) |
|
6307 |
) |
|
6308 |
) |
|
6309 |
||
6310 |
) |
|
6311 |
) |
|
6312 |
#(#DividerSpec |
|
6313 |
#name: 'Separator2' |
|
6314 |
#layout: #(#LayoutFrame 0 0.0 -45 1 0 1.0 -34 1) |
|
6315 |
) |
|
6316 |
#(#HorizontalPanelViewSpec |
|
6317 |
#name: 'buttonPanel' |
|
6318 |
#layout: #(#LayoutFrame 0 0.0 -29 1.0 0 1.0 -3 1.0) |
|
6319 |
#horizontalLayout: #fitSpace |
|
6320 |
#verticalLayout: #center |
|
6321 |
#horizontalSpace: 3 |
|
6322 |
#verticalSpace: 3 |
|
6323 |
#ignoreInvisibleComponents: true |
|
6324 |
#reverseOrderIfOKAtLeft: true |
|
6325 |
#component: |
|
6326 |
#(#SpecCollection |
|
6327 |
#collection: #( |
|
6328 |
#(#ActionButtonSpec |
|
6329 |
#label: 'Cancel' |
|
6330 |
#name: 'cancelButton' |
|
6331 |
#translateLabel: true |
|
6332 |
#tabable: true |
|
6333 |
#model: #cancel |
|
6334 |
#extent: #(#Point 141 21) |
|
6335 |
) |
|
6336 |
#(#ActionButtonSpec |
|
6337 |
#label: 'Help' |
|
6338 |
#name: 'helpButton' |
|
6339 |
#translateLabel: true |
|
6340 |
#tabable: true |
|
6341 |
#model: #help |
|
6342 |
#extent: #(#Point 141 21) |
|
6343 |
) |
|
6344 |
#(#ActionButtonSpec |
|
6345 |
#label: 'OK' |
|
6346 |
#name: 'okButton' |
|
6347 |
#translateLabel: true |
|
6348 |
#tabable: true |
|
6349 |
#model: #accept |
|
6350 |
#isDefault: true |
|
6351 |
#extent: #(#Point 142 21) |
|
6352 |
) |
|
6353 |
) |
|
6354 |
||
6355 |
) |
|
6356 |
) |
|
6357 |
) |
|
6358 |
||
6359 |
) |
|
6360 |
) |
|
6361 |
! |
|
6362 |
||
6363 |
formatterDialogSpec |
|
6364 |
"This resource specification was automatically generated |
|
6365 |
by the UIPainter of ST/X." |
|
6366 |
||
6367 |
"Do not manually edit this!! If it is corrupted, |
|
6368 |
the UIPainter may not be able to read the specification." |
|
6369 |
||
6370 |
" |
|
6371 |
UIPainter new openOnClass:AbstractLauncherApplication::LauncherDialogs andSelector:#formatterDialogSpec |
|
6372 |
" |
|
6373 |
||
6374 |
<resource: #canvas> |
|
6375 |
||
6376 |
^ |
|
6377 |
#(#FullSpec |
|
6378 |
#name: #formatterDialogSpec |
|
6379 |
#window: |
|
6380 |
#(#WindowSpec |
|
6381 |
#label: 'Formatting parameters' |
|
6382 |
#name: 'Formatting parameters' |
|
6383 |
#min: #(#Point 10 10) |
|
6384 |
#max: #(#Point 1280 1024) |
|
6385 |
#bounds: #(#Rectangle 10 406 606 989) |
|
6386 |
) |
|
6387 |
#component: |
|
6388 |
#(#SpecCollection |
|
6389 |
#collection: #( |
|
6390 |
#(#LabelSpec |
|
6391 |
#label: 'Sample output:' |
|
6392 |
#name: 'Label2' |
|
6393 |
#layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0) |
|
6394 |
#translateLabel: true |
|
6395 |
#adjust: #left |
|
6396 |
) |
|
6397 |
#(#TextEditorSpec |
|
6398 |
#name: 'sampleTextView' |
|
6399 |
#layout: #(#LayoutFrame 0 0.0 30 0.0 0 1.0 -234 1.0) |
|
6400 |
#level: -1 |
|
6401 |
#model: #formattedText |
|
6402 |
#hasHorizontalScrollBar: true |
|
6403 |
#hasVerticalScrollBar: true |
|
6404 |
) |
|
6405 |
#(#FramedBoxSpec |
|
6406 |
#label: 'Parameters' |
|
6407 |
#name: 'FramedBox1' |
|
6408 |
#layout: #(#LayoutFrame 0 0.0 -225 1 0 1.0 -30 1) |
|
6409 |
#labelPosition: #topLeft |
|
6410 |
#translateLabel: true |
|
6411 |
#component: |
|
6412 |
#(#SpecCollection |
|
6413 |
#collection: #( |
|
6414 |
#(#LabelSpec |
|
6415 |
#label: 'Max length for single line blocks:' |
|
6416 |
#name: 'Label1' |
|
6417 |
#layout: #(#LayoutFrame 185 0.0 127 0 66 0.7 153 0) |
|
6418 |
#level: 0 |
|
6419 |
#adjust: #right |
|
6420 |
) |
|
6421 |
#(#CheckBoxSpec |
|
6422 |
#label: 'Space around temporaries ' |
|
6423 |
#name: 'checkBox' |
|
6424 |
#layout: #(#LayoutFrame 2 0 3 0 260 0 32 0) |
|
6425 |
#level: 0 |
|
6426 |
#tabable: true |
|
6427 |
#model: #spaceAroundTemporaries |
|
6428 |
#translateLabel: true |
|
6429 |
) |
|
6430 |
#(#CheckBoxSpec |
|
6431 |
#label: 'Blank line after local var declaration' |
|
6432 |
#name: 'CheckBox1' |
|
6433 |
#layout: #(#LayoutFrame 267 0 3 0 567 0 32 0) |
|
6434 |
#level: 0 |
|
6435 |
#tabable: true |
|
6436 |
#model: #emptyLineAfterTemporaries |
|
6437 |
#translateLabel: true |
|
6438 |
) |
|
6439 |
#(#CheckBoxSpec |
|
6440 |
#label: 'Space after ''^''' |
|
6441 |
#name: 'CheckBox2' |
|
6442 |
#layout: #(#LayoutFrame 2 0 31 0 260 0 60 0) |
|
6443 |
#level: 0 |
|
6444 |
#tabable: true |
|
6445 |
#model: #spaceAfterReturnToken |
|
6446 |
#translateLabel: true |
|
6447 |
) |
|
6448 |
#(#CheckBoxSpec |
|
6449 |
#label: 'Space after '':'' in keywords' |
|
6450 |
#name: 'CheckBox3' |
|
6451 |
#layout: #(#LayoutFrame 267 0 31 0 567 0 60 0) |
|
6452 |
#level: 0 |
|
6453 |
#tabable: true |
|
6454 |
#model: #spaceAfterKeywordSelector |
|
6455 |
#translateLabel: true |
|
6456 |
) |
|
6457 |
#(#CheckBoxSpec |
|
6458 |
#label: 'C-Style blocks' |
|
6459 |
#name: 'CheckBox4' |
|
6460 |
#layout: #(#LayoutFrame 2 0 59 0 260 0 88 0) |
|
6461 |
#level: 0 |
|
6462 |
#tabable: true |
|
6463 |
#model: #cStyleBlocks |
|
6464 |
#translateLabel: true |
|
6465 |
) |
|
6466 |
#(#InputFieldSpec |
|
6467 |
#name: 'editField' |
|
6468 |
#layout: #(#LayoutFrame 74 0.7 93 0 -38 1.0 119 0) |
|
6469 |
#level: -1 |
|
6470 |
#tabable: true |
|
6471 |
#model: #tabIndent |
|
6472 |
#type: #number |
|
6473 |
#immediateAccept: false |
|
6474 |
#acceptOnLeave: true |
|
6475 |
#acceptOnReturn: true |
|
6476 |
#acceptOnTab: true |
|
6477 |
#acceptOnLostFocus: true |
|
6478 |
#acceptOnPointerLeave: true |
|
6479 |
) |
|
6480 |
#(#LabelSpec |
|
6481 |
#label: 'Indent:' |
|
6482 |
#name: 'label' |
|
6483 |
#layout: #(#LayoutFrame 242 0.0 93 0 66 0.7 119 0) |
|
6484 |
#level: 0 |
|
6485 |
#adjust: #right |
|
6486 |
) |
|
6487 |
#(#InputFieldSpec |
|
6488 |
#name: 'EntryField1' |
|
6489 |
#layout: #(#LayoutFrame 74 0.7 127 0 -38 1.0 153 0) |
|
6490 |
#level: -1 |
|
6491 |
#tabable: true |
|
6492 |
#model: #maxLengthForSingleLineBlocks |
|
6493 |
#type: #number |
|
6494 |
#immediateAccept: false |
|
6495 |
#acceptOnLeave: true |
|
6496 |
#acceptOnReturn: true |
|
6497 |
#acceptOnTab: true |
|
6498 |
#acceptOnLostFocus: true |
|
6499 |
#acceptOnPointerLeave: true |
|
6500 |
) |
|
6501 |
#(#PopUpListSpec |
|
6502 |
#label: 'Reset to...' |
|
6503 |
#name: 'PopUpList1' |
|
6504 |
#layout: #(#LayoutFrame 2 0 129 0 127 0 151 0) |
|
6505 |
#tabable: true |
|
6506 |
#model: #resetValue |
|
6507 |
#menu: #resetList |
|
6508 |
#useIndex: true |
|
6509 |
) |
|
6510 |
#(#CheckBoxSpec |
|
6511 |
#label: 'Block args on new line' |
|
6512 |
#name: 'CheckBox5' |
|
6513 |
#layout: #(#LayoutFrame 267 0 59 0 567 0 88 0) |
|
6514 |
#level: 0 |
|
6515 |
#tabable: true |
|
6516 |
#model: #blockArgumentsOnNewLine |
|
6517 |
#translateLabel: true |
|
6518 |
) |
|
6519 |
) |
|
6520 |
||
6521 |
) |
|
6522 |
) |
|
6523 |
#(#HorizontalPanelViewSpec |
|
6524 |
#name: 'horizontalPanelView' |
|
6525 |
#layout: #(#LayoutFrame 0 0.0 -35 1.0 0 1.0 0 1.0) |
|
6526 |
#level: 0 |
|
6527 |
#horizontalLayout: #fitSpace |
|
6528 |
#verticalLayout: #center |
|
6529 |
#horizontalSpace: 4 |
|
6530 |
#verticalSpace: 4 |
|
6531 |
#ignoreInvisibleComponents: true |
|
6532 |
#component: |
|
6533 |
#(#SpecCollection |
|
6534 |
#collection: #( |
|
6535 |
#(#ActionButtonSpec |
|
6536 |
#label: 'Cancel' |
|
6537 |
#name: 'button' |
|
6538 |
#translateLabel: true |
|
6539 |
#tabable: true |
|
6540 |
#model: #cancel |
|
6541 |
#useDefaultExtent: true |
|
6542 |
) |
|
6543 |
#(#ActionButtonSpec |
|
6544 |
#label: 'OK' |
|
6545 |
#name: 'Button1' |
|
6546 |
#translateLabel: true |
|
6547 |
#tabable: true |
|
6548 |
#model: #accept |
|
6549 |
#isDefault: true |
|
6550 |
#useDefaultExtent: true |
|
6551 |
) |
|
6552 |
) |
|
6553 |
||
6554 |
) |
|
6555 |
) |
|
6556 |
) |
|
6557 |
||
6558 |
) |
|
6559 |
) |
|
2596 | 6560 |
! ! |
6561 |
||
4311 | 6562 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'application icons'! |
6563 |
||
6564 |
communicationIcon |
|
6565 |
"This resource specification was automatically generated |
|
6566 |
by the ImageEditor of ST/X." |
|
6567 |
||
6568 |
"Do not manually edit this!! If it is corrupted, |
|
6569 |
the ImageEditor may not be able to read the specification." |
|
6570 |
||
6571 |
" |
|
6572 |
self communicationIcon inspect |
|
6573 |
ImageEditor openOnClass:self andSelector:#communicationIcon |
|
6574 |
Icon flushCachedIcons |
|
6575 |
" |
|
6576 |
||
6577 |
<resource: #image> |
|
6578 |
||
6579 |
^Icon |
|
6580 |
constantNamed:#'AbstractLauncherApplication::SettingsDialog class communicationIcon' |
|
6581 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
6582 |
@@@@_$RA@@@@@@@@@@@@@HED_ @@@@@@ U2+UX\@@@@@@@@@@H]U*52A@@@@ U*9^S-A @@@@@@@HIT.HD4O8D@_%29^#6JZE"B@@@@@HIX-(@9!!&-\_"Z+ |
|
6583 |
.+QKZ(0@J @@@@@*@K*5SV2B*2XDQ+":,XR5WP8@@@@@BDJ5.+V@.E4KEA46-+*5U9TVHRD!!HP<+JKV:-%*SG1@Y@R8@WYV)I@A/@@@SH D$@E>K*BP-$PUH |
|
6584 |
QH60)2U0[$:]KYPJN$RK,JX''[TFW]BB*)*4Z\K)[Q''L6''GD *JZ.HF4UV;H_**U6\+)%T7,WDUB3G:^%_E<@WB%RG*)8\+*BL(=Q#@(!!R!!2-_P5-@@AUNA!!4 |
|
6585 |
BGV:.(IQ)I<LQS@R^VE([P@@(E9OZQT/[[*:-9=YO8M''S6B ZF4@@@@@[0@[M0I5.)!!!!(4NE@F<@&$&C@@@@@@@@G&PCBGYV&;@<!!P@@#$^P@@@@@@@@@FN@ |
|
6586 |
[R<#+J2,PHT@%$2E@@@@@@@@@@BEA7>"I;B/''$*H%$"I@@@@@@@@@@@@$#D]^RF''*F]5$D2I@@@@@@@@@@@@@@BIKB<F(VHIHSNE@@@@@@@@@@@@@@@@@I$> |
|
6587 |
MVY7@@@@@@@@@@@@@@@@@@@@@@@@!!3Y9@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 0 0 7 7 7 12 12 12 20 20 20 23 23 23 24 24 24 28 28 28 30 30 30 32 32 32 35 35 35 40 40 40 41 41 41 43 43 43 45 45 45 48 47 48 50 49 50 51 50 51 52 52 52 54 53 54 55 54 55 56 56 56 58 57 58 58 58 58 59 59 59 60 59 60 60 60 60 61 61 61 62 62 62 66 65 66 66 66 66 67 66 67 68 67 68 69 69 69 70 69 70 70 70 70 71 71 71 72 71 72 73 73 73 74 73 74 75 75 75 76 75 76 76 76 76 77 76 77 78 78 78 79 79 79 80 80 80 85 84 85 86 84 86 86 85 86 87 86 87 87 87 87 88 87 88 89 88 89 89 89 89 90 88 90 90 89 90 93 91 93 93 93 93 94 92 94 94 93 94 96 94 96 97 96 97 98 97 98 99 98 99 99 99 99 100 99 100 100 100 100 102 102 102 103 103 103 104 103 104 104 104 104 105 105 105 106 106 106 108 107 108 109 109 109 110 110 110 111 110 111 113 113 113 114 113 114 114 114 114 115 115 115 116 116 116 117 115 117 118 118 118 120 120 120 121 121 121 122 121 122 122 122 122 123 122 123 123 123 123 124 124 124 125 125 125 127 127 127 128 128 128 129 129 129 130 130 130 131 131 131 132 131 132 132 132 132 133 132 133 134 134 134 135 135 135 136 136 136 137 137 137 138 138 138 140 139 140 142 142 142 147 147 147 151 151 151 153 153 153 154 154 154 155 155 155 156 155 156 156 156 156 159 159 159 164 163 164 165 165 165 167 167 167 168 168 168 170 170 170 172 172 172 174 174 174 175 174 175 177 177 177 178 178 178 181 181 181 182 182 182 183 183 183 185 185 185 189 189 189 190 190 190 191 191 191 192 192 192 194 192 194 194 194 194 195 195 195 196 196 196 198 196 198 199 198 199 200 200 200 201 200 201 201 201 201 202 201 202 202 202 202 203 203 203 204 204 204 205 204 205 205 205 205 206 205 206 206 206 206 209 209 209 210 210 210 211 211 211 212 212 212 213 212 213 213 213 213 214 214 214 215 213 215 215 215 215 216 216 216 217 216 217 217 217 217 218 217 218 219 219 219 221 219 221 222 221 222 224 222 224 224 223 224 225 223 225 225 224 225 225 225 225 226 224 226 226 225 226 227 226 227 228 226 228 229 228 229 231 231 231 232 231 232 235 234 235 237 237 237 239 239 239 241 241 241 244 244 244 247 247 247 248 248 248 255 255 255]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G@C O G0_0O8?8_<?(W<?8_<???<=:^<???<???<???<_??<O??<O??<B?=\@?<8@?=0@?? @??@@_>@@O @@G@@') ; yourself); yourself] |
|
6588 |
! |
|
6589 |
||
6590 |
defaultSettingsAppIcon |
|
6591 |
||
6592 |
^ self settingsIcon |
|
6593 |
! |
|
6594 |
||
6595 |
settingsIcon |
|
6596 |
"This resource specification was automatically generated |
|
6597 |
by the ImageEditor of ST/X." |
|
6598 |
||
6599 |
"Do not manually edit this!! If it is corrupted, |
|
6600 |
the ImageEditor may not be able to read the specification." |
|
6601 |
||
6602 |
" |
|
6603 |
self settingsIcon inspect |
|
6604 |
ImageEditor openOnClass:self andSelector:#settingsIcon |
|
6605 |
Icon flushCachedIcons |
|
6606 |
" |
|
6607 |
||
6608 |
<resource: #image> |
|
6609 |
||
6610 |
^Icon |
|
6611 |
constantNamed:#'AbstractLauncherApplication::SettingsDialog class settingsIcon' |
|
6612 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
6613 |
@@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 |
|
6614 |
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 |
|
6615 |
,-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+:: |
|
6616 |
-;8\TWECKBD9)T=0]R40AXOE2;F5-;:/G6)EKBD?ZF5KV#ITJ0M>''*B_''ZF]''5,(KA8)X8ENU#XR@ )L^1$YFQ$YFQ$WBA PE@QMVSDON82S@@@@@@@@@@@@ |
|
6617 |
@@A_@F)IU#DQMWH@@@@@@@@@@@@@@@@@@F1JWC\LMJI''^ @@@@@@@@@@@@@@@F9GU28ROGI%+VY4@@@@@@@@@@@@@GIFXC(IL9(@^VR*X''\@@@@@@@@@@@AU |
|
6618 |
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] |
|
6619 |
! ! |
|
6620 |
||
6621 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'application list access'! |
|
6622 |
||
6623 |
settingsAppListClasses |
|
6624 |
||
6625 |
^ self applList collect:[:entry | entry at:2]. |
|
6626 |
! |
|
6627 |
||
6628 |
settingsAppListNames |
|
6629 |
||
6630 |
^ self applList collect:[:entry | entry first]. |
|
6631 |
! ! |
|
6632 |
||
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6633 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'applications'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6634 |
|
4244 | 6635 |
addApplClass:aClass withName:aName |
6636 |
||
4322 | 6637 |
self addApplClass:aClass withName:aName inCategory:nil icon:nil. |
4311 | 6638 |
! |
6639 |
||
6640 |
addApplClass:aClass withName:aName inCategory:aCategory icon:icon |
|
6641 |
||
6642 |
ApplicationList isNil ifTrue:[ |
|
6643 |
self initialize. |
|
4322 | 6644 |
]. |
6645 |
(self settingsAppListNames includes:aName) ifTrue:[ |
|
6646 |
^ self. |
|
6647 |
]. |
|
6648 |
(self settingsAppListNames includes:aCategory) not ifTrue:[ |
|
6649 |
self error:'category for listentry doesnt exist' |
|
4311 | 6650 |
]. |
6651 |
ApplicationList add:(Array with:aName with:aClass asString asSymbol with:aCategory with:icon) |
|
6652 |
! |
|
6653 |
||
6654 |
addCategory:aCatString inCategory:aInCatStringOrNil icon:aIcon |
|
6655 |
||
6656 |
" add a new category aCatString under categorie aInCatStringOrNil with icon |
|
6657 |
if aInCatStringOrNil is nil the category is inserted under root " |
|
6658 |
||
6659 |
ApplicationList isNil ifTrue:[ |
|
6660 |
self initialize. |
|
6661 |
]. |
|
6662 |
ApplicationList add:(Array with:aCatString with:nil with:aInCatStringOrNil with:aIcon) |
|
4244 | 6663 |
! |
6664 |
||
6665 |
applList |
|
6666 |
ApplicationList isNil ifTrue:[ |
|
6667 |
self initialize. |
|
6668 |
]. |
|
6669 |
^ ApplicationList |
|
6670 |
! |
|
6671 |
||
4287 | 6672 |
defaultAppList |
6673 |
" list of settings applications |
|
4311 | 6674 |
format: nameString applicationClassNameMethodOrNil inCategory iconClass iconSelector" |
6675 |
||
6676 |
| appList | |
|
6677 |
appList := OrderedCollection new. |
|
6678 |
#( |
|
4312 | 6679 |
#('Tools' #'AbstractSettingsApplication::ToolsSettingsAppl' nil nil nil) |
6680 |
#('Language' #'AbstractSettingsApplication::LanguageSettingsAppl' nil nil nil ) |
|
6681 |
#('Keyboard Mappings' #'AbstractSettingsApplication::KbdMappingSettingsAppl' nil nil nil ) |
|
6682 |
#('Style Selection' #'AbstractSettingsApplication::StyleSettingsAppl' nil nil nil) |
|
6683 |
#('System Messages' #'AbstractSettingsApplication::SystemMessageSettingsAppl' nil nil nil) |
|
6684 |
#('Compiler' #'AbstractSettingsApplication::CompilerSettingsAppl' nil nil nil) |
|
6685 |
#('Memory' #'AbstractSettingsApplication::MemorySettingsAppl' nil nil nil) |
|
6686 |
#('SourceCode & Debugger' #'AbstractSettingsApplication::SourceAndDebuggerSettingsAppl' nil nil nil) |
|
6687 |
#('Printer' #'AbstractSettingsApplication::PrinterSettingsAppl' nil nil nil) |
|
6688 |
#('Display' #'AbstractSettingsApplication::DisplaySettingsAppl' nil nil nil) |
|
6689 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' nil nil nil) |
|
4311 | 6690 |
#('Misc' #'AbstractSettingsApplication::MiscSettingsAppl' nil nil nil) |
6691 |
#('Communication' nil nil #'AbstractLauncherApplication::SettingsDialog' #communicationIcon) |
|
4312 | 6692 |
#('RDoIt' #'AbstractSettingsApplication::RDoItServerSettingsAppl' 'Communication' nil nil) |
6693 |
#('HTTP Server' #'AbstractSettingsApplication::HTTPServerSettingsAppl' 'Communication' nil nil) |
|
6694 |
#('OSI Protocol' #'AbstractSettingsApplication::OsiSettingsAppl' 'Communication' nil nil) |
|
6695 |
#('Misc' #'AbstractSettingsApplication::MiscCommunicationSettingsAppl' 'Communication' nil nil) |
|
4311 | 6696 |
) do:[ :entry| | nameString applicationClassNameMethodOrNil inCategory iconClass iconSelector icon | |
6697 |
nameString := entry at:1. |
|
6698 |
applicationClassNameMethodOrNil := entry at:2. |
|
6699 |
inCategory := entry at:3. |
|
6700 |
iconClass := entry at:4. |
|
6701 |
iconSelector := entry at:5. |
|
6702 |
(iconClass notNil and:[iconSelector notNil]) ifTrue:[ |
|
6703 |
icon := ((Smalltalk classNamed:iconClass) perform:iconSelector) |
|
6704 |
]. |
|
6705 |
appList add:(Array with:nameString with:applicationClassNameMethodOrNil with:inCategory with:icon). |
|
6706 |
]. |
|
6707 |
^ appList |
|
6708 |
! |
|
6709 |
||
6710 |
removeApplByClass:aClass |
|
4244 | 6711 |
|
4322 | 6712 |
| classEntries| |
4244 | 6713 |
|
6714 |
ApplicationList isNil ifTrue:[ |
|
6715 |
self initialize. |
|
6716 |
]. |
|
4322 | 6717 |
classEntries := ApplicationList select:[: aEntry | ((aEntry at:2) == aClass)]. |
6718 |
ApplicationList removeAll:classEntries. |
|
4244 | 6719 |
! |
6720 |
||
4311 | 6721 |
removeCategoryByName:aCatName |
6722 |
||
6723 |
|index| |
|
6724 |
||
6725 |
ApplicationList isNil ifTrue:[ |
|
6726 |
self initialize. |
|
6727 |
]. |
|
6728 |
index := ApplicationList findFirst:[:el | |
|
6729 |
el first == aCatName |
|
6730 |
]. |
|
6731 |
index ~~ 0 ifTrue:[ |
|
6732 |
ApplicationList removeIndex:index. |
|
6733 |
]. |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6734 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6735 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6736 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'initialize'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6737 |
|
4244 | 6738 |
initialize |
6739 |
||
4287 | 6740 |
ApplicationList := self defaultAppList asOrderedCollection. |
4244 | 6741 |
|
6742 |
" |
|
6743 |
self initialize |
|
6744 |
" |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6745 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6746 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6747 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'interface specs'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6748 |
|
4244 | 6749 |
windowSpec |
6750 |
"This resource specification was automatically generated |
|
6751 |
by the UIPainter of ST/X." |
|
6752 |
||
6753 |
"Do not manually edit this!! If it is corrupted, |
|
6754 |
the UIPainter may not be able to read the specification." |
|
6755 |
||
6756 |
" |
|
6757 |
UIPainter new openOnClass:AbstractLauncherApplication::SettingsDialog andSelector:#windowSpec |
|
6758 |
AbstractLauncherApplication::SettingsDialog new openInterface:#windowSpec |
|
6759 |
AbstractLauncherApplication::SettingsDialog open |
|
6760 |
" |
|
6761 |
||
6762 |
<resource: #canvas> |
|
6763 |
||
6764 |
^ |
|
6765 |
#(#FullSpec |
|
6766 |
#name: #windowSpec |
|
6767 |
#window: |
|
6768 |
#(#WindowSpec |
|
6769 |
#label: 'Settings Dialog' |
|
6770 |
#name: 'Settings Dialog' |
|
6771 |
#min: #(#Point 10 10) |
|
6772 |
#max: #(#Point 1024 768) |
|
4311 | 6773 |
#bounds: #(#Rectangle 16 42 816 662) |
4244 | 6774 |
#menu: #mainMenu |
6775 |
) |
|
6776 |
#component: |
|
6777 |
#(#SpecCollection |
|
6778 |
#collection: #( |
|
4311 | 6779 |
#(#VariableHorizontalPanelSpec |
6780 |
#name: 'VariableHorizontalPanel1' |
|
4244 | 6781 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
4311 | 6782 |
#showHandle: true |
6783 |
#snapMode: #both |
|
6784 |
#component: |
|
6785 |
#(#SpecCollection |
|
6786 |
#collection: #( |
|
6787 |
#(#ViewSpec |
|
6788 |
#name: 'Box1' |
|
6789 |
#component: |
|
6790 |
#(#SpecCollection |
|
6791 |
#collection: #( |
|
6792 |
#(#HierarchicalListViewSpec |
|
6793 |
#name: 'HierarchicalListView1' |
|
6794 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1) |
|
6795 |
#model: #selectionInApplList |
|
6796 |
#hasHorizontalScrollBar: true |
|
6797 |
#hasVerticalScrollBar: true |
|
6798 |
#listModel: #applList |
|
6799 |
#useIndex: false |
|
6800 |
#highlightMode: #label |
|
6801 |
#showLeftIndicators: false |
|
6802 |
#indicatorSelector: #doIndicatorClick: |
|
6803 |
) |
|
6804 |
#(#HorizontalPanelViewSpec |
|
6805 |
#name: 'HorizontalPanel2' |
|
6806 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1) |
|
6807 |
#horizontalLayout: #fitSpace |
|
6808 |
#verticalLayout: #center |
|
6809 |
#horizontalSpace: 3 |
|
6810 |
#verticalSpace: 3 |
|
6811 |
#component: |
|
6812 |
#(#SpecCollection |
|
6813 |
#collection: #( |
|
6814 |
#(#ActionButtonSpec |
|
6815 |
#label: 'Save to Disc ...' |
|
6816 |
#name: 'Button1' |
|
6817 |
#translateLabel: true |
|
6818 |
#model: #saveSettings |
|
6819 |
#enableChannel: #enableButtons |
|
6820 |
#extent: #(#Point 128 22) |
|
6821 |
) |
|
6822 |
#(#ActionButtonSpec |
|
6823 |
#label: 'Load from Disc ...' |
|
6824 |
#name: 'Button2' |
|
6825 |
#translateLabel: true |
|
6826 |
#model: #loadSettings |
|
6827 |
#enableChannel: #enableButtons |
|
6828 |
#extent: #(#Point 128 22) |
|
6829 |
) |
|
6830 |
) |
|
6831 |
||
6832 |
) |
|
6833 |
) |
|
6834 |
) |
|
6835 |
||
6836 |
) |
|
6837 |
) |
|
6838 |
#(#ViewSpec |
|
6839 |
#name: 'Box2' |
|
6840 |
#component: |
|
6841 |
#(#SpecCollection |
|
6842 |
#collection: #( |
|
6843 |
#(#SubCanvasSpec |
|
6844 |
#name: 'SubCanvas' |
|
6845 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1) |
|
6846 |
#level: -1 |
|
6847 |
#hasHorizontalScrollBar: false |
|
6848 |
#hasVerticalScrollBar: false |
|
6849 |
#clientHolder: #subCanvasApplicationHolder |
|
6850 |
#postBuildCallback: #postBuildSubCanvas: |
|
6851 |
) |
|
6852 |
#(#HorizontalPanelViewSpec |
|
6853 |
#name: 'HorizontalPanel1' |
|
6854 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1) |
|
6855 |
#horizontalLayout: #fitSpace |
|
6856 |
#verticalLayout: #center |
|
6857 |
#horizontalSpace: 3 |
|
6858 |
#verticalSpace: 3 |
|
6859 |
#component: |
|
6860 |
#(#SpecCollection |
|
6861 |
#collection: #( |
|
6862 |
#(#ActionButtonSpec |
|
6863 |
#label: 'OK' |
|
6864 |
#name: 'OK' |
|
6865 |
#translateLabel: true |
|
6866 |
#model: #doSave |
|
6867 |
#enableChannel: #enableButtons |
|
6868 |
#extent: #(#Point 127 22) |
|
6869 |
) |
|
6870 |
#(#ActionButtonSpec |
|
6871 |
#label: 'Reload' |
|
6872 |
#name: 'Reload' |
|
6873 |
#translateLabel: true |
|
6874 |
#model: #doReload |
|
6875 |
#enableChannel: #enableButtons |
|
6876 |
#extent: #(#Point 128 22) |
|
6877 |
) |
|
6878 |
#(#ActionButtonSpec |
|
6879 |
#label: 'Cancel' |
|
6880 |
#name: 'Cancel' |
|
6881 |
#translateLabel: true |
|
6882 |
#model: #closeRequest |
|
6883 |
#extent: #(#Point 127 22) |
|
6884 |
) |
|
6885 |
#(#ActionButtonSpec |
|
6886 |
#label: 'Help' |
|
6887 |
#name: 'Help' |
|
6888 |
#translateLabel: true |
|
6889 |
#model: #help |
|
6890 |
#enableChannel: #enableButtons |
|
6891 |
#extent: #(#Point 128 22) |
|
6892 |
) |
|
6893 |
) |
|
6894 |
||
6895 |
) |
|
6896 |
) |
|
6897 |
) |
|
6898 |
||
6899 |
) |
|
6900 |
) |
|
6901 |
) |
|
6902 |
||
6903 |
) |
|
6904 |
#handles: #(#Any 0.3375 1.0) |
|
4244 | 6905 |
) |
6906 |
) |
|
6907 |
||
6908 |
) |
|
6909 |
) |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6910 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6911 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6912 |
!AbstractLauncherApplication::SettingsDialog class methodsFor:'menu specs'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6913 |
|
4244 | 6914 |
mainMenu |
6915 |
"This resource specification was automatically generated |
|
6916 |
by the MenuEditor of ST/X." |
|
6917 |
||
6918 |
"Do not manually edit this!! If it is corrupted, |
|
6919 |
the MenuEditor may not be able to read the specification." |
|
6920 |
||
6921 |
" |
|
6922 |
MenuEditor new openOnClass:SettingsDialog andSelector:#mainMenu |
|
6923 |
(Menu new fromLiteralArrayEncoding:(SettingsDialog mainMenu)) startUp |
|
6924 |
" |
|
6925 |
||
6926 |
<resource: #menu> |
|
6927 |
||
6928 |
^ |
|
6929 |
#(#Menu |
|
6930 |
#( |
|
6931 |
#(#MenuItem |
|
6932 |
#label: 'File' |
|
6933 |
#translateLabel: true |
|
6934 |
#submenu: |
|
6935 |
#(#Menu |
|
6936 |
#( |
|
6937 |
#(#MenuItem |
|
6938 |
#label: 'Load Settings...' |
|
6939 |
#itemValue: #loadSettings |
|
6940 |
#translateLabel: true |
|
6941 |
) |
|
6942 |
#(#MenuItem |
|
6943 |
#label: 'Save Settings...' |
|
6944 |
#itemValue: #saveSettings |
|
6945 |
#translateLabel: true |
|
6946 |
) |
|
6947 |
#(#MenuItem |
|
6948 |
#label: 'Exit' |
|
6949 |
#itemValue: #closeRequest |
|
6950 |
#translateLabel: true |
|
6951 |
) |
|
6952 |
) |
|
6953 |
nil |
|
6954 |
nil |
|
6955 |
) |
|
6956 |
) |
|
6957 |
) |
|
6958 |
nil |
|
6959 |
nil |
|
6960 |
) |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6961 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6962 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6963 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'accessing'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6964 |
|
4244 | 6965 |
requestor |
6966 |
"return the 'requestor' of the SettingsDialog" |
|
6967 |
||
6968 |
^ requestor |
|
6969 |
! |
|
6970 |
||
6971 |
requestor:something |
|
6972 |
"set the value of the instance variable 'requestor' (automatically generated)" |
|
6973 |
||
6974 |
requestor := something. |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6975 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6976 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6977 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'actions'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
6978 |
|
4311 | 6979 |
destroyAll |
6980 |
||
6981 |
self applList do:[ : applItem | |
|
6982 |
(applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
4325 | 6983 |
applItem application close. |
4311 | 6984 |
]. |
6985 |
]. |
|
6986 |
^ true |
|
6987 |
! |
|
6988 |
||
6989 |
doIndicatorClick:index |
|
6990 |
"handle a click on the indicator |
|
6991 |
" |
|
6992 |
||
6993 |
(applList at:index) toggleExpand |
|
6994 |
! |
|
6995 |
||
6996 |
doReload |
|
6997 |
||
6998 |
| item | |
|
6999 |
||
7000 |
item := self selectionInApplList value. |
|
7001 |
(item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7002 |
item application loadRequest. |
|
7003 |
! |
|
7004 |
||
7005 |
doSave |
|
7006 |
| item | |
|
7007 |
||
7008 |
item := self selectionInApplList value. |
|
7009 |
(item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7010 |
item application saveRequest. |
|
7011 |
! |
|
7012 |
||
7013 |
help |
|
7014 |
||
7015 |
| item | |
|
7016 |
||
7017 |
item := self selectionInApplList value. |
|
7018 |
(item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7019 |
item application help. |
|
7020 |
! |
|
7021 |
||
7022 |
sendLoadRequestToAll |
|
7023 |
||
7024 |
self applList do:[ : applItem | |
|
7025 |
(applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
4328 | 7026 |
^ applItem application loadRequest |
4311 | 7027 |
]. |
7028 |
]. |
|
4328 | 7029 |
^ true |
4311 | 7030 |
! |
7031 |
||
7032 |
sendSaveRequestToAll |
|
7033 |
||
7034 |
self applList do:[ : applItem | |
|
7035 |
(applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
7036 |
applItem application saveRequest ifFalse:[ |
|
7037 |
^ false |
|
7038 |
]. |
|
4258 | 7039 |
]. |
4244 | 7040 |
]. |
7041 |
^ true |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7042 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7043 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7044 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'aspects'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7045 |
|
4311 | 7046 |
appIsCategory |
7047 |
||
7048 |
appIsCategory isNil ifTrue:[ |
|
7049 |
appIsCategory := false asValue. |
|
7050 |
]. |
|
7051 |
^ appIsCategory. |
|
7052 |
! |
|
7053 |
||
7054 |
applList |
|
7055 |
||
7056 |
applList isNil ifTrue:[ |
|
7057 |
applList := AbstractLauncherApplication::HierarchicalSettingsApplList new. |
|
7058 |
]. |
|
7059 |
^ applList. |
|
7060 |
! |
|
7061 |
||
7062 |
enableButtons |
|
7063 |
||
7064 |
enableButtons isNil ifTrue:[ |
|
7065 |
enableButtons := true asValue. |
|
7066 |
]. |
|
7067 |
^ enableButtons. |
|
7068 |
! |
|
7069 |
||
7070 |
selectionInApplList |
|
7071 |
||
7072 |
selectionInApplList isNil ifTrue:[ |
|
7073 |
selectionInApplList := ValueHolder new. |
|
7074 |
selectionInApplList addDependent:self. |
|
7075 |
]. |
|
7076 |
^ selectionInApplList. |
|
4244 | 7077 |
! |
7078 |
||
7079 |
settingsAppList |
|
7080 |
||
7081 |
^ self class settingsAppListNames. |
|
4311 | 7082 |
! |
7083 |
||
7084 |
subCanvasApplicationHolder |
|
7085 |
||
7086 |
subCanvasApplicationHolder isNil ifTrue:[ |
|
7087 |
subCanvasApplicationHolder := ValueHolder new. |
|
7088 |
]. |
|
7089 |
^ subCanvasApplicationHolder. |
|
7090 |
! ! |
|
7091 |
||
7092 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'change & update'! |
|
7093 |
||
7094 |
selectionChanged |
|
7095 |
||
7096 |
| item isCat oldAppl| |
|
7097 |
||
7098 |
oldAppl := self subCanvasApplicationHolder value. |
|
7099 |
oldAppl notNil ifTrue:[ |
|
7100 |
oldAppl saveRequest. |
|
7101 |
]. |
|
7102 |
item := self selectionInApplList value. |
|
7103 |
isCat := item isCategory. |
|
7104 |
self enableButtons value:(isCat not). |
|
7105 |
isCat ifTrue:[ |
|
7106 |
self subCanvasApplicationHolder value:nil. |
|
7107 |
^ self |
|
7108 |
]. |
|
7109 |
item application isNil ifTrue:[ |
|
4312 | 7110 |
item application:(item applClass new). |
4311 | 7111 |
]. |
7112 |
self subCanvasApplicationHolder value:item application. |
|
7113 |
! |
|
7114 |
||
7115 |
update:something with:aParameter from:changedObject |
|
7116 |
"Invoked when an object that I depend upon sends a change notification." |
|
7117 |
||
7118 |
"stub code automatically generated - please change as required" |
|
7119 |
||
7120 |
changedObject == self selectionInApplList ifTrue:[ |
|
7121 |
self selectionChanged. |
|
7122 |
^ self |
|
7123 |
]. |
|
7124 |
super update:something with:aParameter from:changedObject |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7125 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7126 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7127 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'initialization & release'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7128 |
|
4244 | 7129 |
closeDownViews |
7130 |
"This is a hook method generated by the Browser. |
|
7131 |
It will be invoked when your app/dialog-window is really closed. |
|
7132 |
See also #closeDownViews, which is invoked before and may suppress the close |
|
7133 |
or ask the user for confirmation." |
|
7134 |
||
7135 |
"/ change the code below as required ... |
|
7136 |
"/ This should cleanup any leftover resources |
|
7137 |
"/ (for example, temporary files) |
|
7138 |
"/ super closeRequest will initiate the closeDown |
|
7139 |
||
7140 |
"/ add your code here |
|
7141 |
||
7142 |
"/ do not remove the one below ... |
|
7143 |
^ super closeDownViews |
|
7144 |
! |
|
7145 |
||
7146 |
closeRequest |
|
7147 |
"This is a hook method generated by the Browser. |
|
7148 |
It will be invoked when your app/dialog-window is about to be |
|
7149 |
closed (this method has a chance to suppress the close). |
|
7150 |
See also #closeDownViews, which is invoked when the close is really done." |
|
7151 |
||
4311 | 7152 |
self sendSaveRequestToAll ifFalse:[ ^ self]. |
7153 |
self destroyAll. |
|
4244 | 7154 |
^ super closeRequest |
7155 |
! |
|
7156 |
||
7157 |
initialize |
|
7158 |
||
4258 | 7159 |
resources := self class owningClass resources. |
4311 | 7160 |
self initializeApplList. |
4244 | 7161 |
super initialize. |
7162 |
! |
|
7163 |
||
4311 | 7164 |
initializeApplList |
7165 |
||
7166 |
| rootItem itemClass parent| |
|
7167 |
applList := AbstractLauncherApplication::HierarchicalSettingsApplList new. |
|
7168 |
itemClass := applList class itemClass. |
|
7169 |
rootItem := itemClass new. |
|
7170 |
rootItem label:(Text string:(resources string:'Settings') emphasis:#bold). |
|
4322 | 7171 |
rootItem nameString:'Settings'. |
4311 | 7172 |
rootItem icon:self class settingsIcon. |
7173 |
self class applList do:[:entry | |
|
7174 |
|newItem nameString applicationClassNameMethodOrNil icon inCategory| |
|
7175 |
nameString := entry at:1. |
|
7176 |
applicationClassNameMethodOrNil := entry at:2. |
|
7177 |
inCategory := entry at:3. |
|
7178 |
icon := entry at:4. |
|
7179 |
||
4322 | 7180 |
newItem := itemClass new. |
4311 | 7181 |
newItem label:(Text string:(resources string:nameString) emphasis:#bold). |
4322 | 7182 |
newItem nameString:nameString. |
4312 | 7183 |
applicationClassNameMethodOrNil notNil ifTrue:[ |
7184 |
newItem applClass:(Smalltalk classNamed:applicationClassNameMethodOrNil). |
|
7185 |
]. |
|
4311 | 7186 |
(icon isNil) ifTrue:[ |
4312 | 7187 |
(newItem applClass notNil and:[newItem applClass respondsTo:#defaultIcon]) ifTrue:[ |
7188 |
icon := newItem applClass defaultIcon. |
|
7189 |
]. |
|
7190 |
icon isNil ifTrue:[ |
|
7191 |
icon := self class defaultSettingsAppIcon. |
|
7192 |
]. |
|
4311 | 7193 |
]. |
7194 |
newItem icon:icon. |
|
7195 |
inCategory notNil ifTrue:[ |
|
7196 |
parent := self recursiveGetParentFor:inCategory fromItem:rootItem. |
|
4322 | 7197 |
parent isNil ifTrue:[self error:('category:', inCategory, ' for:', newItem label, ' does not exist') mayProceed:true]. |
4311 | 7198 |
parent children isNil ifTrue:[ |
7199 |
parent children:(OrderedCollection with:newItem) |
|
7200 |
] ifFalse:[ |
|
7201 |
| newColl | |
|
7202 |
newColl := parent children copy. |
|
7203 |
newColl add:newItem. |
|
7204 |
parent children:newColl. |
|
7205 |
] |
|
4244 | 7206 |
] ifFalse:[ |
4311 | 7207 |
rootItem children isNil ifTrue:[ |
7208 |
rootItem children:(OrderedCollection with:newItem) |
|
7209 |
] ifFalse:[ |
|
7210 |
| newColl | |
|
7211 |
newColl := rootItem children copy. |
|
7212 |
newColl add:newItem. |
|
7213 |
rootItem children:newColl. |
|
7214 |
] |
|
4244 | 7215 |
] |
7216 |
]. |
|
4311 | 7217 |
|
7218 |
"/ applList showLeftIndicators:true. |
|
7219 |
"/ applList showRoot:true. |
|
7220 |
self selectionInApplList value:rootItem. |
|
7221 |
applList root:rootItem. |
|
7222 |
rootItem expand. |
|
7223 |
! |
|
7224 |
||
7225 |
postBuildSubCanvas:aWidget |
|
7226 |
||
7227 |
aWidget keepClientView:true. |
|
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7228 |
! ! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7229 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7230 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'menu actions'! |
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7231 |
|
4244 | 7232 |
loadSettings |
7233 |
||
7234 |
"restore settings from a settings-file." |
|
7235 |
||
7236 |
"a temporary kludge - we need a central systemSettings object for this, |
|
7237 |
which can be saved/restored with a single store/read." |
|
7238 |
||
7239 |
|fileName| |
|
7240 |
||
7241 |
fileName := Dialog |
|
7242 |
requestFileName:(resources string:'Load Settings From:') |
|
7243 |
default:'settings.stx' |
|
7244 |
ok:(resources string:'Load') |
|
7245 |
abort:(resources string:'Cancel') |
|
7246 |
pattern:'*.stx' |
|
7247 |
fromDirectory:nil. |
|
7248 |
||
7249 |
(fileName size == 0) ifTrue:[ |
|
7250 |
"/ canceled |
|
7251 |
^ self |
|
7252 |
]. |
|
7253 |
||
7254 |
self withWaitCursorDo:[ |
|
7255 |
Smalltalk fileIn:fileName. |
|
7256 |
Transcript current topView model reOpen. |
|
4311 | 7257 |
self sendLoadRequestToAll. |
4244 | 7258 |
]. |
7259 |
! |
|
7260 |
||
7261 |
saveSettings |
|
7262 |
||
7263 |
|fileName resources| |
|
7264 |
||
7265 |
resources := self class owningClass classResources. |
|
7266 |
||
7267 |
fileName := Dialog |
|
7268 |
requestFileName:(resources string:'Save settings in:') |
|
7269 |
default:'settings.stx' |
|
7270 |
ok:(resources string:'Save') |
|
7271 |
abort:(resources string:'Cancel') |
|
7272 |
pattern:'*.stx' |
|
7273 |
fromDirectory:'.'. |
|
7274 |
||
7275 |
fileName size ~~ 0 ifTrue:[ |
|
7276 |
"not canceled" |
|
7277 |
self saveSettingsIn:fileName. |
|
4243 | 7278 |
] |
4244 | 7279 |
! |
7280 |
||
7281 |
saveSettingsIn:fileName |
|
7282 |
"save settings to a settings-file." |
|
7283 |
||
7284 |
"a temporary kludge - we need a central systemSettings object for this, |
|
7285 |
which can be saved/restored with a single store/read. |
|
7286 |
Will move entries over to UserPreferences over time; |
|
7287 |
new items should always go there." |
|
7288 |
||
7289 |
|resources s screen currentUserPrefs| |
|
7290 |
||
7291 |
resources := self class owningClass classResources. |
|
7292 |
||
7293 |
s := fileName asFilename writeStream. |
|
7294 |
s isNil ifTrue:[ |
|
7295 |
self warn:(resources string:'Cannot write the %1 file !!' with:fileName). |
|
7296 |
^ self |
|
7297 |
]. |
|
7298 |
||
7299 |
currentUserPrefs := UserPreferences current. |
|
7300 |
screen := Screen current. |
|
7301 |
||
7302 |
s nextPutLine:'"/ ST/X saved settings'; |
|
7303 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
7304 |
nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
|
7305 |
nextPutLine:'"/'; |
|
7306 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
7307 |
nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
7308 |
nextPutLine:'"/'. |
|
7309 |
s cr. |
|
7310 |
||
7311 |
s nextPutLine:'"/'. |
|
7312 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
7313 |
s nextPutLine:'"/'. |
|
7314 |
s cr. |
|
7315 |
||
7316 |
s nextPutLine:'"/'. |
|
7317 |
s nextPutLine:'"/ Display settings:'. |
|
7318 |
s nextPutLine:'"/'. |
|
7319 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
7320 |
s nextPutLine:'Display notNil ifTrue:['. |
|
7321 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
7322 |
screen fixColors notNil ifTrue:[ |
|
7323 |
s nextPutLine:' Image flushDeviceImages.'. |
|
7324 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
7325 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
7326 |
s nextPutLine:' ].'. |
|
7327 |
] ifFalse:[ |
|
7328 |
s nextPutLine:' Display releaseFixColors.'. |
|
7329 |
]. |
|
7330 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
7331 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
7332 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
7333 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
7334 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
7335 |
s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
|
7336 |
s nextPutLine:' ].'. |
|
7337 |
s nextPutLine:'].'. |
|
7338 |
s cr. |
|
7339 |
||
7340 |
s nextPutLine:'"/'. |
|
7341 |
s nextPutLine:'"/ Compiler settings:'. |
|
7342 |
s nextPutLine:'"/'. |
|
7343 |
s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
7344 |
nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
7345 |
nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
7346 |
nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
7347 |
nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.'; |
|
7348 |
nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
|
7349 |
nextPutLine:'Compiler allowSqueakExtensions: ' , (Compiler allowSqueakExtensions storeString) , '.'; |
|
7350 |
nextPutLine:'Compiler allowDolphinExtensions: ' , (Compiler allowDolphinExtensions storeString) , '.'; |
|
7351 |
nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
7352 |
nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
7353 |
||
7354 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
7355 |
nextPutLine:'Compiler stcCompilation: ' , (Compiler stcCompilation storeString) , '.'; |
|
7356 |
nextPutLine:'OperatingSystem getOSType = ' , (OperatingSystem getOSType storeString) , ' ifTrue:['; |
|
7357 |
nextPutLine:' Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
7358 |
nextPutLine:' Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
7359 |
nextPutLine:' Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
7360 |
nextPutLine:' ' , (Compiler stcModulePath storeString) , ' asFilename exists ifTrue:['; |
|
7361 |
nextPutLine:' Compiler stcModulePath: ' , (Compiler stcModulePath storeString) , '.'; |
|
7362 |
nextPutLine:' ].'; |
|
7363 |
nextPutLine:' Compiler stcPath: ' , (Compiler stcPath storeString) , '.'; |
|
7364 |
nextPutLine:' Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
7365 |
nextPutLine:' Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
7366 |
nextPutLine:' ObjectFileLoader linkArgs: ' , (ObjectFileLoader linkArgs storeString) , '.'; |
|
7367 |
nextPutLine:' ObjectFileLoader linkCommand: ' , (ObjectFileLoader linkCommand storeString) , '.'; |
|
7368 |
nextPutLine:' ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'; |
|
7369 |
nextPutLine:' ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'; |
|
7370 |
nextPutLine:'].'; |
|
7371 |
||
7372 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
7373 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
7374 |
||
7375 |
HistoryManager notNil ifTrue:[ |
|
7376 |
HistoryManager isActive ifTrue:[ |
|
7377 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
7378 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
7379 |
] ifFalse:[ |
|
7380 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
7381 |
]. |
|
7382 |
]. |
|
7383 |
||
7384 |
ObjectFileLoader notNil ifTrue:[ |
|
7385 |
s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
|
7386 |
s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
7387 |
]. |
|
7388 |
||
7389 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
7390 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
7391 |
||
7392 |
s cr. |
|
7393 |
s nextPutLine:'"/'. |
|
7394 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
7395 |
s nextPutLine:'"/'. |
|
7396 |
s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
7397 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
7398 |
nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
7399 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
7400 |
||
7401 |
FlyByHelp isActive ifTrue:[ |
|
7402 |
s nextPutLine:'FlyByHelp start.' |
|
7403 |
]. |
|
7404 |
||
7405 |
s cr. |
|
7406 |
s nextPutLine:'"/'. |
|
7407 |
s nextPutLine:'"/ Edit settings:'. |
|
7408 |
s nextPutLine:'"/'. |
|
7409 |
"/ s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'. |
|
7410 |
s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'. |
|
7411 |
s nextPutLine:'UserPreferences current syntaxColoring: ' , (currentUserPrefs syntaxColoring storeString) , '.'. |
|
7412 |
(ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[ |
|
7413 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab4Positions).'. |
|
7414 |
] ifFalse:[ |
|
7415 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab8Positions).'. |
|
7416 |
]. |
|
7417 |
||
7418 |
s nextPutLine:'"/'. |
|
7419 |
s nextPutLine:'"/ User preference values:'. |
|
7420 |
s nextPutLine:'"/'. |
|
7421 |
currentUserPrefs keysAndValuesDo:[:k :v | |
|
7422 |
(UserPreferences includesSelector:(k , ':') asSymbol) ifTrue:[ |
|
7423 |
s nextPutLine:'UserPreferences current ' , k , ':' , v storeString , '.'. |
|
7424 |
] ifFalse:[ |
|
7425 |
s nextPutLine:'UserPreferences current at:' , k storeString , ' put:' , v storeString , '.'. |
|
7426 |
] |
|
7427 |
]. |
|
7428 |
||
7429 |
s cr. |
|
7430 |
s nextPutLine:'"/'. |
|
7431 |
s nextPutLine:'"/ Misc settings:'. |
|
7432 |
s nextPutLine:'"/'. |
|
7433 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
7434 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
7435 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
7436 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
7437 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
7438 |
||
7439 |
"/ claus - I dont think its a good idea to save those ... |
|
7440 |
nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
7441 |
nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
7442 |
||
7443 |
nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
|
7444 |
nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
7445 |
nextPutLine:'Display notNil ifTrue:['; |
|
7446 |
nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.'; |
|
7447 |
nextPutLine:'].'; |
|
7448 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
|
7449 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
7450 |
(Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[ |
|
7451 |
s nextPutLine:'Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'. |
|
7452 |
]. |
|
7453 |
Processor isTimeSlicing ifTrue:[ |
|
7454 |
s nextPutLine:'Processor startTimeSlicing.'. |
|
7455 |
s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.'). |
|
7456 |
] ifFalse:[ |
|
7457 |
s nextPutLine:'Processor stopTimeSlicing.'. |
|
7458 |
]. |
|
7459 |
||
7460 |
s cr. |
|
7461 |
s nextPutLine:'"/'. |
|
7462 |
s nextPutLine:'"/ Printer settings:'. |
|
7463 |
s nextPutLine:'"/'. |
|
7464 |
s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
7465 |
nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
7466 |
||
7467 |
Printer supportsPageSizes ifTrue:[ |
|
7468 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
|
7469 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
7470 |
]. |
|
7471 |
Printer supportsMargins ifTrue:[ |
|
7472 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
|
7473 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
7474 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
7475 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
7476 |
]. |
|
7477 |
Printer supportsPostscript ifTrue:[ |
|
7478 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
|
7479 |
]. |
|
7480 |
||
7481 |
s cr. |
|
7482 |
s nextPutLine:'"/'. |
|
7483 |
s nextPutLine:'"/ Font settings:'. |
|
7484 |
s nextPutLine:'"/ (only restored, if image is restarted on the same display)'. |
|
7485 |
s nextPutLine:'"/'. |
|
7486 |
s nextPutLine:'Display notNil ifTrue:['. |
|
7487 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
7488 |
s nextPutLine:' View defaultFont: ' , (View defaultFont storeString) , '.'. |
|
7489 |
s nextPutLine:' Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
|
7490 |
s nextPutLine:' Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
|
7491 |
s nextPutLine:' Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
|
7492 |
s nextPutLine:' SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
|
7493 |
s nextPutLine:' MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
|
7494 |
s nextPutLine:' PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
|
7495 |
s nextPutLine:' TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
|
7496 |
s nextPutLine:' EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
|
7497 |
s nextPutLine:' CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
|
7498 |
s nextPutLine:' ].'. |
|
7499 |
s nextPutLine:'].'. |
|
7500 |
||
7501 |
s cr. |
|
7502 |
s nextPutLine:'"/'. |
|
7503 |
s nextPutLine:'"/ Language setting:'. |
|
7504 |
s nextPutLine:'"/'. |
|
7505 |
s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
7506 |
s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
7507 |
||
7508 |
s cr. |
|
7509 |
s nextPutLine:'"/'. |
|
7510 |
s nextPutLine:'"/ SourceCodeManager settings:'. |
|
7511 |
s nextPutLine:'"/ (only restored, if image is restarted on the same host)'. |
|
7512 |
s nextPutLine:'"/'. |
|
7513 |
s nextPutLine:'OperatingSystem getHostName = ' , (OperatingSystem getHostName storeString) , ' ifTrue:['. |
|
7514 |
s nextPutLine:' Class tryLocalSourceFirst:' , Class tryLocalSourceFirst storeString , '.'. |
|
7515 |
(Smalltalk at:#SourceCodeManager) == CVSSourceCodeManager ifTrue:[ |
|
7516 |
s nextPutLine:' Smalltalk at:#SourceCodeManager put: CVSSourceCodeManager.'. |
|
7517 |
s nextPutLine:' AbstractSourceCodeManager cacheDirectoryName:' , AbstractSourceCodeManager cacheDirectoryName storeString , '.'. |
|
7518 |
s nextPutLine:' CVSSourceCodeManager cvsBinDirectory:' , CVSSourceCodeManager cvsBinDirectory storeString , '.'. |
|
7519 |
s nextPutLine:' CVSSourceCodeManager repositoryNamesPerModule:' , CVSSourceCodeManager repositoryNamesPerModule storeString , '.'. |
|
7520 |
s nextPutLine:' CVSSourceCodeManager initializeForRepository:' , CVSSourceCodeManager repositoryName storeString , '.'. |
|
7521 |
]. |
|
7522 |
s nextPutLine:'].'. |
|
7523 |
||
7524 |
s close. |
|
7525 |
||
7526 |
" |
|
7527 |
Transcript topView application saveSettings |
|
7528 |
" |
|
7529 |
||
7530 |
"Modified: / 6.1.1999 / 14:24:16 / cg" |
|
4240 | 7531 |
! ! |
7532 |
||
4311 | 7533 |
!AbstractLauncherApplication::SettingsDialog methodsFor:'queries'! |
7534 |
||
7535 |
recursiveGetParentFor:aCategory fromItem:aItem |
|
7536 |
||
7537 |
| children | |
|
7538 |
children := aItem children. |
|
7539 |
children notNil ifTrue:[ |
|
7540 |
children do:[:aChildItem | | newItem | |
|
4322 | 7541 |
aChildItem nameString = aCategory ifTrue:[ ^ aChildItem]. |
4311 | 7542 |
newItem := self recursiveGetParentFor:aCategory fromItem:aChildItem. |
7543 |
newItem notNil ifTrue:[^ newItem]. |
|
4291 | 7544 |
]. |
7545 |
]. |
|
4311 | 7546 |
^ nil |
4291 | 7547 |
! ! |
7548 |
||
2001 | 7549 |
!AbstractLauncherApplication class methodsFor:'documentation'! |
7550 |
||
7551 |
version |
|
4328 | 7552 |
^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.239 2002-11-27 10:02:33 penk Exp $' |
2001 | 7553 |
! ! |
4224
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7554 |
|
6a5892a6c179
first new settings application startup instable in work by penk
penk
parents:
4199
diff
changeset
|
7555 |
AbstractLauncherApplication::SettingsDialog initialize! |