author | Claus Gittinger <cg@exept.de> |
Thu, 16 Dec 1999 21:46:14 +0100 | |
changeset 2493 | e25c257bda20 |
parent 2490 | 924e607d11d8 |
child 2528 | e49663321188 |
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 |
||
2001 | 14 |
ToolApplicationModel subclass:#AbstractLauncherApplication |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
15 |
instanceVariableNames:'transcript' |
2196 | 16 |
classVariableNames:'NotifyingEmergencyHandler OpenLaunchers RegisteredMenuHandlers' |
2001 | 17 |
poolDictionaries:'' |
18 |
category:'Interface-Smalltalk' |
|
19 |
! |
|
20 |
||
21 |
Object subclass:#LauncherDialogs |
|
22 |
instanceVariableNames:'' |
|
23 |
classVariableNames:'' |
|
24 |
poolDictionaries:'' |
|
25 |
privateIn:AbstractLauncherApplication |
|
26 |
! |
|
27 |
||
2195 | 28 |
!AbstractLauncherApplication class methodsFor:'documentation'! |
29 |
||
30 |
copyright |
|
31 |
" |
|
32 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
33 |
All Rights Reserved |
|
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
||
43 |
! |
|
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
This is an abstract class, providing mechanisms and common functionality |
|
48 |
for launcher-type applications. Subclasses may implement their GUI either |
|
49 |
with or without the UIPainter framework, and still use the common functions |
|
50 |
provided here. |
|
51 |
||
52 |
[author:] |
|
53 |
Claus Gittinger, eXept Software AG |
|
54 |
" |
|
55 |
||
56 |
||
57 |
! ! |
|
2001 | 58 |
|
59 |
!AbstractLauncherApplication class methodsFor:'accessing'! |
|
60 |
||
61 |
current |
|
62 |
"return the launcher running on the current screen. |
|
63 |
(for access via addMenu/ removeMenu)" |
|
64 |
||
65 |
|currentScreen| |
|
66 |
||
67 |
OpenLaunchers size > 0 ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
68 |
currentScreen := Screen current. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
69 |
OpenLaunchers do:[:aLauncher | |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
70 |
aLauncher graphicsDevice == currentScreen ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
71 |
^ aLauncher |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
72 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
73 |
] |
2001 | 74 |
]. |
75 |
^ nil. |
|
76 |
||
77 |
" |
|
78 |
Launcher current |
|
79 |
" |
|
80 |
||
81 |
"Modified: / 9.9.1996 / 22:41:36 / stefan" |
|
82 |
"Modified: / 13.10.1998 / 16:09:50 / cg" |
|
83 |
! |
|
84 |
||
85 |
openLaunchers |
|
86 |
"return all opened launchers" |
|
87 |
||
2331 | 88 |
^OpenLaunchers ifNil:[ (OpenLaunchers := IdentitySet new) ]. |
2001 | 89 |
! ! |
90 |
||
91 |
!AbstractLauncherApplication class methodsFor:'defaults'! |
|
92 |
||
93 |
notifyingEmergencyHandler |
|
94 |
"return a block (used as an emergency handler |
|
95 |
for exceptions), which does errorNotification before going |
|
96 |
into the debugger." |
|
97 |
||
98 |
"Remember the handlerBlock, to be able to determine if the current |
|
99 |
handler is the notifying one." |
|
100 |
||
101 |
NotifyingEmergencyHandler isNil ifTrue:[ |
|
2316
6a46309a5e43
NotifyingEmergencyHandler moved to NoHandlerError
Stefan Vogel <sv@exept.de>
parents:
2314
diff
changeset
|
102 |
NotifyingEmergencyHandler := NoHandlerError notifyingEmergencyHandler |
2001 | 103 |
]. |
104 |
^ NotifyingEmergencyHandler |
|
105 |
||
106 |
"Created: 7.1.1997 / 22:18:19 / cg" |
|
107 |
"Modified: 15.1.1997 / 21:15:38 / cg" |
|
108 |
! ! |
|
109 |
||
2195 | 110 |
!AbstractLauncherApplication class methodsFor:'queries'! |
111 |
||
112 |
isVisualStartable |
|
113 |
"return true, if this application can be started via #open" |
|
114 |
||
115 |
^ self isSubclassOf:AbstractLauncherApplication |
|
116 |
||
117 |
||
118 |
! ! |
|
119 |
||
2001 | 120 |
!AbstractLauncherApplication methodsFor:'private'! |
121 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
122 |
findWindow:title |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
123 |
"a helper for find & destroy and find & raise operations; |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
124 |
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
|
125 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
126 |
|knownTopViews nameList box| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
127 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
128 |
knownTopViews := IdentitySet new. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
129 |
Screen allScreens do:[:aScreen | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
130 |
aScreen knownViews do:[:aView | |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
131 |
|top showIt wg| |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
132 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
133 |
aView notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
134 |
top := aView topView. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
135 |
(top isKindOf:DebugView) ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
136 |
"/ although modal, show it. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
137 |
showIt := top realized |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
138 |
] ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
139 |
wg := top windowGroup. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
140 |
showIt := (wg notNil and:[wg isModal not]). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
141 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
142 |
showIt ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
143 |
knownTopViews add:top |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
144 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
145 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
146 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
147 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
148 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
149 |
knownTopViews := knownTopViews asOrderedCollection. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
150 |
knownTopViews sort:[:v1 :v2 | |l1 l2| |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
151 |
l1 := v1 label ? 'aView'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
152 |
l2 := v2 label ? 'aView'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
153 |
l1 < l2 |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
154 |
]. |
2041 | 155 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
156 |
nameList := knownTopViews collect:[:v | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
157 |
|isDead wg p l| |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
158 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
159 |
l := v label ? 'aView'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
160 |
v device == Display ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
161 |
l := l , ' [' , (v device displayName ? '?') , ']' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
162 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
163 |
((wg := v windowGroup) notNil |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
164 |
and:[(p := wg process) notNil |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
165 |
and:[p state ~~ #dead]]) ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
166 |
l |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
167 |
] ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
168 |
l , ' (dead ?)' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
169 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
170 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
171 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
172 |
box := ListSelectionBox new. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
173 |
box noEnterField. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
174 |
box list:nameList. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
175 |
box label:(resources string:'view selection'). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
176 |
box title:(resources string:title) withCRs. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
177 |
box action:[:selection | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
178 |
|v| |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
179 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
180 |
v := knownTopViews at:box selectionIndex. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
181 |
box destroy. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
182 |
^ v |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
183 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
184 |
box extent:400@300. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
185 |
box showAtPointer. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
186 |
^ nil |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
187 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
188 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
189 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
190 |
openApplication: classOrClassName |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
191 |
"open an application, given by the classe name." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
192 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
193 |
self openApplication:classOrClassName nameSpace:nil |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
194 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
195 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
196 |
openApplication:classOrClassName nameSpace:aNameSpace |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
197 |
"open some application, given the classes name. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
198 |
Look for it in Smalltalk and the given nameSpace" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
199 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
200 |
self openApplication:classOrClassName nameSpace:aNameSpace with:#open |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
201 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
202 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
203 |
openApplication:classOrClassName nameSpace:aNameSpace with:aSelector |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
204 |
"open some application, given the classes name. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
205 |
Look for it in Smalltalk and the given nameSpace" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
206 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
207 |
|cls| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
208 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
209 |
classOrClassName isBehavior ifTrue:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
210 |
cls := classOrClassName. |
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
211 |
] ifFalse:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
212 |
cls := Smalltalk at:classOrClassName asSymbol. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
213 |
cls isNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
214 |
"/ look if its in the nameSpace |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
215 |
aNameSpace notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
216 |
cls := aNameSpace at:classOrClassName asSymbol |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
217 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
218 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
219 |
cls isNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
220 |
self warn:(resources string:'Sorry, the %1 class is not available.' with:classOrClassName). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
221 |
^ self |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
222 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
223 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
224 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
225 |
Autoload autoloadFailedSignal handle:[:ex | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
226 |
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
|
227 |
] do:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
228 |
self withWaitCursorDo:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
229 |
cls perform:aSelector |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
230 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
231 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
232 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
233 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
234 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
235 |
pickAView |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
236 |
"let user pick a view and return it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
237 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
238 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
239 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
240 |
(Delay forSeconds:1) wait. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
241 |
v := Screen current viewFromUser. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
242 |
v isNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
243 |
self warn:'Sorry, this is not a smalltalk view'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
244 |
^ nil |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
245 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
246 |
^ v |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
247 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
248 |
! |
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 |
saveScreenImage:anImage defaultName:defaultName |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
251 |
"save an image into a file |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
252 |
- ask user for filename using a fileSelectionBox." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
253 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
254 |
|fileName| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
255 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
256 |
fileName := Dialog |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
257 |
requestFileName:(resources string:'save image in:') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
258 |
default:(defaultName , '.tiff') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
259 |
ok:(resources string:'save') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
260 |
abort:(resources string:'cancel') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
261 |
pattern:'*.tiff'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
262 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
263 |
fileName notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
264 |
anImage saveOn:fileName |
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 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
267 |
"Modified: / 21.2.1996 / 13:09:28 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
268 |
"Created: / 29.1.1998 / 23:20:36 / cg" |
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 |
|
2001 | 271 |
showDocumentation:aRelativeDocFilePath |
272 |
"open an HTML browser on some document" |
|
273 |
||
274 |
" |
|
275 |
although that one is not yet finished, |
|
276 |
its better than nothing ... |
|
277 |
" |
|
278 |
HTMLDocumentView notNil ifTrue:[ |
|
279 |
self withWaitCursorDo:[ |
|
280 |
" |
|
281 |
temporary kludge; |
|
282 |
not all machines can autoload binaries; |
|
283 |
however, on my SGI (which can) we want it |
|
284 |
to load automatically. |
|
285 |
" |
|
286 |
HTMLDocumentView isLoaded ifFalse:[ |
|
287 |
ErrorSignal catch:[HTMLDocumentView autoload] |
|
288 |
]. |
|
289 |
HTMLDocumentView isLoaded ifTrue:[ |
|
290 |
HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. |
|
291 |
^ self |
|
292 |
]. |
|
293 |
] |
|
294 |
]. |
|
295 |
||
296 |
self warn:'Sorry, the ST/X HTML reader is not |
|
297 |
included in this release. |
|
298 |
||
299 |
Please use Mosaic, netscape, chimera or any |
|
300 |
other HTML viewer to see the documentation. |
|
301 |
||
302 |
The documentation is found in the ''doc/online'' directory.'. |
|
303 |
||
304 |
"Modified: / 25.2.1998 / 21:24:20 / cg" |
|
305 |
! ! |
|
306 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
307 |
!AbstractLauncherApplication methodsFor:'private - settings callBacks'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
308 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
309 |
changeViewStyleTo:newStyle |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
310 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
311 |
newStyle notNil ifTrue:[ |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
312 |
self withWaitCursorDo:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
313 |
(transcript ? Transcript) showCR:'change style to ' , newStyle , ' ...'. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
314 |
View defaultStyle:newStyle asSymbol. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
315 |
]. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
316 |
self reopenLauncher. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
317 |
DebugView newDebugger. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
318 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
319 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
320 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
321 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
322 |
fontBoxForEncoding:encodingMatch |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
323 |
"open a fontBox, showing fonts which match some encoding |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
324 |
(used when changing to japanese ...)" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
325 |
|
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
326 |
^ LauncherDialogs fontBoxForEncoding:encodingMatch for:self. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
327 |
|
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
328 |
"/ |box y b |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
329 |
"/ labelDef buttonDef listDef menuDef textDef |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
330 |
"/ models labels allOfThem filter| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
331 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
332 |
"/ encodingMatch notNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
333 |
"/ filter := [:f | f encoding notNil |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
334 |
"/ and:[encodingMatch match:f encoding]]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
335 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
336 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
337 |
"/ models := OrderedCollection new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
338 |
"/ labels := OrderedCollection new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
339 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
340 |
"/ models add:(allOfThem := nil asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
341 |
"/ models add:(labelDef := Label defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
342 |
"/ models add:(buttonDef := Button defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
343 |
"/ models add:(listDef := SelectionInListView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
344 |
"/ models add:(menuDef := MenuView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
345 |
"/ models add:(textDef := TextView defaultFont asValue). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
346 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
347 |
"/ box := Dialog new. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
348 |
"/ box label:(resources string:'Font settings'). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
349 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
350 |
"/ models |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
351 |
"/ 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
|
352 |
"/ do:[:model :title | |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
353 |
"/ |y2 lbl f i| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
354 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
355 |
"/ f := model value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
356 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
357 |
"/ (box addTextLabel:title) adjust:#left. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
358 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
359 |
"/ y := box yPosition. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
360 |
"/ 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
|
361 |
"/ b relativeExtent:nil; extent:(b preferredExtent). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
362 |
"/ y2 := box yPosition. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
363 |
"/ box yPosition:y. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
364 |
"/ i := box leftIndent. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
365 |
"/ box leftIndent:(b widthIncludingBorder + View viewSpacing). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
366 |
"/ (lbl := box addTextLabel:'') |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
367 |
"/ adjust:#left; |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
368 |
"/ font:(model value); |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
369 |
"/ labelChannel:(BlockValue |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
370 |
"/ with:[:v | |f| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
371 |
"/ f := v value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
372 |
"/ f isNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
373 |
"/ '' |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
374 |
"/ ] ifFalse:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
375 |
"/ f userFriendlyName |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
376 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
377 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
378 |
"/ argument:model). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
379 |
"/ labels add:lbl. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
380 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
381 |
"/ box leftIndent:i. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
382 |
"/ box yPosition:(box yPosition max:y2). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
383 |
"/ box addVerticalSpace. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
384 |
"/ box addHorizontalLine. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
385 |
"/ box addVerticalSpace. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
386 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
387 |
"/ b action:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
388 |
"/ |f| |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
389 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
390 |
"/ f := FontPanel |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
391 |
"/ fontFromUserInitial:(model value) |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
392 |
"/ 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
|
393 |
"/ filter:filter. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
394 |
"/ f notNil ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
395 |
"/ model == allOfThem ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
396 |
"/ models do:[:m | m value:f]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
397 |
"/ labels do:[:l | l font:f] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
398 |
"/ ] ifFalse:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
399 |
"/ model value:f. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
400 |
"/ lbl font:f. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
401 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
402 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
403 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
404 |
"/ model == allOfThem ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
405 |
"/ box addVerticalSpace |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
406 |
"/ ] |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
407 |
"/ ]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
408 |
"/ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
409 |
"/ box addAbortButton; addOkButton. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
410 |
"/ (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
|
411 |
"/ action:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
412 |
"/ "/ fetch defaults |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
413 |
"/ View readStyleSheetAndUpdateAllStyleCaches. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
414 |
"/ labelDef value: Label defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
415 |
"/ buttonDef value: Button defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
416 |
"/ listDef value: SelectionInListView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
417 |
"/ menuDef value: MenuView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
418 |
"/ textDef value: TextView defaultFont. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
419 |
"/ ]. |
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 open. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
422 |
"/ box accepted ifTrue:[ |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
423 |
"/ Label defaultFont:labelDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
424 |
"/ Button defaultFont:buttonDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
425 |
"/ Toggle defaultFont:buttonDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
426 |
"/ SelectionInListView defaultFont:listDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
427 |
"/ MenuView defaultFont:menuDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
428 |
"/ PullDownMenu defaultFont:menuDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
429 |
"/ TextView defaultFont:textDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
430 |
"/ EditTextView defaultFont:textDef value. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
431 |
"/ CodeView defaultFont:textDef value. |
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 |
"/ box destroy. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
434 |
"/ ^ box accepted |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
435 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
436 |
"Modified: / 15.9.1998 / 22:04:56 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
437 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
438 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
439 |
reopenLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
440 |
"reopen a new launcher. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
441 |
for now (since style & language settings currently do |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
442 |
not affect living views ...) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
443 |
WARNING: bad design: Message known in LauncherDialogs" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
444 |
|
2034
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
445 |
|oldOrigin contents builder newLauncher| |
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
446 |
|
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
447 |
oldOrigin := self window origin. |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
448 |
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
|
449 |
builder := self class openAt:oldOrigin. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
450 |
builder window waitUntilVisible. |
2034
b3537f805381
force reopen at same position (fvwm & mwm)
Claus Gittinger <cg@exept.de>
parents:
2021
diff
changeset
|
451 |
builder window origin:oldOrigin. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
452 |
newLauncher := builder application. |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
453 |
transcript notNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
454 |
newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
455 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
456 |
^ newLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
457 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
458 |
"Modified: / 4.8.1998 / 17:08:33 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
459 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
460 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
461 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
462 |
!AbstractLauncherApplication methodsFor:'queries'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
463 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
464 |
processName |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
465 |
"for monitors only - my name" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
466 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
467 |
^ 'ST/X Launcher' |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
468 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
469 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
470 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
471 |
transcript |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
472 |
"my transcript" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
473 |
|
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
474 |
^ transcript ifNil:[Transcript current] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
475 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
476 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
477 |
!AbstractLauncherApplication methodsFor:'startup / release'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
478 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
479 |
addTopViewsToCurrentProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
480 |
"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
|
481 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
482 |
^ self |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
483 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
484 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
485 |
|
2314
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
486 |
closeDownViews |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
487 |
OpenLaunchers remove:self ifAbsent:nil. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
488 |
super closeDownViews |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
489 |
! |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
490 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
491 |
postBuildWith:aBuilder |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
492 |
super postBuildWith:aBuilder. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
493 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
494 |
OpenLaunchers isNil ifTrue:[ |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
495 |
OpenLaunchers := IdentitySet new. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
496 |
]. |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
497 |
OpenLaunchers add:self |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
498 |
|
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
499 |
! |
7ac730bdb664
OpenLaunchers as IdentitySet methodes modified add and remove
tm
parents:
2311
diff
changeset
|
500 |
|
2040 | 501 |
requestForWindowClose |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
502 |
"close request from windowing system (window close); |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
503 |
confirm and ask if closing of launcher only or |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
504 |
a smalltalk-exit is wanted" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
505 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
506 |
|answer| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
507 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
508 |
answer := Dialog |
2165 | 509 |
confirmWithCancel:(resources string:'Close %1 only or exit Smalltalk (close all)?' with:self class name) |
510 |
labels:(resources array:#('Cancel' 'Close' 'Exit')) |
|
511 |
default:3. |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
512 |
answer isNil ifTrue:[ |
2165 | 513 |
"/ cancel |
514 |
^ false |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
515 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
516 |
|
2165 | 517 |
answer == false ifTrue:[ |
518 |
^ true |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
519 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
520 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
521 |
self exit |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
522 |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
523 |
"Modified: / 20.5.1999 / 17:24:47 / cg" |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
524 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
525 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
526 |
saveAndTerminateRequest |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
527 |
"some windowManagers can send this, to shutDown an application |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
528 |
but let it save its state before, for later restart. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
529 |
Although I have not yet encountered such a windowManager, |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
530 |
we are already prepared for this ;-)" |
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 |
self snapshot. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
533 |
super saveAndTerminateRequest |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
534 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
535 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
536 |
|
2001 | 537 |
!AbstractLauncherApplication methodsFor:'user actions - about'! |
538 |
||
539 |
openLicenseConditions |
|
540 |
"open an HTML browser on the 'LICENCE' document" |
|
541 |
||
542 |
self withWaitCursorDo:[ |
|
543 |
|lang doc| |
|
544 |
||
545 |
Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[ |
|
546 |
doc := 'english/LICENCE_DEMO_STX.html' |
|
547 |
] ifFalse:[ |
|
548 |
((lang := Smalltalk language) = 'de' |
|
549 |
or:[lang = 'german']) ifTrue:[ |
|
550 |
doc := 'german/LICENCE_STX.html' |
|
551 |
] ifFalse:[ |
|
552 |
doc := 'english/LICENCE_STX.html' |
|
553 |
]. |
|
554 |
]. |
|
555 |
doc := resources at:'LICENCEFILE' default:doc. |
|
556 |
self showDocumentation:('../' , doc) |
|
557 |
] |
|
558 |
||
559 |
"Created: / 5.2.1998 / 21:43:19 / cg" |
|
560 |
"Modified: / 23.4.1998 / 11:45:53 / cg" |
|
561 |
! ! |
|
562 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
563 |
!AbstractLauncherApplication methodsFor:'user actions - classes'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
564 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
565 |
browseAllBreakAndTracePoints |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
566 |
"open a browser showing all breakPointed/traced methods |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
567 |
(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
|
568 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
569 |
SystemBrowser |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
570 |
browseMethods: WrappedMethod allInstances |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
571 |
title:'all breakPointed/traced methods' |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
572 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
573 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
574 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
575 |
browseImplementors |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
576 |
"open an implementors- browser after asking for a selector" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
577 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
578 |
|enterBox selector| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
579 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
580 |
enterBox := EnterBox |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
581 |
title:(resources at:'Browse implementors of:') withCRs |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
582 |
okText:(resources at:'browse') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
583 |
action:[:acceptedString | selector := acceptedString]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
584 |
enterBox showAtPointer. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
585 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
586 |
selector notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
587 |
self withWaitCursorDo:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
588 |
SystemBrowser browseImplementorsOf:selector |
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 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
592 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
593 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
594 |
browseResources |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
595 |
"open a resource- browser after asking for a resource string" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
596 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
597 |
|box resourceHolder valueHolder component rsrc value t anyString| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
598 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
599 |
anyString := resources string:'* any *'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
600 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
601 |
resourceHolder := ValueHolder newString. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
602 |
valueHolder := '*' asValue. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
603 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
604 |
box := DialogBox new. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
605 |
box label:(resources at:'Resource search:'). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
606 |
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
|
607 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
608 |
box addVerticalSpace:10. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
609 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
610 |
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
|
611 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
612 |
component := box addComboBoxOn:resourceHolder tabable:true. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
613 |
component list:((Array with:anyString) , #('canvas' 'menu' 'keyboard' 'style' 'image' 'programMenu' nil 'needsFix')). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
614 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
615 |
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
|
616 |
component adjust:#left. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
617 |
box addInputFieldOn:valueHolder tabable:true. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
618 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
619 |
box addVerticalSpace:10. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
620 |
box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'. |
2048 | 621 |
box addAbortAndOkButtons. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
622 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
623 |
box showAtPointer. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
624 |
box destroy. |
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 |
box accepted ifTrue:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
627 |
rsrc := resourceHolder value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
628 |
value := valueHolder value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
629 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
630 |
(rsrc size == 0 or:[rsrc = '*' or:[rsrc = anyString]]) ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
631 |
t := 'methods with any resource'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
632 |
rsrc := nil |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
633 |
] ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
634 |
t := 'methods with #' , rsrc , '-resource'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
635 |
rsrc := rsrc withoutSeparators asSymbol |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
636 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
637 |
(value size == 0 or:[value = '*']) ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
638 |
t := t , ' and any value'. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
639 |
value := nil |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
640 |
] ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
641 |
t := t , ' and value ' , value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
642 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
643 |
self withWaitCursorDo:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
644 |
SystemBrowser browseForResource:rsrc |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
645 |
containing:value |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
646 |
in:(Smalltalk allClasses) |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
647 |
title:t |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
648 |
] |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
649 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
650 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
651 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
652 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
653 |
browseSenders |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
654 |
"open a senders- browser after asking for a selector" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
655 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
656 |
|enterBox selector| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
657 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
658 |
enterBox := EnterBox |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
659 |
title:(resources at:'Browse senders of:') withCRs |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
660 |
okText:(resources at:'browse') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
661 |
action:[:acceptedString | selector := acceptedString]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
662 |
enterBox showAtPointer. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
663 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
664 |
selector notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
665 |
self withWaitCursorDo:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
666 |
SystemBrowser browseAllCallsOn:selector |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
667 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
668 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
669 |
|
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 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
672 |
browseUndeclared |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
673 |
"open a browser on methods refering to undeclared variables" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
674 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
675 |
self withWaitCursorDo:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
676 |
SystemBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
677 |
browseReferendsOf:(Smalltalk underclaredPrefix , '*') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
678 |
title:(resources string:'references to undeclared variables') |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
679 |
warnIfNone:true |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
680 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
681 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
682 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
683 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
684 |
removeAllBreakAndTracePoints |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
685 |
"remove all break- and trace points" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
686 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
687 |
self withCursor:Cursor execute do:[ MessageTracer cleanup] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
688 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
689 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
690 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
691 |
startClassBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
692 |
"open a classBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
693 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
694 |
SystemBrowser askThenBrowseClass |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
695 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
696 |
! |
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 |
startClassHierarchyBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
699 |
"open a classHierarchyBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
700 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
701 |
SystemBrowser askThenBrowseClassHierarchy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
702 |
|
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 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
705 |
startFullClassBrowser |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
706 |
"open a fullClass systemBrowser; asks for class" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
707 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
708 |
SystemBrowser askThenBrowseFullClassProtocol |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
709 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
710 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
711 |
|
2038 | 712 |
!AbstractLauncherApplication methodsFor:'user actions - demos'! |
713 |
||
714 |
startRemoteLauncher |
|
715 |
|host remoteDisplay| |
|
716 |
||
717 |
host := Dialog request:'Remote Launcher on which display:'. |
|
718 |
host size > 0 ifTrue:[ |
|
2359 | 719 |
(host includes:$:) ifFalse:[ |
720 |
host := (host , ':0') |
|
721 |
]. |
|
722 |
remoteDisplay := XWorkstation new. |
|
723 |
remoteDisplay := remoteDisplay initializeFor:host. |
|
724 |
remoteDisplay isNil ifTrue:[ |
|
725 |
self warn:'Could not connect to display: ''' , host , '''.'. |
|
726 |
^ self |
|
727 |
]. |
|
728 |
remoteDisplay startDispatch. |
|
729 |
remoteDisplay keyboardMap:(Screen current keyboardMap). |
|
730 |
Screen currentScreenQuerySignal answer:remoteDisplay |
|
731 |
do:[ |
|
732 |
self class open. |
|
733 |
] |
|
2038 | 734 |
]. |
735 |
||
736 |
"Created: / 10.9.1998 / 11:48:42 / cg" |
|
737 |
! ! |
|
738 |
||
2001 | 739 |
!AbstractLauncherApplication methodsFor:'user actions - file'! |
740 |
||
741 |
objectModuleDialog |
|
742 |
"opens a moduleInfo dialog" |
|
743 |
||
744 |
^ LauncherDialogs objectModuleDialogFor:self |
|
745 |
||
746 |
"Modified: / 31.7.1998 / 17:33:24 / cg" |
|
747 |
! |
|
748 |
||
2490
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
749 |
packageDialog |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
750 |
"opens a package dialog" |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
751 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
752 |
^ LauncherDialogs packageDialogFor:self |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
753 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
754 |
"Modified: / 31.7.1998 / 17:33:24 / cg" |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
755 |
! |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
756 |
|
2001 | 757 |
saveImageAs: aFileName |
758 |
"save image in aFilename" |
|
759 |
||
760 |
aFileName notNil ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
761 |
self withCursor:Cursor write do:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
762 |
(ObjectMemory snapShotOn:aFileName) ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
763 |
self warn:(resources string:'Failed to save snapshot image (disk full or not writable)'). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
764 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
765 |
]. |
2001 | 766 |
]. |
767 |
! ! |
|
768 |
||
769 |
!AbstractLauncherApplication methodsFor:'user actions - help'! |
|
770 |
||
771 |
showBookPrintDocument |
|
772 |
"open an HTML browser on the 'book'-printing document" |
|
773 |
||
774 |
self showDocumentation:'BOOK.html' |
|
775 |
! |
|
776 |
||
777 |
startClassDocumentation |
|
778 |
"open an HTML browser on the 'classDoc/TOP' document" |
|
779 |
||
780 |
self showDocumentation:'classDoc/TOP.html' |
|
781 |
||
782 |
! |
|
783 |
||
784 |
startDocumentationIndex |
|
785 |
"open an HTML browser on the 'index' document" |
|
786 |
||
787 |
self showDocumentation:'index.html' |
|
788 |
! |
|
789 |
||
790 |
startDocumentationTool |
|
791 |
"open an HTML browser on the 'TOP' document" |
|
792 |
||
793 |
self showDocumentation:'TOP.html' |
|
794 |
||
795 |
! |
|
796 |
||
797 |
startWhatsNewDocumentation |
|
798 |
"open an HTML browser on the 'whatsNew.html' document" |
|
799 |
||
800 |
self showDocumentation:'whatsNew.html' |
|
801 |
||
2296 | 802 |
! |
803 |
||
804 |
startWhatsNewSTX |
|
805 |
"open an HTML browser on the 'relNotes.html' document" |
|
806 |
||
807 |
self showDocumentation:'newFeatures.html' |
|
808 |
||
2001 | 809 |
! ! |
810 |
||
811 |
!AbstractLauncherApplication methodsFor:'user actions - settings'! |
|
812 |
||
2196 | 813 |
communicationsSettings |
814 |
"open a dialog on misc other settings" |
|
815 |
||
816 |
self settingsDialog:#communicationsSettingsFor: |
|
817 |
||
818 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
819 |
! |
|
820 |
||
2001 | 821 |
compilerSettings |
822 |
"open a dialog on compiler related settings" |
|
823 |
||
824 |
self settingsDialog:#compilerSettingsFor: |
|
825 |
! |
|
826 |
||
827 |
displaySettings |
|
828 |
"open a dialog on display related settings" |
|
829 |
||
830 |
self settingsDialog:#displaySettingsFor: |
|
831 |
||
832 |
"Modified: / 31.7.1998 / 22:45:38 / cg" |
|
833 |
! |
|
834 |
||
835 |
editSettings |
|
836 |
"open a dialog on edit settings" |
|
837 |
||
838 |
self settingsDialog:#editSettingsFor: |
|
839 |
||
840 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
841 |
"Created: / 6.1.1999 / 14:14:48 / cg" |
|
842 |
! |
|
843 |
||
844 |
fontSettings |
|
845 |
"open a dialog on font related settings" |
|
846 |
||
847 |
self settingsDialog:#fontSettingsFor: |
|
848 |
||
849 |
"Modified: / 31.7.1998 / 22:45:44 / cg" |
|
850 |
! |
|
851 |
||
852 |
javaSettings |
|
853 |
"open a dialog on java-subsystem related settings" |
|
854 |
||
855 |
self settingsDialog:#javaSettingsFor: |
|
856 |
||
857 |
"Modified: / 31.7.1998 / 22:46:13 / cg" |
|
858 |
! |
|
859 |
||
860 |
keyboardSetting |
|
861 |
"open a dialog on keyboard related settings" |
|
862 |
||
863 |
self settingsDialog:#keyboardSettingsFor: |
|
864 |
||
865 |
"Modified: / 31.7.1998 / 22:45:56 / cg" |
|
866 |
! |
|
867 |
||
868 |
languageSetting |
|
869 |
"open a dialog on language related settings" |
|
870 |
||
871 |
self settingsDialog:#languageSettingsFor: |
|
872 |
||
873 |
"Modified: / 31.7.1998 / 22:46:13 / cg" |
|
874 |
! |
|
875 |
||
876 |
loadSettings |
|
877 |
"restore settings from a settings-file." |
|
878 |
||
879 |
"a temporary kludge - we need a central systemSettings object for this, |
|
880 |
which can be saved/restored with a single store/read." |
|
881 |
||
882 |
|fileName| |
|
883 |
||
884 |
fileName := Dialog |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
885 |
requestFileName:(resources string:'load settings from:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
886 |
default:'settings.stx' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
887 |
ok:(resources string:'load') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
888 |
abort:(resources string:'cancel') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
889 |
pattern:'*.stx' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
890 |
fromDirectory:nil. |
2021 | 891 |
|
892 |
(fileName size == 0) ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
893 |
"/ canceled |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
894 |
^ self |
2001 | 895 |
]. |
896 |
||
897 |
self withWaitCursorDo:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
898 |
Smalltalk fileIn:fileName. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
899 |
self reOpen |
2001 | 900 |
]. |
901 |
||
902 |
||
903 |
! |
|
904 |
||
905 |
memorySettings |
|
906 |
"open a dialog on objectMemory related settings" |
|
907 |
||
908 |
self settingsDialog:#memorySettingsFor: |
|
909 |
||
910 |
"Modified: / 31.7.1998 / 22:46:33 / cg" |
|
911 |
! |
|
912 |
||
913 |
messageSettings |
|
914 |
"open a dialog on infoMessage related settings" |
|
915 |
||
916 |
self settingsDialog:#messageSettingsFor: |
|
917 |
||
918 |
"Modified: / 31.7.1998 / 22:46:45 / cg" |
|
919 |
! |
|
920 |
||
921 |
miscSettings |
|
922 |
"open a dialog on misc other settings" |
|
923 |
||
924 |
self settingsDialog:#miscSettingsFor: |
|
925 |
||
926 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
927 |
! |
|
928 |
||
929 |
printerSettings |
|
930 |
"open a dialog on printer related settings" |
|
931 |
||
932 |
self settingsDialog:#printerSettingsFor: |
|
933 |
||
934 |
"Modified: / 31.7.1998 / 22:47:05 / cg" |
|
935 |
! |
|
936 |
||
937 |
saveSettings |
|
938 |
"save settings to a settings-file." |
|
939 |
||
940 |
self settingsDialog:#saveSettingsFor: |
|
941 |
||
942 |
"Modified: / 31.7.1998 / 22:48:38 / cg" |
|
943 |
! |
|
944 |
||
945 |
settingsDialog:symbol |
|
946 |
"open a dialog on viewStyle related settings" |
|
947 |
||
2196 | 948 |
|handler| |
949 |
||
950 |
RegisteredMenuHandlers notNil ifTrue:[ |
|
951 |
handler := RegisteredMenuHandlers at:symbol ifAbsent:nil. |
|
952 |
]. |
|
953 |
handler isNil ifTrue:[ |
|
954 |
handler := LauncherDialogs |
|
955 |
]. |
|
956 |
handler perform:symbol with:self. |
|
2001 | 957 |
|
958 |
"Modified: / 31.7.1998 / 22:47:33 / cg" |
|
959 |
! |
|
960 |
||
961 |
sourceAndDebuggerSettings |
|
962 |
"open a dialog on misc other settings" |
|
963 |
||
964 |
self settingsDialog:#sourceAndDebuggerSettingsFor: |
|
965 |
||
966 |
"Modified: / 31.7.1998 / 22:47:21 / cg" |
|
967 |
! |
|
968 |
||
969 |
toolSettings |
|
970 |
"open a dialog on tool settings" |
|
971 |
||
972 |
self settingsDialog:#toolSettingsFor: |
|
973 |
||
974 |
"Modified: / 31.7.1998 / 22:46:56 / cg" |
|
975 |
"Created: / 13.10.1998 / 15:50:53 / cg" |
|
976 |
! |
|
977 |
||
978 |
viewStyleSetting |
|
979 |
"open a dialog on viewStyle related settings" |
|
980 |
||
981 |
self settingsDialog:#viewStyleSettingsFor: |
|
982 |
||
983 |
"Modified: / 31.7.1998 / 22:47:33 / cg" |
|
984 |
! ! |
|
985 |
||
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
986 |
!AbstractLauncherApplication methodsFor:'user actions - system'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
987 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
988 |
compressingGarbageCollect |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
989 |
"perform a compressing garbageCollect" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
990 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
991 |
self withWaitCursorDo:[ObjectMemory verboseGarbageCollect] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
992 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
993 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
994 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
995 |
garbageCollect |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
996 |
"perform a non-compressing garbageCollect" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
997 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
998 |
self withWaitCursorDo:[ObjectMemory reclaimSymbols] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
999 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1000 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1001 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1002 |
startStopEventTrace |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1003 |
"start/stop event tracing for a particular view" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1004 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1005 |
|v wg| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1006 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1007 |
v := Screen current viewFromUser. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1008 |
v notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1009 |
v := v topView. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1010 |
wg := v windowGroup. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1011 |
wg notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1012 |
"/ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1013 |
"/ toggle eventTrace in its windowGroup |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1014 |
"/ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1015 |
wg traceEvents:(wg preEventHook isNil) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1016 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1017 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1018 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1019 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1020 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1021 |
!AbstractLauncherApplication methodsFor:'user actions - tools'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1022 |
|
2210 | 1023 |
inspectGlobalVariables |
1024 |
"inspect globals" |
|
1025 |
||
1026 |
Smalltalk inspect |
|
1027 |
! |
|
1028 |
||
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1029 |
inspectWorkspaceVariables |
2210 | 1030 |
"inspect workspace variables" |
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1031 |
|
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1032 |
Workspace workspaceVariables inspect |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1033 |
! |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1034 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1035 |
newProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1036 |
"creates a new project & opens a projectView for it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1037 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1038 |
Project notNil ifTrue: [(ProjectView for: Project new) open] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1039 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1040 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1041 |
openTerminal |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1042 |
self openApplication:#VT100TerminalView |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1043 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1044 |
"Created: / 27.7.1998 / 12:48:30 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1045 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1046 |
|
2207
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1047 |
removeAllWorkspaceVariables |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1048 |
"remove workspace variables" |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1049 |
|
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1050 |
Workspace removeAllWorkspaceVariables |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1051 |
! |
84d23e553268
support for workspace variables
Claus Gittinger <cg@exept.de>
parents:
2206
diff
changeset
|
1052 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1053 |
selectProject |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1054 |
"asks for and switch to another project" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1055 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1056 |
|list box| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1057 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1058 |
Project notNil ifTrue:[ |
2458
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1059 |
list := Project allInstances. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1060 |
box := ListSelectionBox new. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1061 |
box list:(list collect:[:p | p name]). |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1062 |
box title:(resources string:'select a project'). |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1063 |
box action:[:selection | |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1064 |
|project| |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1065 |
|
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1066 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1067 |
project isNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1068 |
transcript notNil ifTrue:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1069 |
transcript showCR:'no such project.' |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1070 |
] |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1071 |
] ifFalse:[ |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1072 |
project showViews. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1073 |
Project current:project |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1074 |
] |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1075 |
]. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1076 |
box showAtPointer. |
3c273283bb84
care for transcript being nil.
Claus Gittinger <cg@exept.de>
parents:
2457
diff
changeset
|
1077 |
box destroy |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1078 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1079 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1080 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1081 |
startChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1082 |
"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
|
1083 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1084 |
self openApplication:(UserPreferences current changesBrowserClass) |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1085 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1086 |
"Modified: / 17.10.1998 / 14:38:18 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1087 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1088 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1089 |
startNewChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1090 |
"opens the new changeBrowser" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1091 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1092 |
self openApplication:#NewChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1093 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1094 |
"Created: / 6.6.1998 / 19:47:26 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1095 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1096 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1097 |
startNewLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1098 |
"opens the new launcher" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1099 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1100 |
NewLauncher isNil ifTrue:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1101 |
^ 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
|
1102 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1103 |
NewLauncher openAt:(self window origin) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1104 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1105 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1106 |
|
2111
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1107 |
startOldChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1108 |
"opens the old changeBrowser" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1109 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1110 |
self openApplication:#ChangesBrowser |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1111 |
|
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1112 |
"Created: / 6.6.1998 / 19:47:26 / cg" |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1113 |
! |
b36bdfb0af38
moved startChangesBrowser from NewLauncher to here.
Claus Gittinger <cg@exept.de>
parents:
2110
diff
changeset
|
1114 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1115 |
startOldLauncher |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1116 |
"opens the old launcher" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1117 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1118 |
Launcher isNil ifTrue:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1119 |
^ 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
|
1120 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1121 |
Launcher openAt:(self window origin) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1122 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1123 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1124 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1125 |
!AbstractLauncherApplication methodsFor:'user actions - windows'! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1126 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1127 |
deIconifyAllWindows |
2144 | 1128 |
|setOfViews currentScreen| |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1129 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1130 |
setOfViews := Project current views asIdentitySet. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1131 |
setOfViews addAll:(Project defaultProject views). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1132 |
|
2144 | 1133 |
currentScreen := Screen current. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1134 |
setOfViews do:[:aTopView | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1135 |
aTopView device == currentScreen ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1136 |
aTopView expand |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1137 |
]. |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1138 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1139 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1140 |
" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1141 |
Transcript topView application deIconifyAllWindows |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1142 |
" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1143 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1144 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1145 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1146 |
findAndDestroyWindow |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1147 |
"find a window (by name) and destroy it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1148 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1149 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1150 |
v := self findWindow:'select view to close:'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1151 |
v notNil ifTrue:[v destroy] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1152 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1153 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1154 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1155 |
findAndRaiseWindow |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1156 |
"find a window (by name) and raise it" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1157 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1158 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1159 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1160 |
v := self findWindow:'select view to raise deiconified:'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1161 |
v notNil ifTrue:[v raiseDeiconified] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1162 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1163 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1164 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1165 |
fullScreenHardcopy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1166 |
"after a second (to allow redraw of views under menu ...), |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1167 |
save the contents of the whole screen." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1168 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1169 |
Processor |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1170 |
addTimedBlock:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1171 |
self |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1172 |
saveScreenImage:(Image fromScreen) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1173 |
defaultName:'screen' |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1174 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1175 |
afterSeconds:1 |
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 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1178 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1179 |
iconifyAllWindows |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1180 |
|setOfViews currentScreen| |
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 |
setOfViews := Project current views asIdentitySet. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1183 |
setOfViews addAll:(Project defaultProject views). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1184 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1185 |
currentScreen := Screen current. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1186 |
setOfViews do:[:aTopView | |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1187 |
aTopView device == currentScreen ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1188 |
aTopView collapse |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1189 |
] |
2005
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 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1192 |
! |
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 |
screenHardcopy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1195 |
"after a second (to allow redraw of views under menu ...), |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1196 |
let user specify a rectangular area on the screen |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1197 |
and save its contents." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1198 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1199 |
|area| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1200 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1201 |
Processor |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1202 |
addTimedBlock:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1203 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1204 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1205 |
area := Rectangle fromUser. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1206 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1207 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
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 |
afterSeconds:1 |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1211 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1212 |
"Modified: / 18.8.1998 / 15:00:42 / cg" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1213 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1214 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1215 |
startWindowTreeView |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1216 |
"open a windowTree (on a picked topView)" |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1217 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1218 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1219 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1220 |
WindowTreeView isNil ifTrue:[ |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1221 |
^ 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
|
1222 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1223 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1224 |
v := self pickAView. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1225 |
v notNil ifTrue:[ |
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1226 |
WindowTreeView openOn:v topView |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1227 |
] |
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 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1230 |
|
2371
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1231 |
startWindowTreeViewForAll |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1232 |
"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
|
1233 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1234 |
|v| |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1235 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1236 |
WindowTreeView isNil ifTrue:[ |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1237 |
^ 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
|
1238 |
]. |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1239 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1240 |
WindowTreeView openOnAll |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1241 |
|
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1242 |
! |
7ce8ba08aca1
added windowTree on all views on all screens
Claus Gittinger <cg@exept.de>
parents:
2359
diff
changeset
|
1243 |
|
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1244 |
viewDestroy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1245 |
"let user pick a view and destroy it. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1246 |
Even allow destroying non-smalltalk views |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1247 |
(also for views which I forgot due to some error)" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1248 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1249 |
|device v id i c| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1250 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1251 |
(Delay forSeconds:1) wait. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1252 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1253 |
device := Screen current. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1254 |
i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1255 |
i isNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1256 |
c := Cursor crossHair |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1257 |
] ifFalse:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1258 |
c := Cursor fromImage:i |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1259 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1260 |
id := device viewIdFromPoint:(device pointFromUserShowing:c). |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1261 |
(v := device viewFromId:id) notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1262 |
v topView destroy. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1263 |
^ self |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1264 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1265 |
id = device rootView id ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1266 |
^ self |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1267 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1268 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1269 |
ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1270 |
device destroyView:nil withId:id |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1271 |
]. |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1272 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1273 |
|
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 |
viewHardcopy |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1277 |
"after a second (to allow redraw of views under menu ...), |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1278 |
let user specify a view and save its contents." |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1279 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1280 |
Processor |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1281 |
addTimedBlock:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1282 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1283 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1284 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1285 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1286 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1287 |
afterSeconds:1 |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1288 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1289 |
! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1290 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1291 |
viewInspect |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1292 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1293 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1294 |
|v| |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1295 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1296 |
(v := self pickAView) notNil ifTrue:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
1297 |
v inspect |
2005
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1298 |
] |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1299 |
|
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1300 |
! ! |
c227faa4616b
more refactoring (NewLauncher <-> Launcher)
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
1301 |
|
2001 | 1302 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs'! |
1303 |
||
2196 | 1304 |
communicationsSettingsFor:requestor |
1305 |
"open a dialog on communications settings" |
|
1306 |
||
2282 | 1307 |
|box check in resources y acceptChannel |
2278 | 1308 |
hasRDoitServer |
2196 | 1309 |
rDoitsEnabled rDoitLogging rDoitErrorLogging rDoitErrorDebugging |
1310 |
org_rDoitsEnabled org_rDoitLogging org_rDoitErrorLogging org_rDoitErrorDebugging |
|
2304 | 1311 |
|
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1312 |
hasHTTPServer httpServerRunning httpServerFileRoot httpServerHomeURL |
2304 | 1313 |
httpServerPort hasSwiki swikiEnabled swikiRoot |
2288 | 1314 |
org_httpServerRunning org_httpServerFileRoot org_httpServerHomeURL |
2304 | 1315 |
org_httpServerPort org_swikiRoot org_swikiEnabled |
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1316 |
|
2196 | 1317 |
osiACSEPresent osiROSEPresent osiCMISEPresent |
2199 | 1318 |
osiACSEErrorLogging osiACSEConnectionLogging osiACSEDataLogging |
2196 | 1319 |
osiROSEErrorLogging osiROSEResponseLogging osiROSEInvokationLogging |
1320 |
osiCMISEErrorLogging osiCMISEMessageLogging |
|
2304 | 1321 |
| |
2196 | 1322 |
|
2282 | 1323 |
acceptChannel := false asValue. |
1324 |
||
2196 | 1325 |
resources := requestor class classResources. |
1326 |
||
1327 |
"/ |
|
1328 |
"/ extract relevant rdoit settings ... |
|
1329 |
"/ |
|
1330 |
rDoitsEnabled := rDoitLogging := rDoitErrorLogging := false. |
|
1331 |
(hasRDoitServer := RDoItServer notNil) ifTrue:[ |
|
1332 |
RDoItServer isLoaded ifTrue:[ |
|
1333 |
rDoitsEnabled := RDoItServer serverRunning. |
|
1334 |
rDoitLogging := RDoItServer isLogging. |
|
1335 |
rDoitErrorLogging := RDoItServer isErrorLogging. |
|
1336 |
rDoitErrorDebugging := RDoItServer isErrorCatching not. |
|
1337 |
] |
|
1338 |
]. |
|
1339 |
org_rDoitsEnabled := rDoitsEnabled. |
|
1340 |
org_rDoitLogging := rDoitLogging. |
|
1341 |
org_rDoitErrorLogging := rDoitErrorLogging. |
|
1342 |
org_rDoitErrorDebugging := rDoitErrorDebugging. |
|
1343 |
||
1344 |
rDoitsEnabled := rDoitsEnabled asValue. |
|
1345 |
rDoitLogging := rDoitLogging asValue. |
|
1346 |
rDoitErrorLogging := rDoitErrorLogging asValue. |
|
1347 |
rDoitErrorDebugging := rDoitErrorDebugging asValue. |
|
1348 |
||
2278 | 1349 |
hasHTTPServer := httpServerRunning := false. |
1350 |
(hasHTTPServer := HTTPServer notNil) ifTrue:[ |
|
1351 |
HTTPServer isLoaded ifTrue:[ |
|
2280 | 1352 |
httpServerRunning := HTTPServer isRunning. |
1353 |
httpServerFileRoot := HTTPServer fileRoot. |
|
1354 |
httpServerHomeURL := HTTPServer homeURL. |
|
2304 | 1355 |
httpServerPort := HTTPServer defaultPort. |
2278 | 1356 |
]. |
1357 |
]. |
|
1358 |
org_httpServerRunning := httpServerRunning. |
|
1359 |
httpServerRunning := httpServerRunning asValue. |
|
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1360 |
org_httpServerFileRoot := httpServerFileRoot. |
2280 | 1361 |
httpServerFileRoot := httpServerFileRoot asValue. |
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1362 |
org_httpServerHomeURL := httpServerHomeURL. |
2280 | 1363 |
httpServerHomeURL := httpServerHomeURL asValue. |
2304 | 1364 |
org_httpServerPort := httpServerPort. |
1365 |
httpServerPort := httpServerPort asValue. |
|
2278 | 1366 |
|
2306 | 1367 |
httpServerRunning |
1368 |
onChangeSend:#value |
|
1369 |
to:[ |
|
1370 |
httpServerFileRoot value:(HTTPServer fileRoot). |
|
1371 |
httpServerHomeURL value:(HTTPServer homeURL). |
|
1372 |
httpServerPort value:(HTTPServer defaultPort). |
|
1373 |
]. |
|
1374 |
||
2288 | 1375 |
hasSwiki := false. |
1376 |
swikiEnabled := false. |
|
1377 |
||
1378 |
(hasSwiki := PWS::SwikiAction notNil) ifTrue:[ |
|
1379 |
PWS::SwikiAction isLoaded ifTrue:[ |
|
1380 |
(HTTPServer notNil and:[HTTPServer isLoaded]) ifTrue:[ |
|
1381 |
swikiEnabled := HTTPServer hasActionLinkFor:'myswiki'. |
|
1382 |
swikiRoot := PWS::SwikiAction serverDirectory. |
|
1383 |
] |
|
1384 |
]. |
|
1385 |
]. |
|
1386 |
org_swikiRoot := swikiRoot. |
|
1387 |
org_swikiEnabled := swikiEnabled. |
|
1388 |
swikiRoot := swikiRoot asValue. |
|
2289 | 1389 |
swikiEnabled := swikiEnabled asValue. |
2288 | 1390 |
|
2306 | 1391 |
swikiEnabled |
1392 |
onChangeSend:#value |
|
1393 |
to:[ |
|
1394 |
swikiRoot value:(PWS::SwikiAction serverDirectory). |
|
1395 |
]. |
|
1396 |
||
2196 | 1397 |
"/ |
1398 |
"/ osi settings ... |
|
1399 |
"/ |
|
2204
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1400 |
osiACSEPresent := OSI::ACSE notNil |
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1401 |
and:[OSI::ACSE isLoaded]. |
2196 | 1402 |
osiROSEPresent := OSI::ROSE notNil |
1403 |
and:[OSI::ROSE isLoaded]. |
|
1404 |
osiCMISEPresent := OSI::CMISE notNil |
|
1405 |
and:[OSI::CMISE isLoaded]. |
|
1406 |
||
1407 |
osiACSEPresent ifTrue:[ |
|
2204
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1408 |
osiACSEErrorLogging := OSI::ACSE errorLogging asValue. |
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1409 |
osiACSEConnectionLogging := OSI::ACSE connectionLogging asValue. |
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1410 |
osiACSEDataLogging := OSI::ACSE dataLogging asValue. |
2196 | 1411 |
]. |
1412 |
osiROSEPresent ifTrue:[ |
|
1413 |
osiROSEErrorLogging := OSI::ROSE errorLogging asValue. |
|
2218 | 1414 |
osiROSEInvokationLogging := OSI::ROSE invocationLogging asValue. |
2196 | 1415 |
osiROSEResponseLogging := OSI::ROSE responseLogging asValue. |
1416 |
]. |
|
1417 |
osiCMISEPresent ifTrue:[ |
|
1418 |
osiCMISEErrorLogging := OSI::CMISE errorLogging asValue. |
|
1419 |
osiCMISEMessageLogging := OSI::CMISE messageLogging asValue. |
|
1420 |
]. |
|
1421 |
||
1422 |
"/ |
|
1423 |
"/ create a box on those values ... |
|
1424 |
"/ |
|
1425 |
box := DialogBox new. |
|
1426 |
box label:(resources string:'Communications settings'). |
|
1427 |
||
2279 | 1428 |
box addTextLabel:'RDoIt Server'. |
1429 |
||
2196 | 1430 |
check := box addCheckBox:(resources string:'Remote doits enabled') on:rDoitsEnabled. |
1431 |
hasRDoitServer ifFalse:[ |
|
1432 |
check disable |
|
1433 |
]. |
|
1434 |
box leftIndent:20. |
|
1435 |
y := box yPosition. |
|
1436 |
check := box addCheckBox:(resources string:'Log errors') on:rDoitErrorLogging. |
|
1437 |
check width:0.4. |
|
1438 |
check enableChannel:rDoitsEnabled. |
|
1439 |
hasRDoitServer ifFalse:[ |
|
1440 |
check disable |
|
1441 |
]. |
|
1442 |
box yPosition:y. |
|
1443 |
check := box addCheckBox:(resources string:'Log requests') on:rDoitLogging. |
|
2281 | 1444 |
check left:0.4; width:0.4. |
2196 | 1445 |
check enableChannel:rDoitsEnabled. |
1446 |
hasRDoitServer ifFalse:[ |
|
1447 |
check disable |
|
1448 |
]. |
|
1449 |
check := box addCheckBox:(resources string:'Debug errors') on:rDoitErrorDebugging. |
|
1450 |
check width:0.4. |
|
1451 |
check enableChannel:rDoitsEnabled. |
|
1452 |
hasRDoitServer ifFalse:[ |
|
1453 |
check disable |
|
1454 |
]. |
|
1455 |
box leftIndent:0. |
|
1456 |
||
1457 |
box addHorizontalLine. |
|
1458 |
||
2278 | 1459 |
box addTextLabel:'HTTP Server'. |
1460 |
||
1461 |
check := box addCheckBox:(resources string:'Serving HTTP Requests') on:httpServerRunning. |
|
1462 |
hasHTTPServer ifFalse:[ |
|
1463 |
check disable |
|
1464 |
]. |
|
2280 | 1465 |
box leftIndent:20. |
1466 |
in := box |
|
2304 | 1467 |
addLabelledInputField:(resources string:'Port:') |
1468 |
adjust:#right |
|
1469 |
on:nil |
|
1470 |
tabable:true |
|
1471 |
separateAtX:0.3. |
|
1472 |
in converter:(PrintConverter new initForNumber). |
|
1473 |
in model:httpServerPort. |
|
1474 |
in acceptChannel:acceptChannel. |
|
1475 |
in enableChannel:httpServerRunning. |
|
1476 |
||
1477 |
in := box |
|
2280 | 1478 |
addLabelledInputField:(resources string:'File Root:') |
1479 |
adjust:#right |
|
1480 |
on:httpServerFileRoot |
|
1481 |
tabable:true |
|
2288 | 1482 |
separateAtX:0.3. |
2282 | 1483 |
in acceptChannel:acceptChannel. |
2288 | 1484 |
in enableChannel:httpServerRunning. |
2282 | 1485 |
|
2280 | 1486 |
in := box |
1487 |
addLabelledInputField:(resources string:'Home URL:') |
|
1488 |
adjust:#right |
|
1489 |
on:httpServerHomeURL |
|
1490 |
tabable:true |
|
2288 | 1491 |
separateAtX:0.3. |
2282 | 1492 |
in acceptChannel:acceptChannel. |
2288 | 1493 |
in enableChannel:httpServerRunning. |
1494 |
||
1495 |
check := box addCheckBox:(resources string:'Swiki enabled') on:swikiEnabled. |
|
1496 |
hasHTTPServer ifFalse:[ |
|
1497 |
check disable |
|
1498 |
]. |
|
1499 |
check enableChannel:httpServerRunning. |
|
1500 |
||
2304 | 1501 |
"/ box leftIndent:40. |
2288 | 1502 |
|
1503 |
in := box |
|
1504 |
addLabelledInputField:(resources string:'SwikiRoot:') |
|
1505 |
adjust:#right |
|
1506 |
on:swikiRoot |
|
1507 |
tabable:true |
|
1508 |
separateAtX:0.3. |
|
1509 |
in acceptChannel:acceptChannel. |
|
2307 | 1510 |
in enableChannel:(BlockValue forLogical:httpServerRunning and:swikiEnabled). |
2288 | 1511 |
|
1512 |
box leftIndent:0. |
|
2278 | 1513 |
|
1514 |
box addHorizontalLine. |
|
1515 |
||
2205 | 1516 |
box addTextLabel:'OSI Protocols (addOn package)'. |
2196 | 1517 |
|
2198 | 1518 |
check := box addCheckBox:(resources string:'Log OSI-ACSE errors') on:osiACSEErrorLogging. |
1519 |
osiACSEPresent ifFalse:[ |
|
1520 |
check disable |
|
1521 |
]. |
|
2199 | 1522 |
check := box addCheckBox:(resources string:'Log OSI-ACSE connection') on:osiACSEConnectionLogging. |
2198 | 1523 |
osiACSEPresent ifFalse:[ |
1524 |
check disable |
|
1525 |
]. |
|
1526 |
check := box addCheckBox:(resources string:'Log OSI-ACSE data xfers') on:osiACSEDataLogging. |
|
1527 |
osiACSEPresent ifFalse:[ |
|
1528 |
check disable |
|
1529 |
]. |
|
1530 |
||
1531 |
box addVerticalSpace. |
|
1532 |
||
1533 |
check := box addCheckBox:(resources string:'Log OSI-ROSE errors') on:osiROSEErrorLogging. |
|
1534 |
osiROSEPresent ifFalse:[ |
|
1535 |
check disable |
|
1536 |
]. |
|
1537 |
check := box addCheckBox:(resources string:'Log OSI-ROSE invokations') on:osiROSEInvokationLogging. |
|
1538 |
osiROSEPresent ifFalse:[ |
|
1539 |
check disable |
|
1540 |
]. |
|
1541 |
check := box addCheckBox:(resources string:'Log OSI-ROSE responses') on:osiROSEResponseLogging. |
|
1542 |
osiROSEPresent ifFalse:[ |
|
1543 |
check disable |
|
1544 |
]. |
|
1545 |
||
1546 |
box addVerticalSpace. |
|
1547 |
||
1548 |
check := box addCheckBox:(resources string:'Log OSI-CMISE errors') on:osiCMISEErrorLogging. |
|
1549 |
osiCMISEPresent ifFalse:[ |
|
1550 |
check disable |
|
1551 |
]. |
|
1552 |
check := box addCheckBox:(resources string:'Log OSI-CMISE messages') on:osiCMISEMessageLogging. |
|
1553 |
osiCMISEPresent ifFalse:[ |
|
1554 |
check disable |
|
2196 | 1555 |
]. |
1556 |
||
1557 |
box |
|
1558 |
addHelpButtonFor:'Launcher/communicationsSettings.html'; |
|
1559 |
addAbortAndOkButtons. |
|
1560 |
||
1561 |
"/ |
|
1562 |
"/ show the box ... |
|
1563 |
"/ |
|
1564 |
box open. |
|
1565 |
||
1566 |
"/ |
|
1567 |
"/ update system settings |
|
1568 |
"/ |
|
1569 |
box accepted ifTrue:[ |
|
2282 | 1570 |
acceptChannel value:false; value:true. |
1571 |
||
2196 | 1572 |
hasRDoitServer ifTrue:[ |
1573 |
(rDoitLogging value ~~ org_rDoitLogging |
|
1574 |
or:[rDoitErrorDebugging value ~~ org_rDoitErrorDebugging |
|
1575 |
or:[rDoitErrorLogging value ~~ org_rDoitErrorLogging |
|
1576 |
or:[rDoitsEnabled value ~~ org_rDoitsEnabled]]]) ifTrue:[ |
|
1577 |
RDoItServer autoload. |
|
1578 |
RDoItServer logging:(rDoitLogging value). |
|
1579 |
RDoItServer errorLogging:(rDoitErrorLogging value). |
|
1580 |
RDoItServer errorCatching:(rDoitErrorDebugging value not). |
|
1581 |
rDoitsEnabled := rDoitsEnabled value. |
|
1582 |
rDoitsEnabled ~~ RDoItServer serverRunning ifTrue:[ |
|
1583 |
rDoitsEnabled ifFalse:[ |
|
1584 |
RDoItServer killAll |
|
1585 |
] ifTrue:[ |
|
1586 |
RDoItServer start. |
|
1587 |
"/ must wait a bit; give it a chance to |
|
1588 |
"/ really start (before checking) |
|
1589 |
Delay waitForSeconds:0.2. |
|
1590 |
RDoItServer serverRunning ifFalse:[ |
|
1591 |
self warn:'RDoit startup failed (see stderr).' |
|
1592 |
] |
|
1593 |
] |
|
1594 |
]. |
|
1595 |
]. |
|
1596 |
]. |
|
2288 | 1597 |
|
2278 | 1598 |
hasHTTPServer ifTrue:[ |
2304 | 1599 |
httpServerPort := httpServerPort value. |
1600 |
org_httpServerPort ~= httpServerPort ifTrue:[ |
|
1601 |
HTTPServer defaultPort:httpServerPort. |
|
1602 |
]. |
|
1603 |
||
2282 | 1604 |
httpServerFileRoot := httpServerFileRoot value. |
1605 |
httpServerFileRoot size == 0 ifTrue:[ |
|
1606 |
httpServerFileRoot := nil |
|
1607 |
]. |
|
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1608 |
org_httpServerFileRoot ~= httpServerFileRoot ifTrue:[ |
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1609 |
HTTPServer fileRoot:httpServerFileRoot. |
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1610 |
]. |
2282 | 1611 |
|
1612 |
httpServerHomeURL := httpServerHomeURL value. |
|
1613 |
httpServerHomeURL size == 0 ifTrue:[ |
|
1614 |
httpServerHomeURL := nil |
|
1615 |
]. |
|
2285
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1616 |
org_httpServerHomeURL ~= httpServerHomeURL ifTrue:[ |
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1617 |
HTTPServer homeURL:httpServerHomeURL. |
23b173086610
oops - do not accidently autoload HTTPServer
Claus Gittinger <cg@exept.de>
parents:
2282
diff
changeset
|
1618 |
]. |
2282 | 1619 |
|
2278 | 1620 |
httpServerRunning value ~~ org_httpServerRunning ifTrue:[ |
1621 |
httpServerRunning value ifTrue:[ |
|
1622 |
HTTPServer startServer |
|
1623 |
] ifFalse:[ |
|
1624 |
HTTPServer stopServer |
|
1625 |
] |
|
1626 |
]. |
|
1627 |
]. |
|
2288 | 1628 |
|
1629 |
hasSwiki ifTrue:[ |
|
1630 |
swikiRoot := swikiRoot value. |
|
1631 |
swikiRoot size == 0 ifTrue:[ |
|
1632 |
swikiRoot := nil |
|
1633 |
]. |
|
1634 |
org_swikiRoot ~= swikiRoot ifTrue:[ |
|
1635 |
PWS::ServerAction serverDirectory:swikiRoot. |
|
1636 |
]. |
|
1637 |
||
1638 |
swikiEnabled value ~~ org_swikiEnabled ifTrue:[ |
|
1639 |
swikiEnabled value ifTrue:[ |
|
2311 | 1640 |
HTTPServer setupMySwiki |
2288 | 1641 |
] ifFalse:[ |
1642 |
HTTPServer removeActionLinkFor:'myswiki' |
|
1643 |
] |
|
1644 |
]. |
|
1645 |
]. |
|
1646 |
||
2196 | 1647 |
osiACSEPresent ifTrue:[ |
2204
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1648 |
OSI::ACSE errorLogging:osiACSEErrorLogging value. |
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1649 |
OSI::ACSE connectionLogging:osiACSEConnectionLogging value. |
5e6c36eaba35
replaced ApliConnection by ACSE
Claus Gittinger <cg@exept.de>
parents:
2203
diff
changeset
|
1650 |
OSI::ACSE dataLogging:osiACSEDataLogging value. |
2196 | 1651 |
]. |
1652 |
osiROSEPresent ifTrue:[ |
|
1653 |
OSI::ROSE errorLogging:osiROSEErrorLogging value. |
|
2218 | 1654 |
OSI::ROSE invocationLogging:osiROSEInvokationLogging value. |
2196 | 1655 |
OSI::ROSE responseLogging:osiROSEResponseLogging value. |
1656 |
]. |
|
1657 |
osiCMISEPresent ifTrue:[ |
|
1658 |
OSI::CMISE errorLogging:osiCMISEErrorLogging value. |
|
1659 |
OSI::CMISE messageLogging:osiCMISEMessageLogging value. |
|
1660 |
]. |
|
1661 |
]. |
|
1662 |
box destroy |
|
1663 |
||
2218 | 1664 |
"Modified: / 28.6.1999 / 15:44:35 / stefan" |
2311 | 1665 |
"Modified: / 30.7.1999 / 20:36:17 / cg" |
2196 | 1666 |
! |
1667 |
||
2001 | 1668 |
compilerSettingsFor:requestor |
1669 |
"open a dialog on compiler related settings" |
|
1670 |
||
1671 |
|box warnings warnSTX warnUnderscore warnDollar warnOldStyle |
|
2287 | 1672 |
allowDollar allowUnderscore allowSqueakExtensions allowQualifiedNames |
1673 |
immutableArrays |
|
2001 | 1674 |
warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox |
1675 |
warnCompatibility warnCompatibilityBox warnDollarBox |
|
2018 | 1676 |
stcCompilation compilationList stcCompilationOptions |
1677 |
historyLines fullHistoryUpdate |
|
2001 | 1678 |
catchMethodRedefs catchClassRedefs keepSourceOptions keepSource |
1679 |
constantFoldingOptions constantFolding justInTimeCompilation |
|
2019 | 1680 |
warnEnabler check component oldIndent supportsJustInTimeCompilation y |
2001 | 1681 |
y2 fullDebugSupport yMax |
1682 |
compileLazy loadBinaries canLoadBinaries strings idx thisIsADemoVersion |
|
1683 |
resources stcSetupButt| |
|
1684 |
||
1685 |
resources := requestor class classResources. |
|
1686 |
||
1687 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
1688 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
1689 |
compileLazy := Autoload compileLazy asValue. |
|
1690 |
||
1691 |
warnings := Compiler warnings asValue. |
|
1692 |
||
1693 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
1694 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
1695 |
warnDollar := Compiler warnDollarInIdentifier asValue. |
|
1696 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
1697 |
warnCommonMistakes := Compiler warnCommonMistakes asValue. |
|
1698 |
warnCompatibility := Compiler warnPossibleIncompatibilities asValue. |
|
1699 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
|
1700 |
allowDollar := Compiler allowDollarInIdentifier asValue. |
|
2244 | 1701 |
allowSqueakExtensions := Compiler allowSqueakExtensions asValue. |
2287 | 1702 |
allowQualifiedNames := Compiler allowQualifiedNames asValue. |
2001 | 1703 |
immutableArrays := Compiler arraysAreImmutable asValue. |
1704 |
||
1705 |
constantFoldingOptions := #( nil #level1 #level2 #full ). |
|
1706 |
constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')). |
|
1707 |
constantFolding selectionIndex:3. |
|
1708 |
||
1709 |
thisIsADemoVersion := (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn'). |
|
1710 |
thisIsADemoVersion ifTrue:[ |
|
2244 | 1711 |
stcCompilationOptions := #( never). |
1712 |
strings := #('never'). |
|
1713 |
idx := 1. |
|
2001 | 1714 |
] ifFalse:[ |
2244 | 1715 |
stcCompilationOptions := #( always default never). |
1716 |
strings := #('always' 'primitive code only' 'never'). |
|
1717 |
idx := 2. |
|
2001 | 1718 |
]. |
1719 |
||
1720 |
stcCompilation := SelectionInList new list:(resources array:strings). |
|
1721 |
stcCompilation selectionIndex:idx. |
|
1722 |
||
1723 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) |
|
1724 |
ifTrue:[ |
|
2244 | 1725 |
justInTimeCompilation := ObjectMemory justInTimeCompilation. |
1726 |
fullDebugSupport := ObjectMemory fullSingleStepSupport. |
|
2001 | 1727 |
] ifFalse:[ |
2244 | 1728 |
justInTimeCompilation := false. |
1729 |
fullDebugSupport := (Compiler lineNumberInfo == #full) asValue. |
|
2001 | 1730 |
]. |
1731 |
justInTimeCompilation := justInTimeCompilation asValue. |
|
1732 |
fullDebugSupport := fullDebugSupport asValue. |
|
1733 |
||
1734 |
catchMethodRedefs := Class catchMethodRedefinitions asValue. |
|
1735 |
catchClassRedefs := Class catchClassRedefinitions asValue. |
|
1736 |
historyLines := HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]]. |
|
1737 |
historyLines ifFalse:[ |
|
2244 | 1738 |
fullHistoryUpdate := false asValue |
2001 | 1739 |
] ifTrue:[ |
2244 | 1740 |
fullHistoryUpdate := HistoryManager fullHistoryUpdate asValue. |
2001 | 1741 |
]. |
1742 |
historyLines := historyLines asValue. |
|
1743 |
||
1744 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
|
1745 |
keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )). |
|
1746 |
keepSource selectionIndex:1. |
|
1747 |
||
1748 |
warnEnabler := [ |
|
2244 | 1749 |
warnings value ifTrue:[ |
1750 |
warnSTXBox enable. |
|
1751 |
warnOldStyleBox enable. |
|
1752 |
warnCommonMistakesBox enable. |
|
1753 |
warnCompatibilityBox enable. |
|
1754 |
allowUnderscore value ifTrue:[ |
|
1755 |
warnUnderscoreBox enable. |
|
1756 |
] ifFalse:[ |
|
1757 |
warnUnderscoreBox disable. |
|
1758 |
]. |
|
1759 |
allowDollar value ifTrue:[ |
|
1760 |
warnDollarBox enable. |
|
1761 |
] ifFalse:[ |
|
1762 |
warnDollarBox disable. |
|
1763 |
]. |
|
1764 |
] ifFalse:[ |
|
1765 |
warnSTXBox disable. |
|
1766 |
warnUnderscoreBox disable. |
|
1767 |
warnDollarBox disable. |
|
1768 |
warnOldStyleBox disable. |
|
1769 |
warnCommonMistakesBox disable. |
|
1770 |
warnCompatibilityBox disable. |
|
1771 |
]]. |
|
2001 | 1772 |
|
1773 |
warnings onChangeSend:#value to:warnEnabler. |
|
1774 |
allowUnderscore onChangeSend:#value to:warnEnabler. |
|
1775 |
allowDollar onChangeSend:#value to:warnEnabler. |
|
2287 | 1776 |
"/ allowSqueakExtensions onChangeSend:#value to:warnEnabler. |
1777 |
"/ allowQualifiedNames onChangeSend:#value to:warnEnabler. |
|
2001 | 1778 |
|
1779 |
box := DialogBox new. |
|
1780 |
box label:(resources string:'Compiler settings'). |
|
1781 |
||
1782 |
y := box yPosition. |
|
1783 |
check := box addCheckBox:(resources string:'catch method redefinitions') on:catchMethodRedefs. |
|
1784 |
check width:0.5. |
|
1785 |
||
1786 |
box yPosition:y. |
|
1787 |
check := box addCheckBox:(resources string:'catch class redefinitions') on:catchClassRedefs. |
|
1788 |
check left:0.5; width:0.5. |
|
1789 |
||
1790 |
y := box yPosition. |
|
1791 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
|
1792 |
check width:0.5. |
|
1793 |
HistoryManager isNil ifTrue:[check disable]. |
|
1794 |
box yPosition:y. |
|
1795 |
check := box addCheckBox:(resources string:'keep full class history') on:fullHistoryUpdate. |
|
1796 |
check left:0.5; width:0.5. |
|
1797 |
HistoryManager isNil ifTrue:[check disable] ifFalse:[check enableChannel:historyLines]. |
|
1798 |
||
1799 |
box addPopUpList:(resources string:'fileIn source mode:') on:keepSource. |
|
1800 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
|
1801 |
||
1802 |
box addHorizontalLine. |
|
1803 |
||
1804 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
|
1805 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
|
1806 |
canLoadBinaries ifFalse:[ |
|
2244 | 1807 |
loadBinaries value:false. |
1808 |
check disable |
|
2001 | 1809 |
]. |
1810 |
supportsJustInTimeCompilation ifTrue:[ |
|
2244 | 1811 |
component := box |
1812 |
addCheckBox:(resources string:'just in time compilation to machine code') |
|
1813 |
on:justInTimeCompilation. |
|
2001 | 1814 |
]. |
1815 |
||
1816 |
box addHorizontalLine. |
|
1817 |
||
1818 |
ObjectFileLoader notNil ifTrue:[ |
|
2244 | 1819 |
compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation. |
1820 |
||
1821 |
thisIsADemoVersion ifFalse:[ |
|
1822 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
|
1823 |
||
1824 |
stcSetupButt := box addComponent:(Button label:(resources string:'stc compilation parameters...') |
|
1825 |
action:[|manager| |
|
1826 |
||
1827 |
self stcCompilerSettingsFor:requestor. |
|
1828 |
]). |
|
1829 |
]. |
|
1830 |
||
1831 |
box addHorizontalLine. |
|
1832 |
||
1833 |
"/ if there is no compiler around, |
|
1834 |
"/ change to compile nothing, and disable the checkBoxes |
|
1835 |
Compiler canCreateMachineCode ifFalse:[ |
|
1836 |
stcCompilation selectionIndex:(3 min:stcCompilationOptions size). |
|
1837 |
compilationList disable. |
|
1838 |
]. |
|
2001 | 1839 |
]. |
1840 |
||
1841 |
y := box yPosition. |
|
1842 |
||
1843 |
component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
|
1844 |
component width:0.4. |
|
1845 |
||
1846 |
component := box addCheckBox:(resources string:'allow dollar in identifiers') on:allowDollar. |
|
1847 |
component width:0.4. |
|
1848 |
||
2244 | 1849 |
component := box addCheckBox:(resources string:'allow squeak syntax extensions') on:allowSqueakExtensions. |
2001 | 1850 |
component width:0.4. |
2287 | 1851 |
|
1852 |
component := box addCheckBox:(resources string:'allow vw3 qualifiedNames') on:allowQualifiedNames. |
|
1853 |
component width:0.4. |
|
1854 |
||
2001 | 1855 |
y2 := box yPosition. |
1856 |
||
1857 |
box yPosition:y. |
|
1858 |
box leftIndent:0. |
|
1859 |
||
1860 |
component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding. |
|
1861 |
component superView left:0.5; width:0.5. |
|
1862 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
|
1863 |
||
1864 |
component := box addCheckBox:(resources string:'full debug info') on:fullDebugSupport. |
|
1865 |
component left:0.5; width:0.4. |
|
2244 | 1866 |
|
1867 |
component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
|
1868 |
component left:0.5; width:0.4. |
|
1869 |
||
2001 | 1870 |
box yPosition:(box yPosition max:y2). |
1871 |
||
1872 |
||
1873 |
box addHorizontalLine. |
|
1874 |
||
1875 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
1876 |
"/ box addVerticalSpace. |
|
1877 |
oldIndent := box leftIndent. |
|
1878 |
box leftIndent:30. |
|
1879 |
||
1880 |
y := box yPosition. |
|
1881 |
||
1882 |
warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX. |
|
1883 |
warnSTXBox width:0.4. |
|
1884 |
||
1885 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
|
1886 |
warnUnderscoreBox width:0.4. |
|
1887 |
||
1888 |
warnDollarBox := box addCheckBox:(resources string:'dollars in identifiers') on:warnDollar. |
|
1889 |
warnDollarBox width:0.4. |
|
1890 |
||
1891 |
yMax := box yPosition. |
|
1892 |
||
1893 |
box yPosition:y. |
|
1894 |
box leftIndent:0. |
|
1895 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
|
1896 |
warnOldStyleBox left:0.5; width:0.4. |
|
1897 |
||
1898 |
warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes. |
|
1899 |
warnCommonMistakesBox left:0.5; width:0.4. |
|
1900 |
||
1901 |
warnCompatibilityBox := box addCheckBox:(resources string:'possible incompatibilities') on:warnCompatibility. |
|
1902 |
warnCompatibilityBox left:0.5; width:0.4. |
|
1903 |
||
1904 |
box leftIndent:oldIndent. |
|
1905 |
box yPosition:(yMax max: box yPosition). |
|
1906 |
||
1907 |
box |
|
2244 | 1908 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
1909 |
addAbortAndOkButtons. |
|
2001 | 1910 |
|
1911 |
warnEnabler value. |
|
1912 |
box open. |
|
1913 |
||
1914 |
box accepted ifTrue:[ |
|
2244 | 1915 |
HistoryManager notNil ifTrue:[ |
1916 |
HistoryManager fullHistoryUpdate:fullHistoryUpdate value. |
|
1917 |
historyLines value ifTrue:[ |
|
1918 |
HistoryManager activate |
|
1919 |
] ifFalse:[ |
|
1920 |
HistoryManager deactivate |
|
1921 |
]. |
|
1922 |
]. |
|
1923 |
Class catchMethodRedefinitions:catchMethodRedefs value. |
|
1924 |
Class catchClassRedefinitions:catchClassRedefs value. |
|
1925 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
|
1926 |
Compiler warnings:warnings value. |
|
1927 |
Compiler warnSTXSpecials:warnSTX value. |
|
1928 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
|
1929 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
|
1930 |
Compiler warnDollarInIdentifier:warnDollar value. |
|
1931 |
Compiler warnCommonMistakes:warnCommonMistakes value. |
|
1932 |
Compiler warnPossibleIncompatibilities:warnCompatibility value. |
|
1933 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
|
1934 |
Compiler allowDollarInIdentifier:allowDollar value. |
|
1935 |
Compiler allowSqueakExtensions:allowSqueakExtensions value. |
|
2287 | 1936 |
Compiler allowQualifiedNames:allowQualifiedNames value. |
2244 | 1937 |
Compiler arraysAreImmutable:immutableArrays value. |
1938 |
fullDebugSupport value ifTrue:[ |
|
1939 |
Compiler lineNumberInfo:#full. |
|
1940 |
] ifFalse:[ |
|
1941 |
Compiler lineNumberInfo:true |
|
1942 |
]. |
|
1943 |
||
1944 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
|
1945 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
|
1946 |
||
1947 |
supportsJustInTimeCompilation ifTrue:[ |
|
1948 |
justInTimeCompilation := justInTimeCompilation value. |
|
1949 |
justInTimeCompilation ifTrue:[ |
|
1950 |
Method allInstancesDo:[:m | m checked:false]. |
|
1951 |
]. |
|
1952 |
ObjectMemory justInTimeCompilation:justInTimeCompilation. |
|
1953 |
ObjectMemory fullSingleStepSupport:fullDebugSupport value. |
|
1954 |
]. |
|
1955 |
Autoload compileLazy:compileLazy value. |
|
1956 |
Smalltalk loadBinaries:loadBinaries value. |
|
2001 | 1957 |
]. |
1958 |
box destroy |
|
1959 |
||
1960 |
"Modified: / 10.9.1995 / 19:19:18 / claus" |
|
1961 |
"Modified: / 9.9.1996 / 22:42:47 / stefan" |
|
1962 |
"Modified: / 5.11.1998 / 14:25:59 / cg" |
|
1963 |
! |
|
1964 |
||
1965 |
displaySettingsFor:requestor |
|
1966 |
"open a dialog on display related settings" |
|
1967 |
||
1968 |
|box listOfSizes sizeInfos |
|
1969 |
sizes sizeNames sizeList sizeX sizeY deepIcons |
|
1970 |
isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList |
|
2162 | 1971 |
y component screen visual clipEncodings clipEncodingSyms clipEncodingList resources |
2164 | 1972 |
| |
2001 | 1973 |
|
1974 |
resources := requestor class classResources. |
|
1975 |
||
1976 |
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default. |
|
1977 |
listOfSizes == #default ifTrue:[ |
|
2162 | 1978 |
"/ nothing in resource file; offer at least some. |
1979 |
sizeInfos := #( |
|
1980 |
( '11.3'' (235mm x 175mm) LCD' (235 175) ) |
|
1981 |
( '17'' (325mm x 245mm)' (325 245) ) |
|
1982 |
( '19'' (340mm x 270mm)' (340 270) ) |
|
1983 |
( '20'' (350mm x 280mm)' (350 280) ) |
|
1984 |
( '21'' (365mm x 285mm)' (365 285) ) |
|
1985 |
). |
|
2001 | 1986 |
] ifFalse:[ |
2162 | 1987 |
sizeInfos := resources array:listOfSizes. |
2001 | 1988 |
]. |
1989 |
sizeNames := sizeInfos collect:[:entry | entry at:1]. |
|
1990 |
sizes := sizeInfos collect:[:entry | entry at:2]. |
|
1991 |
||
1992 |
screen := Screen current. |
|
1993 |
visual := screen visualType. |
|
1994 |
||
1995 |
isColorMonitor := screen hasColors asValue. |
|
1996 |
deepIcons := screen supportsDeepIcons asValue. |
|
1997 |
useFixPalette := screen fixColors notNil asValue. |
|
1998 |
useFixGrayPalette := screen fixGrayColors notNil asValue. |
|
1999 |
||
2000 |
sizeList := SelectionInList with:sizeNames. |
|
2001 |
sizeX := screen widthInMillimeter asValue. |
|
2002 |
sizeY := screen heightInMillimeter asValue. |
|
2003 |
||
2004 |
clipEncodingSyms := #(nil #iso8859 #jis #jis7 #sjis #euc #big5). |
|
2005 |
clipEncodings := resources array:#('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5'). |
|
2006 |
clipEncodingList := SelectionInList new. |
|
2007 |
clipEncodingList list:clipEncodings. |
|
2008 |
clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1). |
|
2009 |
||
2010 |
ditherList := SelectionInList new. |
|
2011 |
||
2012 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[ |
|
2162 | 2013 |
ditherStyles := #('threshold' 'ordered dither' 'error diffusion'). |
2014 |
ditherSyms := #(threshold ordered floydSteinberg). |
|
2001 | 2015 |
] ifFalse:[ |
2162 | 2016 |
visual ~~ #TrueColor ifTrue:[ |
2017 |
ditherStyles := #('nearest color' 'error diffusion'). |
|
2018 |
ditherSyms := #(ordered floydSteinberg). |
|
2019 |
] |
|
2001 | 2020 |
]. |
2021 |
ditherSyms notNil ifTrue:[ |
|
2162 | 2022 |
ditherList list:ditherStyles. |
2023 |
ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold). |
|
2001 | 2024 |
]. |
2025 |
||
2026 |
box := DialogBox new. |
|
2027 |
box label:(resources string:'Display screen settings'). |
|
2028 |
||
2029 |
(box addTextLabel:(resources string:'Actual visible screen area:')) |
|
2162 | 2030 |
adjust:#left. |
2001 | 2031 |
|
2032 |
(box addPopUpList:(resources string:'common sizes:') on:sizeList) |
|
2162 | 2033 |
label:'monitor size'. |
2001 | 2034 |
|
2035 |
idx := sizes findFirst:[:entry | |
|
2162 | 2036 |
((entry at:1) = sizeX value) |
2037 |
and:[((entry at:2) = sizeY value)] |
|
2038 |
]. |
|
2001 | 2039 |
idx ~~ 0 ifTrue:[ |
2162 | 2040 |
sizeList selectionIndex:idx |
2001 | 2041 |
]. |
2042 |
||
2043 |
sizeList onChangeSend:#value to:[ |
|
2162 | 2044 |
|idx| |
2045 |
||
2046 |
idx := sizeList selectionIndex. |
|
2047 |
sizeX value:((sizes at:idx) at:1). |
|
2048 |
sizeY value:((sizes at:idx) at:2). |
|
2049 |
]. |
|
2001 | 2050 |
|
2051 |
y := box yPosition. |
|
2162 | 2052 |
component := box addTextLabel:(resources string:'Screen size:'). |
2001 | 2053 |
component width:0.3; adjust:#right; borderWidth:0. |
2054 |
||
2055 |
box yPosition:y. |
|
2056 |
component := box addInputFieldOn:nil tabable:true. |
|
2057 |
component width:0.25; left:0.3; |
|
2162 | 2058 |
immediateAccept:false; acceptOnLeave:false; |
2059 |
cursorMovementWhenUpdating:#beginOfLine; |
|
2060 |
converter:(PrintConverter new initForInteger); |
|
2061 |
model:sizeX. |
|
2001 | 2062 |
|
2063 |
box yPosition:y. |
|
2064 |
component := box addTextLabel:(' x '). |
|
2065 |
component width:0.1; left:0.55; adjust:#center; borderWidth:0. |
|
2066 |
||
2067 |
box yPosition:y. |
|
2068 |
component := box addInputFieldOn:nil tabable:true. |
|
2069 |
component width:0.25; left:0.65; |
|
2162 | 2070 |
immediateAccept:false; acceptOnLeave:false; |
2071 |
cursorMovementWhenUpdating:#beginOfLine; |
|
2072 |
converter:(PrintConverter new initForInteger); |
|
2073 |
model:sizeY. |
|
2001 | 2074 |
|
2075 |
box yPosition:y. |
|
2076 |
component := box addTextLabel:('(mm)'). |
|
2077 |
component width:0.1; left:0.9; adjust:#center; borderWidth:0. |
|
2078 |
||
2079 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2080 |
||
2081 |
(box addTextLabel:(resources string:'Screen: depth: %1 visual: %2 (%3)' |
|
2395 | 2082 |
with:screen depth printString |
2083 |
with:screen visualType |
|
2084 |
with:screen serverVendor)) |
|
2162 | 2085 |
adjust:#left. |
2001 | 2086 |
|
2087 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2088 |
||
2162 | 2089 |
box addCheckBox:(resources string:'Color monitor') on:isColorMonitor. |
2001 | 2090 |
|
2091 |
visual == #PseudoColor ifTrue:[ |
|
2162 | 2092 |
box addVerticalSpace. |
2093 |
component := box addCheckBox:(resources string:'Use fix color palette %1' with:'(4x8x4)') on:useFixPalette. |
|
2094 |
||
2095 |
box addVerticalSpace. |
|
2096 |
component := box addCheckBox:(resources string:'Use fix gray color palette %1' with:'(32)') on:useFixGrayPalette. |
|
2001 | 2097 |
]. |
2098 |
||
2099 |
ditherSyms notNil ifTrue:[ |
|
2162 | 2100 |
box addVerticalSpace. |
2101 |
component := box addPopUpList:(resources string:'Amage display:') on:ditherList. |
|
2102 |
component defaultLabel:'image display'. |
|
2103 |
component superView horizontalLayout:#leftSpace. |
|
2001 | 2104 |
]. |
2105 |
||
2106 |
box addVerticalSpace. |
|
2162 | 2107 |
box addCheckBox:(resources string:'Allow colored/grayscale icons') on:deepIcons. |
2108 |
||
2001 | 2109 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
2110 |
||
2162 | 2111 |
component := box addPopUpList:(resources string:'ClipBoard encoding:') on:clipEncodingList. |
2001 | 2112 |
component superView horizontalLayout:#leftSpace. |
2113 |
||
2114 |
box |
|
2162 | 2115 |
addHelpButtonFor:'Launcher/screenSettings.html'; |
2116 |
addAbortAndOkButtons. |
|
2001 | 2117 |
box open. |
2118 |
||
2119 |
box accepted ifTrue:[ |
|
2162 | 2120 |
Image flushDeviceImages. |
2121 |
||
2122 |
screen visualType == #PseudoColor ifTrue:[ |
|
2123 |
useFixPalette value ifTrue:[ |
|
2124 |
Color colorAllocationFailSignal handle:[:ex | |
|
2125 |
self warn:(resources string:'Could not allocate colors.'). |
|
2126 |
] do:[ |
|
2127 |
Color getColorsRed:4 green:8 blue:4 on:screen |
|
2128 |
] |
|
2129 |
] ifFalse:[ |
|
2130 |
screen releaseFixColors |
|
2131 |
]. |
|
2132 |
||
2133 |
useFixGrayPalette value ifTrue:[ |
|
2134 |
Color colorAllocationFailSignal handle:[:ex | |
|
2135 |
self warn:(resources string:'Could not allocate colors.'). |
|
2136 |
] do:[ |
|
2137 |
Color getGrayColors:32 on:screen |
|
2138 |
] |
|
2139 |
] ifFalse:[ |
|
2140 |
screen releaseFixGrayColors |
|
2141 |
] |
|
2142 |
]. |
|
2143 |
screen hasColors:isColorMonitor value. |
|
2144 |
screen widthInMillimeter:sizeX value. |
|
2145 |
screen heightInMillimeter:sizeY value. |
|
2146 |
||
2147 |
screen supportsDeepIcons:deepIcons value. |
|
2148 |
ditherSyms notNil ifTrue:[ |
|
2149 |
Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex). |
|
2150 |
]. |
|
2151 |
||
2152 |
requestor withWaitCursorDo:[ |
|
2153 |
View defaultStyle:(View defaultStyle). |
|
2154 |
]. |
|
2155 |
||
2156 |
screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex). |
|
2001 | 2157 |
]. |
2158 |
box destroy |
|
2159 |
||
2162 | 2160 |
"Modified: / 9.9.1996 / 22:43:04 / stefan" |
2164 | 2161 |
"Modified: / 20.5.1999 / 18:35:21 / cg" |
2001 | 2162 |
! |
2163 |
||
2164 |
editSettingsFor:requestor |
|
2165 |
"open a dialog on edit settings" |
|
2166 |
||
2019 | 2167 |
|box st80EditingMode st80DoubleClickSelectMode resources| |
2001 | 2168 |
|
2169 |
resources := requestor class classResources. |
|
2170 |
||
2171 |
"/ |
|
2172 |
"/ extract relevant system settings ... |
|
2173 |
"/ |
|
2174 |
st80EditingMode := EditTextView st80Mode asValue. |
|
2175 |
st80DoubleClickSelectMode := TextView st80SelectMode asValue. |
|
2176 |
||
2177 |
"/ |
|
2178 |
"/ create a box on those values ... |
|
2179 |
"/ |
|
2180 |
box := DialogBox new. |
|
2181 |
box label:(resources string:'Edit settings'). |
|
2182 |
||
2183 |
box addCheckBox:(resources string:'cursor has ST80 line end behavior') on:st80EditingMode. |
|
2184 |
box addCheckBox:(resources string:'double click select behavior as in ST80') on:st80DoubleClickSelectMode. |
|
2185 |
||
2186 |
box addHorizontalLine. |
|
2187 |
||
2188 |
box |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2189 |
addHelpButtonFor:'Launcher/editSettings.html'; |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2190 |
addAbortAndOkButtons. |
2001 | 2191 |
|
2192 |
"/ |
|
2193 |
"/ show the box ... |
|
2194 |
"/ |
|
2195 |
box open. |
|
2196 |
||
2197 |
"/ |
|
2198 |
"/ update system settings |
|
2199 |
"/ |
|
2200 |
box accepted ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2201 |
EditTextView st80Mode:(st80EditingMode value). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2202 |
TextView st80SelectMode:(st80DoubleClickSelectMode value). |
2001 | 2203 |
]. |
2204 |
box destroy |
|
2205 |
||
2206 |
"Created: / 6.1.1999 / 14:12:09 / cg" |
|
2207 |
"Modified: / 6.1.1999 / 14:17:51 / cg" |
|
2208 |
! |
|
2209 |
||
2210 |
fontSettingsFor:requestor |
|
2211 |
"open a dialog on font related settings" |
|
2212 |
||
2213 |
(self fontBoxForEncoding:nil for:requestor) ifTrue:[ |
|
2214 |
requestor reopenLauncher. |
|
2215 |
] |
|
2216 |
||
2217 |
"Created: 26.2.1996 / 22:52:51 / cg" |
|
2218 |
"Modified: 8.1.1997 / 14:52:49 / cg" |
|
2219 |
! |
|
2220 |
||
2221 |
javaSettingsFor:requestor |
|
2222 |
"open a dialog on settings related to the java subsystem" |
|
2223 |
||
2224 |
|box audio javaHome resources component |
|
2225 |
extraFileSecurityChecks extraSocketSecurityChecks |
|
2226 |
supportsJustInTimeCompilation |
|
2227 |
javaJustInTimeCompilation javaNativeCodeOptimization |
|
2259 | 2228 |
showJavaByteCode exceptionDebug nullPointerExceptionDebug| |
2001 | 2229 |
|
2230 |
resources := requestor class classResources. |
|
2231 |
||
2232 |
audio := JavaVM audioEnabled asValue. |
|
2233 |
extraFileSecurityChecks := JavaVM fileOpenConfirmation asValue. |
|
2234 |
extraSocketSecurityChecks := JavaVM socketConnectConfirmation asValue. |
|
2235 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) ifTrue:[ |
|
2259 | 2236 |
javaJustInTimeCompilation := ObjectMemory javaJustInTimeCompilation asValue. |
2237 |
javaNativeCodeOptimization := ObjectMemory javaNativeCodeOptimization asValue. |
|
2001 | 2238 |
] ifFalse:[ |
2259 | 2239 |
javaJustInTimeCompilation := javaNativeCodeOptimization := false |
2001 | 2240 |
]. |
2241 |
showJavaByteCode := JavaMethod forceByteCodeDisplay asValue. |
|
2242 |
exceptionDebug := JavaVM exceptionDebug asValue. |
|
2259 | 2243 |
nullPointerExceptionDebug := JavaVM nullPointerExceptionDebug asValue. |
2001 | 2244 |
|
2245 |
javaHome := (Java javaHome ? '') asValue. |
|
2246 |
||
2247 |
box := DialogBox new. |
|
2248 |
box label:(resources string:'Java'). |
|
2249 |
||
2250 |
box addCheckBox:(resources string:'Audio Enabled') on:audio. |
|
2251 |
box addCheckBox:(resources string:'Confirm file open for write') on:extraFileSecurityChecks. |
|
2252 |
box addCheckBox:(resources string:'Confirm socket connect') on:extraSocketSecurityChecks. |
|
2253 |
box addCheckBox:(resources string:'Debug Exceptions') on:exceptionDebug. |
|
2259 | 2254 |
box addCheckBox:(resources string:'Debug Null Pointer Exceptions') on:nullPointerExceptionDebug. |
2001 | 2255 |
box addHorizontalLine. |
2256 |
supportsJustInTimeCompilation ifTrue:[ |
|
2259 | 2257 |
box |
2258 |
addCheckBox:(resources string:'java just in time compilation to machine code') |
|
2259 |
on:javaJustInTimeCompilation. |
|
2260 |
box |
|
2261 |
addCheckBox:(resources string:'optimize native code') |
|
2262 |
on:javaNativeCodeOptimization. |
|
2001 | 2263 |
]. |
2264 |
box addHorizontalLine. |
|
2265 |
box addCheckBox:(resources string:'Display java byteCode (i.e. not source)') on:showJavaByteCode. |
|
2266 |
box addHorizontalLine. |
|
2267 |
component := box |
|
2259 | 2268 |
addLabelledInputField:(resources string:'java home:') |
2269 |
adjust:#right |
|
2270 |
on:javaHome |
|
2271 |
tabable:true |
|
2272 |
separateAtX:0.3. |
|
2001 | 2273 |
component acceptOnLeave:false. |
2274 |
||
2275 |
box addVerticalSpace. |
|
2276 |
box addComponent:(Button |
|
2259 | 2277 |
label:(resources string:'Reinit VM now') |
2278 |
action:[ |
|
2279 |
box windowGroup withWaitCursorDo:[ |
|
2280 |
Java classPath size == 0 ifTrue:[ |
|
2281 |
Java initialize. |
|
2282 |
]. |
|
2283 |
Java classPath size == 0 ifTrue:[ |
|
2284 |
self warn:'No JDK found'. |
|
2285 |
] ifFalse:[ |
|
2286 |
JavaVM initializeVM |
|
2287 |
] |
|
2288 |
] |
|
2289 |
]). |
|
2001 | 2290 |
|
2291 |
box addComponent:(Button |
|
2259 | 2292 |
label:(resources string:'Remove all Java classes now') |
2293 |
action:[ |
|
2294 |
box windowGroup withWaitCursorDo:[ |
|
2295 |
Java flushAllJavaResources |
|
2296 |
] |
|
2297 |
]). |
|
2001 | 2298 |
|
2299 |
"/ box addHorizontalLine. |
|
2300 |
||
2301 |
"/ box addHelpButtonFor:'Launcher/javaSettings.html'. |
|
2048 | 2302 |
box addAbortAndOkButtons. |
2001 | 2303 |
box open. |
2304 |
||
2305 |
box accepted ifTrue:[ |
|
2259 | 2306 |
JavaMethod forceByteCodeDisplay:showJavaByteCode value. |
2307 |
JavaVM audioEnabled:audio value. |
|
2308 |
JavaVM exceptionDebug:exceptionDebug value. |
|
2309 |
JavaVM nullPointerExceptionDebug:nullPointerExceptionDebug value. |
|
2310 |
JavaVM fileOpenConfirmation: extraFileSecurityChecks value. |
|
2311 |
JavaVM socketConnectConfirmation: extraSocketSecurityChecks value. |
|
2312 |
javaJustInTimeCompilation value ~~ ObjectMemory javaJustInTimeCompilation ifTrue:[ |
|
2313 |
ObjectMemory javaJustInTimeCompilation:javaJustInTimeCompilation value. |
|
2314 |
javaJustInTimeCompilation value ifTrue:[ |
|
2315 |
JavaMethod allSubInstancesDo:[:m | m checked:false]. |
|
2316 |
]. |
|
2317 |
]. |
|
2318 |
javaNativeCodeOptimization value ~~ ObjectMemory javaNativeCodeOptimization ifTrue:[ |
|
2319 |
ObjectMemory javaNativeCodeOptimization:javaNativeCodeOptimization value. |
|
2320 |
]. |
|
2001 | 2321 |
]. |
2322 |
box destroy |
|
2323 |
||
2324 |
"Created: / 18.7.1998 / 22:32:58 / cg" |
|
2325 |
"Modified: / 27.1.1999 / 20:16:03 / cg" |
|
2326 |
! |
|
2327 |
||
2328 |
keyboardSettingsFor:requestor |
|
2329 |
"open a dialog on keyboard related settings" |
|
2330 |
||
2331 |
|mappings listOfRawKeys listOfFunctions |
|
2332 |
box l |
|
2333 |
list1 list2 listView1 listView2 |
|
2334 |
frame selectionForwarder macroForwarder macroTextView y resources| |
|
2335 |
||
2336 |
resources := requestor class classResources. |
|
2337 |
||
2338 |
mappings := Screen current keyboardMap. |
|
2339 |
||
2340 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
2341 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
2342 |
||
2343 |
selectionForwarder := Plug new. |
|
2344 |
selectionForwarder respondTo:#showFunction |
|
2270
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2345 |
with:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2346 |
|raw| |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2347 |
raw := list1 selection. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2348 |
list2 retractInterestsFor:selectionForwarder. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2349 |
list2 selection:(mappings at:raw asSymbol) asString. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2350 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2351 |
]. |
2001 | 2352 |
selectionForwarder respondTo:#showRawKey |
2270
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2353 |
with:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2354 |
|f raw| |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2355 |
|
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2356 |
f := list2 selection. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2357 |
list1 retractInterestsFor:selectionForwarder. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2358 |
raw := mappings keyAtValue:f asString. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2359 |
raw isNil ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2360 |
raw := mappings keyAtValue:f first. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2361 |
raw isNil ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2362 |
raw := mappings keyAtValue:f asSymbol. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2363 |
] |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2364 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2365 |
list1 selection:raw. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2366 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2367 |
]. |
2001 | 2368 |
|
2369 |
macroForwarder := [ |
|
2270
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2370 |
|f macro indent| |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2371 |
f := list2 selection. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2372 |
(f startsWith:'Cmd') ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2373 |
f := f copyFrom:4 |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2374 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2375 |
macro := UserPreferences current functionKeySequences |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2376 |
at:(f asSymbol) ifAbsent:nil. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2377 |
macro notNil ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2378 |
macro := macro asStringCollection. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2379 |
indent := macro |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2380 |
inject:99999 into:[:min :element | |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2381 |
|stripped| |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2382 |
|
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2383 |
stripped := element withoutLeadingSeparators. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2384 |
stripped size == 0 ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2385 |
min |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2386 |
] ifFalse:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2387 |
min min:(element size - stripped size) |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2388 |
] |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2389 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2390 |
indent ~~ 0 ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2391 |
macro := macro collect:[:line | |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2392 |
line size > indent ifTrue:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2393 |
line copyFrom:indent+1 |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2394 |
] ifFalse:[ |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2395 |
line |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2396 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2397 |
] |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2398 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2399 |
]. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2400 |
macroTextView contents:macro. |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2401 |
]. |
2001 | 2402 |
|
2403 |
list1 := SelectionInList with:listOfRawKeys. |
|
2404 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
2405 |
||
2406 |
list2 := SelectionInList with:listOfFunctions. |
|
2407 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
2408 |
list2 onChangeSend:#value to:macroForwarder. |
|
2409 |
||
2410 |
box := Dialog new. |
|
2411 |
box label:(resources string:'Keyboard mappings'). |
|
2412 |
||
2413 |
l := box addTextLabel:(resources at:'KEY_MSG' default:'keyboard mapping:') withCRs. |
|
2414 |
l adjust:#left; borderWidth:0. |
|
2415 |
||
2416 |
frame := View new. |
|
2417 |
frame extent:300 @ 300. |
|
2418 |
frame borderWidth:0. |
|
2419 |
||
2420 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
2421 |
listView1 model:list1. |
|
2422 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
2423 |
||
2424 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
2425 |
listView2 model:list2. |
|
2426 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
2427 |
||
2428 |
frame topInset:box yPosition. |
|
2429 |
box addComponent:frame withExtent:350@200. |
|
2430 |
box makeTabable:listView1. |
|
2431 |
box makeTabable:listView2. |
|
2432 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
2433 |
||
2434 |
box addVerticalSpace. |
|
2435 |
||
2436 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
2437 |
l adjust:#left; borderWidth:0. |
|
2438 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
2439 |
l topInset:(View viewSpacing). |
|
2440 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
2441 |
||
2442 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
2443 |
box addComponent:macroTextView tabable:true. |
|
2444 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
2445 |
y := box yPosition. |
|
2446 |
||
2447 |
box |
|
2270
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2448 |
addHelpButtonFor:'Launcher/keyboardSetting.html'; |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2449 |
"addAbortButton;" |
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2450 |
addOkButtonLabelled:(resources string:'dismiss'). |
2001 | 2451 |
|
2452 |
macroTextView topInset:(l preferredExtent y + 5). |
|
2453 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
2454 |
||
2455 |
box open. |
|
2456 |
||
2457 |
box accepted ifTrue:[ |
|
2270
89a5fc4c5d78
keep functionKeySequences in UserPrefs (not as a global)
Claus Gittinger <cg@exept.de>
parents:
2269
diff
changeset
|
2458 |
"no action yet ..." |
2001 | 2459 |
]. |
2460 |
box destroy |
|
2461 |
||
2462 |
"Modified: / 9.9.1996 / 22:43:17 / stefan" |
|
2463 |
"Modified: / 4.5.1998 / 12:40:02 / cg" |
|
2464 |
! |
|
2465 |
||
2466 |
languageSettingsFor:requestor |
|
2467 |
"open a dialog on language related settings" |
|
2468 |
||
2469 |
|listOfLanguages translatedLanguages switch box languageList flags resources| |
|
2470 |
||
2471 |
resources := requestor class classResources. |
|
2472 |
||
2473 |
" |
|
2474 |
get list of supported languages from the launchers resources ... |
|
2475 |
" |
|
2476 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default'). |
|
2477 |
listOfLanguages := listOfLanguages asOrderedCollection. |
|
2149 | 2478 |
|
2001 | 2479 |
translatedLanguages := listOfLanguages collect:[:lang | |item| |
2395 | 2480 |
item := resources at:lang. |
2481 |
item isString ifTrue:[ |
|
2482 |
item |
|
2483 |
] ifFalse:[ |
|
2484 |
item at:1 |
|
2485 |
] |
|
2486 |
]. |
|
2001 | 2487 |
flags := listOfLanguages collect:[:lang | |item| |
2395 | 2488 |
item := resources at:lang. |
2489 |
item isArray ifTrue:[ |
|
2490 |
item at:2 |
|
2491 |
] ifFalse:[ |
|
2492 |
nil |
|
2493 |
] |
|
2494 |
]. |
|
2001 | 2495 |
flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]]. |
2496 |
||
2497 |
languageList := translatedLanguages with:flags collect:[:lang :flag | |
|
2395 | 2498 |
LabelAndIcon icon:flag string:lang. |
2499 |
]. |
|
2001 | 2500 |
|
2501 |
box := ListSelectionBox title:(resources at:'LANG_MSG' default:'select a language') withCRs. |
|
2502 |
box label:(resources string:'Language selection'). |
|
2503 |
box list:languageList. |
|
2149 | 2504 |
box initialText:(Language , '-' , LanguageTerritory). |
2001 | 2505 |
box action:[:newLanguage | |
2395 | 2506 |
requestor withWaitCursorDo:[ |
2507 |
|fontPref idx language oldLanguage territory enc |
|
2508 |
answer matchingFonts l screen| |
|
2509 |
||
2510 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
|
2511 |
idx ~~ 0 ifTrue:[ |
|
2512 |
language := listOfLanguages at:idx |
|
2513 |
] ifFalse:[ |
|
2514 |
language := newLanguage |
|
2515 |
]. |
|
2516 |
(language includes:$-) ifTrue:[ |
|
2517 |
l := language asCollectionOfSubstringsSeparatedBy:$-. |
|
2518 |
language := l at:1. |
|
2519 |
territory := l at:2. |
|
2520 |
]. |
|
2521 |
territory isNil ifTrue:[ |
|
2522 |
territory := language copyTo:2 |
|
2523 |
]. |
|
2524 |
||
2525 |
"/ check if the new language needs a differently encoded font; |
|
2526 |
"/ ask user to switch font and allow cancellation. |
|
2527 |
"/ Otherwise, you are left with unreadable menu & button items ... |
|
2528 |
||
2529 |
oldLanguage := Smalltalk language. |
|
2530 |
Smalltalk language:language asSymbol. |
|
2531 |
ResourcePack flushCachedResourcePacks. |
|
2532 |
"/ refetch resources ... |
|
2533 |
resources := requestor class classResources. |
|
2534 |
fontPref := resources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'. |
|
2535 |
Smalltalk language:oldLanguage. |
|
2536 |
||
2537 |
switch := true. |
|
2538 |
enc := MenuView defaultFont encoding. |
|
2539 |
(fontPref match:enc) ifFalse:[ |
|
2540 |
"/ look if there is one at all. |
|
2541 |
screen := Screen current. |
|
2542 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding]. |
|
2543 |
matchingFonts size == 0 ifTrue:[ |
|
2544 |
"/ flush and try again - just in case, the font path has changed. |
|
2545 |
screen flushListOfAvailableFonts. |
|
2546 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding]. |
|
2547 |
]. |
|
2548 |
matchingFonts size == 0 ifTrue:[ |
|
2549 |
(Dialog |
|
2550 |
confirm:(resources |
|
2551 |
string:'Your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)' |
|
2552 |
with:fontPref) withCRs) |
|
2553 |
ifFalse:[ |
|
2554 |
switch := false |
|
2555 |
] |
|
2556 |
] ifFalse:[ |
|
2557 |
answer := Dialog |
|
2558 |
confirmWithCancel:(resources |
|
2559 |
string:'menu font is not %1-encoded.\\Change it ?' |
|
2560 |
with:fontPref) withCRs |
|
2561 |
labels:(resources |
|
2562 |
array:#('cancel' 'no' 'yes')) |
|
2563 |
default:3. |
|
2564 |
answer isNil ifTrue:[ |
|
2565 |
switch := false |
|
2566 |
] ifFalse:[ |
|
2567 |
answer ifTrue:[ |
|
2568 |
switch := (requestor fontBoxForEncoding:fontPref) |
|
2569 |
] |
|
2570 |
]. |
|
2571 |
]. |
|
2572 |
]. |
|
2573 |
||
2574 |
switch ifTrue:[ |
|
2575 |
Transcript showCR:'change language to ' , newLanguage , ' ...'. |
|
2576 |
Smalltalk language:language asSymbol. |
|
2577 |
Smalltalk languageTerritory:territory asSymbol. |
|
2578 |
ResourcePack flushCachedResourcePacks |
|
2579 |
]. |
|
2580 |
]. |
|
2581 |
switch ifTrue:[ |
|
2582 |
requestor reopenLauncher. |
|
2583 |
DebugView newDebugger. |
|
2584 |
] |
|
2001 | 2585 |
]. |
2586 |
box |
|
2395 | 2587 |
addHelpButtonFor:'Launcher/languageSetting.html'. |
2001 | 2588 |
box open. |
2589 |
box destroy |
|
2590 |
||
2591 |
"Modified: / 9.9.1996 / 22:43:27 / stefan" |
|
2592 |
"Modified: / 4.8.1998 / 16:54:32 / cg" |
|
2593 |
! |
|
2594 |
||
2595 |
memorySettingsFor:requestor |
|
2596 |
"open a dialog on objectMemory related settings" |
|
2597 |
||
2598 |
|box igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
|
2599 |
compressLimit |
|
2294 | 2600 |
oldIncr component fields codeLimit codeTrigger stackLimit resources |
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2601 |
fastMoreLimit maxOldSpace models info acceptChannel| |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2602 |
|
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2603 |
acceptChannel := false asValue. |
2001 | 2604 |
|
2605 |
resources := requestor class classResources. |
|
2606 |
||
2607 |
"/ |
|
2608 |
"/ extract relevant system settings ... |
|
2609 |
"/ |
|
2610 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
2611 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
2612 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
2613 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
2614 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
2615 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
|
2616 |
codeLimit := ObjectMemory dynamicCodeLimit asValue. |
|
2617 |
codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue. |
|
2618 |
stackLimit := Process defaultMaximumStackSize asValue. |
|
2294 | 2619 |
fastMoreLimit := (ObjectMemory fastMoreOldSpaceLimit:-1) asValue. |
2620 |
maxOldSpace := ObjectMemory maxOldSpace asValue. |
|
2621 |
||
2622 |
models := OrderedCollection new. |
|
2623 |
info := OrderedCollection new. |
|
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2624 |
models add:newSpaceSize. info add:#(number 'size of newSpace where objects are created' 'size of newSpace:' ). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2625 |
models add:fastMoreLimit. info add:#(number 'quickly allocate more memory (suppress GC) up to this limit' 'quick allocate limit:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2626 |
models add:maxOldSpace. info add:#(number 'never allocate more than this amount of memory' 'maximum memory limit:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2627 |
models add:igcLimit. info add:#(number 'start IGC whenever this amount has been allocated' 'incremental GC allocation trigger:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2628 |
models add:igcFreeLimit. info add:#(number 'start IGC whenever freespace drops below this' 'incremental GC freespace trigger:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2629 |
models add:igcFreeAmount. info add:#(number 'try to keep this amount for peak requests' 'incremental GC amount:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2630 |
models add:oldIncr. info add:#(number 'increase oldSpace in chunks of this size' 'oldspace increment:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2631 |
models add:compressLimit. info add:#(number 'suppress compressing GC if more memory is in use' 'oldspace compress limit:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2632 |
models add:stackLimit. info add:#(number 'trigger recursionInterrupt if more stack is used by a process' 'stack limit:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2633 |
models add:codeLimit. info add:#(numberOrNil 'flush dynamic compiled code to stay within this limit' 'dynamic code limit:'). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2634 |
models add:codeTrigger. info add:#(numberOrNil 'start incremental GC whenever this amount of code has been allocated' 'dynamic code GC trigger:'). |
2001 | 2635 |
|
2636 |
"/ |
|
2637 |
"/ create a box on those values ... |
|
2638 |
"/ |
|
2639 |
fields := OrderedCollection new. |
|
2640 |
||
2641 |
box := DialogBox new. |
|
2642 |
box label:(resources string:'Memory manager settings'). |
|
2643 |
||
2644 |
(box addTextLabel:'Warning - invalid settings may result in failures or poor performance |
|
2294 | 2645 |
' , 'You have been warned' asText allBold , '.') adjust:#left. |
2001 | 2646 |
box addHorizontalLine. |
2647 |
||
2294 | 2648 |
models with:info do:[:m :i | |
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2649 |
|lbl descr conv| |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2650 |
|
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2651 |
conv := i at:1. |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2652 |
lbl := i at:3. |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2653 |
descr := i at:2. |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2654 |
|
2294 | 2655 |
component := box |
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2656 |
addLabelledInputField:(resources string:lbl) |
2294 | 2657 |
adjust:#right |
2658 |
on:nil "/ newSpaceSize |
|
2659 |
tabable:true |
|
2660 |
separateAtX:0.7. |
|
2661 |
component acceptOnLeave:false. |
|
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2662 |
"/ component converter:(PrintConverter new perform:conv). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2663 |
component model:((TypeConverter on:m) perform:conv). |
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2664 |
component acceptChannel:acceptChannel. |
2294 | 2665 |
fields add:component. |
2666 |
||
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2667 |
(box addTextLabel:descr) adjust:#left. |
2294 | 2668 |
box addHorizontalLine. |
2669 |
]. |
|
2670 |
||
2671 |
ObjectMemory supportsJustInTimeCompilation ifFalse:[ |
|
2672 |
(fields at:9) disable. |
|
2673 |
(fields at:10) disable. |
|
2001 | 2674 |
]. |
2675 |
||
2048 | 2676 |
box addAbortAndOkButtons. |
2001 | 2677 |
box |
2294 | 2678 |
addHelpButtonFor:'Launcher/memorySettings.html'. |
2001 | 2679 |
|
2680 |
"/ |
|
2681 |
"/ show the box ... |
|
2682 |
"/ |
|
2683 |
box open. |
|
2684 |
||
2685 |
"/ |
|
2686 |
"/ update system settings |
|
2687 |
"/ |
|
2688 |
box accepted ifTrue:[ |
|
2318
32dae4e72c7d
fixed converter setup in objectMemory dialog.
Claus Gittinger <cg@exept.de>
parents:
2316
diff
changeset
|
2689 |
acceptChannel value:true. |
2294 | 2690 |
|
2691 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
|
2692 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
|
2693 |
]. |
|
2694 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
|
2695 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
|
2696 |
]. |
|
2697 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
|
2698 |
ObjectMemory incrementalGCLimit:igcLimit value. |
|
2699 |
]. |
|
2700 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
|
2701 |
ObjectMemory newSpaceSize:newSpaceSize value. |
|
2702 |
]. |
|
2703 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
|
2704 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
|
2705 |
]. |
|
2706 |
stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[ |
|
2707 |
Process defaultMaximumStackSize:stackLimit value. |
|
2708 |
]. |
|
2709 |
fastMoreLimit value ~~ (ObjectMemory fastMoreOldSpaceLimit:-1) ifTrue:[ |
|
2710 |
ObjectMemory fastMoreOldSpaceLimit:fastMoreLimit value. |
|
2711 |
]. |
|
2712 |
maxOldSpace value ~~ ObjectMemory maxOldSpace ifTrue:[ |
|
2713 |
ObjectMemory maxOldSpace:maxOldSpace value. |
|
2714 |
]. |
|
2715 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
|
2716 |
ObjectMemory dynamicCodeLimit:codeLimit value. |
|
2717 |
ObjectMemory dynamicCodeGCTrigger:codeTrigger value. |
|
2001 | 2718 |
]. |
2719 |
box destroy |
|
2720 |
||
2721 |
"Modified: 27.2.1997 / 16:50:12 / cg" |
|
2722 |
! |
|
2723 |
||
2724 |
messageSettingsFor:requestor |
|
2725 |
"open a dialog on infoMessage related settings" |
|
2726 |
||
2727 |
|box vmInfo vmErrors displayErrors classInfos resources| |
|
2728 |
||
2729 |
resources := requestor class classResources. |
|
2730 |
||
2731 |
vmInfo := ObjectMemory infoPrinting asValue. |
|
2732 |
vmErrors := ObjectMemory debugPrinting asValue. |
|
2733 |
classInfos := Object infoPrinting asValue. |
|
2734 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
|
2735 |
||
2736 |
box := DialogBox new. |
|
2737 |
box label:(resources string:'Messages'). |
|
2738 |
||
2739 |
box addCheckBox:(resources string:'VM info messages') on:vmInfo. |
|
2740 |
box addCheckBox:(resources string:'VM error messages') on:vmErrors. |
|
2741 |
box addHorizontalLine. |
|
2742 |
||
2743 |
box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors. |
|
2744 |
box addCheckBox:(resources string:'Other info messages') on:classInfos. |
|
2745 |
||
2746 |
box addHelpButtonFor:'Launcher/messageSettings.html'. |
|
2048 | 2747 |
box addAbortAndOkButtons. |
2001 | 2748 |
box open. |
2749 |
||
2750 |
box accepted ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2751 |
ObjectMemory infoPrinting:vmInfo value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2752 |
ObjectMemory debugPrinting:vmErrors value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2753 |
Object infoPrinting:classInfos value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2754 |
DeviceWorkstation errorPrinting:displayErrors value. |
2001 | 2755 |
]. |
2756 |
box destroy |
|
2757 |
||
2758 |
"Modified: 27.1.1997 / 17:46:01 / cg" |
|
2759 |
! |
|
2760 |
||
2761 |
miscSettingsFor:requestor |
|
2762 |
"open a dialog on misc other settings" |
|
2763 |
||
2196 | 2764 |
|box check shadows takeFocus focusFollowsMouse returnFocus |
2069
b4412338a603
avoid autoloading RDoitServer in misc-settings.
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2765 |
hostNameInLabel showAccelerators |
b4412338a603
avoid autoloading RDoitServer in misc-settings.
Claus Gittinger <cg@exept.de>
parents:
2064
diff
changeset
|
2766 |
preemptive dynamicPrios hostNameInLabelHolder resources y |
2461 | 2767 |
activateOnClick opaqueVariablePanelResize currentUserPrefs |
2768 |
beepEnabled| |
|
2001 | 2769 |
|
2770 |
resources := requestor class classResources. |
|
2395 | 2771 |
currentUserPrefs := UserPreferences current. |
2001 | 2772 |
|
2773 |
"/ |
|
2774 |
"/ extract relevant system settings ... |
|
2775 |
"/ |
|
2776 |
shadows := PopUpView shadows asValue. |
|
2461 | 2777 |
beepEnabled := currentUserPrefs beepEnabled asValue. |
2778 |
||
2001 | 2779 |
hostNameInLabel := StandardSystemView includeHostNameInLabel. |
2780 |
hostNameInLabelHolder := hostNameInLabel asValue. |
|
2781 |
returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue. |
|
2782 |
takeFocus := StandardSystemView takeFocusWhenMapped asValue. |
|
2395 | 2783 |
focusFollowsMouse := (currentUserPrefs focusFollowsMouse ? true) asValue. |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
2784 |
activateOnClick := (Display activateOnClick:nil) asValue. |
2395 | 2785 |
opaqueVariablePanelResize := currentUserPrefs opaqueVariablePanelResizing asValue. |
2001 | 2786 |
|
2787 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
|
2788 |
preemptive := Processor isTimeSlicing asValue. |
|
2789 |
dynamicPrios := Processor supportDynamicPriorities asValue. |
|
2790 |
||
2791 |
"/ |
|
2792 |
"/ create a box on those values ... |
|
2793 |
"/ |
|
2794 |
box := DialogBox new. |
|
2795 |
box label:(resources string:'Other settings'). |
|
2796 |
||
2081
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2797 |
box addCheckBox:(resources string:'Shadows under popup views') on:shadows. |
2461 | 2798 |
box addCheckBox:(resources string:'Beeper enabled') on:beepEnabled. |
2081
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2799 |
box addCheckBox:(resources string:'Boxes return focus to previously active view') on:returnFocus. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2800 |
box addCheckBox:(resources string:'Views catch focus when mapped') on:takeFocus. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2801 |
box addCheckBox:(resources string:'Hostname in window labels') on:hostNameInLabelHolder. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2802 |
box addCheckBox:(resources string:'Show accelerator keys in menus') on:showAccelerators. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2803 |
box addCheckBox:(resources string:'Raise & activate windows on click') on:activateOnClick. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2804 |
box addCheckBox:(resources string:'Focus follows mouse') on:focusFollowsMouse. |
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2805 |
box addCheckBox:(resources string:'Opaque variable panel resizing') on:opaqueVariablePanelResize. |
2001 | 2806 |
|
2807 |
box addHorizontalLine. |
|
2808 |
||
2081
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2809 |
box addCheckBox:(resources string:'Preemptive scheduling') on:preemptive. |
2001 | 2810 |
box leftIndent:20. |
2081
a5a01188c030
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
2070
diff
changeset
|
2811 |
check := box addCheckBox:(resources string:'Dynamic priorities') on:dynamicPrios. |
2001 | 2812 |
check enableChannel:preemptive. |
2813 |
box leftIndent:0. |
|
2814 |
||
2815 |
box |
|
2164 | 2816 |
addHelpButtonFor:'Launcher/miscSettings.html'; |
2817 |
addAbortAndOkButtons. |
|
2001 | 2818 |
|
2819 |
"/ |
|
2820 |
"/ show the box ... |
|
2821 |
"/ |
|
2822 |
box open. |
|
2823 |
||
2824 |
"/ |
|
2825 |
"/ update system settings |
|
2826 |
"/ |
|
2827 |
box accepted ifTrue:[ |
|
2164 | 2828 |
PopUpView shadows:shadows value. |
2829 |
hostNameInLabelHolder value ~~ hostNameInLabel ifTrue:[ |
|
2830 |
StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value. |
|
2831 |
||
2832 |
Screen allScreens do:[:aDisplay | |
|
2833 |
aDisplay allViewsDo:[:aView | |
|
2834 |
|l| |
|
2835 |
||
2836 |
aView isTopView ifTrue:[ |
|
2837 |
l := aView label. |
|
2838 |
l notNil ifTrue:[ |
|
2839 |
aView label:(l , ' '); label:l. "/ force a change |
|
2840 |
] |
|
2841 |
] |
|
2842 |
] |
|
2843 |
] |
|
2844 |
]. |
|
2845 |
||
2395 | 2846 |
currentUserPrefs opaqueVariablePanelResizing:opaqueVariablePanelResize value. |
2461 | 2847 |
currentUserPrefs beepEnabled:beepEnabled value. |
2164 | 2848 |
|
2849 |
StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value. |
|
2850 |
StandardSystemView takeFocusWhenMapped:takeFocus value. |
|
2395 | 2851 |
currentUserPrefs focusFollowsMouse:focusFollowsMouse value. |
2164 | 2852 |
Screen current activateOnClick:(activateOnClick value). |
2853 |
||
2854 |
MenuView showAcceleratorKeys:showAccelerators value. |
|
2855 |
Processor isTimeSlicing ~~ preemptive value ifTrue:[ |
|
2856 |
preemptive value ifTrue:[ |
|
2857 |
Processor startTimeSlicing |
|
2858 |
] ifFalse:[ |
|
2859 |
Processor stopTimeSlicing |
|
2860 |
] |
|
2861 |
]. |
|
2862 |
Processor supportDynamicPriorities ~~ dynamicPrios value ifTrue:[ |
|
2863 |
Processor supportDynamicPriorities:dynamicPrios value |
|
2864 |
]. |
|
2001 | 2865 |
]. |
2866 |
box destroy |
|
2867 |
||
2868 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
2164 | 2869 |
"Modified: / 20.5.1999 / 18:33:55 / cg" |
2461 | 2870 |
"Modified: / 3.12.1999 / 17:11:38 / ps" |
2001 | 2871 |
! |
2872 |
||
2873 |
printerSettingsFor:requestor |
|
2435 | 2874 |
"open a dialog on printer related settings; returns true if accepted" |
2875 |
||
2876 |
|box accepted |
|
2001 | 2877 |
possiblePrinters possibleTypes printerType printCommand |
2878 |
pageFormat landscape updater |
|
2879 |
formatLabel formatComponent landscapeLabel landscapeComponent |
|
2880 |
topMargin leftMargin rightMargin bottomMargin unitList unit |
|
2881 |
topMarginComponent leftMarginComponent |
|
2882 |
rightMarginComponent |
|
2883 |
bottomMarginComponent supportsColor supportsColorComponent |
|
2884 |
y y1 commandListPop component commandList row resources| |
|
2885 |
||
2886 |
resources := requestor class classResources. |
|
2887 |
||
2888 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
2889 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
2890 |
||
2891 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
2892 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
2893 |
printCommand := Printer printCommand asValue. |
|
2894 |
||
2895 |
pageFormat := SelectionInList new list:(Printer defaultPageFormats). |
|
2896 |
pageFormat selection:(Printer pageFormat). |
|
2897 |
landscape := Printer landscape asValue. |
|
2898 |
||
2899 |
topMargin := Printer topMargin asValue. |
|
2900 |
leftMargin := Printer leftMargin asValue. |
|
2901 |
rightMargin := Printer rightMargin asValue. |
|
2902 |
bottomMargin := Printer bottomMargin asValue. |
|
2903 |
supportsColor := Printer supportsColor asValue. |
|
2904 |
||
2905 |
box := DialogBox new. |
|
2906 |
box label:(resources string:'Printer settings'). |
|
2907 |
||
2908 |
"/ either use a popUpList ... |
|
2909 |
"/ box addPopUpList:(resources string:'printer type:') on:printerType. |
|
2910 |
||
2911 |
"/ or a comboList; |
|
2912 |
"/ which one looks better ? |
|
2913 |
y := box yPosition. |
|
2914 |
component := box addTextLabel:(resources string:'printer type:'). |
|
2915 |
component width:0.25; adjust:#right; borderWidth:0. |
|
2916 |
box yPosition:y. |
|
2917 |
component := box addComboListOn:printerType tabable:true. |
|
2918 |
component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true. |
|
2919 |
component width:0.75; left:0.25. |
|
2920 |
"/ end of question |
|
2921 |
||
2922 |
y := box yPosition. |
|
2923 |
component := box addTextLabel:(resources string:'print command:'). |
|
2924 |
component width:0.25; adjust:#right; borderWidth:0. |
|
2925 |
box yPosition:y. |
|
2926 |
commandListPop := box addComboBoxOn:printCommand tabable:true. |
|
2927 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
2928 |
commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
2929 |
"/ some common print commands ... |
|
2930 |
||
2931 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
|
2932 |
commandList isNil ifTrue:[ |
|
2435 | 2933 |
commandList := PrinterStream defaultCommands. |
2934 |
commandList isNil ifTrue:[ |
|
2935 |
commandList := #('lpr' |
|
2936 |
'lp' |
|
2937 |
). |
|
2938 |
] |
|
2001 | 2939 |
]. |
2940 |
||
2941 |
commandListPop list:commandList. |
|
2942 |
||
2943 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2944 |
||
2945 |
row := OrderedCollection new. |
|
2946 |
row add:(formatLabel := Label label:(resources string:'page format:')). |
|
2947 |
formatLabel borderWidth:0. |
|
2948 |
row add:(formatComponent := PopUpList on:pageFormat). |
|
2949 |
formatComponent label:'unknown'. |
|
2950 |
||
2951 |
row add:(landscapeLabel := Label label:(resources string:'landscape:')). |
|
2952 |
landscapeLabel borderWidth:0. |
|
2953 |
row add:(landscapeComponent := CheckToggle on:landscape). |
|
2954 |
||
2955 |
y := box yPosition. |
|
2956 |
box |
|
2435 | 2957 |
addRow:(1 to:2) |
2958 |
fromX:0 |
|
2959 |
toX:0.5 |
|
2960 |
collect:[:idx | row at:idx] |
|
2961 |
tabable:false |
|
2962 |
horizontalLayout:#leftSpace |
|
2963 |
verticalLayout:#center. |
|
2001 | 2964 |
y1 := box yPosition. |
2965 |
box yPosition:y. |
|
2966 |
||
2967 |
box |
|
2435 | 2968 |
addRow:(3 to:4) |
2969 |
fromX:0.5 |
|
2970 |
toX:1.0 |
|
2971 |
collect:[:idx | row at:idx] |
|
2972 |
tabable:false |
|
2973 |
horizontalLayout:#leftSpace |
|
2974 |
verticalLayout:#center. |
|
2001 | 2975 |
|
2976 |
box yPosition:(box yPosition max:y1). |
|
2977 |
||
2978 |
box makeTabable:(formatComponent). |
|
2979 |
box makeTabable:(landscapeComponent). |
|
2980 |
||
2981 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
2982 |
||
2983 |
y := box yPosition. |
|
2984 |
||
2985 |
topMarginComponent := box |
|
2435 | 2986 |
addLabelledInputField:(resources string:'top margin:') |
2987 |
adjust:#right |
|
2988 |
on:nil "/ topMargin |
|
2989 |
tabable:true |
|
2990 |
from:0.0 to:0.5 |
|
2991 |
separateAtX:0.6. |
|
2001 | 2992 |
topMarginComponent converter:(PrintConverter new initForNumber). |
2993 |
topMarginComponent model:topMargin. |
|
2994 |
y1 := box yPosition. |
|
2995 |
||
2996 |
box yPosition:y. |
|
2997 |
unitList := SelectionInList with:#('inch' 'mm'). |
|
2998 |
unitList selectionIndex:1. |
|
2999 |
||
3000 |
component := box addComponent:(PopUpList on:unitList). |
|
3001 |
component |
|
2435 | 3002 |
left:0.6; |
3003 |
width:0.3. |
|
2001 | 3004 |
|
3005 |
box yPosition:y1. |
|
3006 |
||
3007 |
leftMarginComponent := box |
|
2435 | 3008 |
addLabelledInputField:(resources string:'left margin:') |
3009 |
adjust:#right |
|
3010 |
on:nil "/ leftMargin |
|
3011 |
tabable:true |
|
3012 |
from:0.0 to:0.5 |
|
3013 |
separateAtX:0.6. |
|
2001 | 3014 |
leftMarginComponent converter:(PrintConverter new initForNumber). |
3015 |
leftMarginComponent model:leftMargin. |
|
3016 |
||
3017 |
rightMarginComponent := box |
|
2435 | 3018 |
addLabelledInputField:(resources string:'right margin:') |
3019 |
adjust:#right |
|
3020 |
on:nil "/ rightMargin |
|
3021 |
tabable:true |
|
3022 |
from:0.0 to:0.5 |
|
3023 |
separateAtX:0.6. |
|
2001 | 3024 |
rightMarginComponent converter:(PrintConverter new initForNumber). |
3025 |
rightMarginComponent model:rightMargin. |
|
3026 |
||
3027 |
bottomMarginComponent := box |
|
2435 | 3028 |
addLabelledInputField:(resources string:'bottom margin:') |
3029 |
adjust:#right |
|
3030 |
on:nil "/ bottomMargin |
|
3031 |
tabable:true |
|
3032 |
from:0.0 to:0.5 |
|
3033 |
separateAtX:0.6. |
|
2001 | 3034 |
bottomMarginComponent converter:(PrintConverter new initForNumber). |
3035 |
bottomMarginComponent model:bottomMargin. |
|
3036 |
||
3037 |
box addHorizontalLine. |
|
3038 |
supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor. |
|
3039 |
box addVerticalSpace. |
|
3040 |
||
3041 |
updater := [ |p fg hasPageSize hasMargins| |
|
3042 |
||
2435 | 3043 |
printerType selectionIndex ~~ 0 ifTrue:[ |
3044 |
p := possiblePrinters at:(printerType selectionIndex). |
|
3045 |
hasPageSize := p supportsPageSizes. |
|
3046 |
hasMargins := p supportsMargins. |
|
3047 |
] ifFalse:[ |
|
3048 |
hasPageSize := false. |
|
3049 |
hasMargins := false. |
|
3050 |
]. |
|
3051 |
hasPageSize ifTrue:[ |
|
3052 |
fg := Button new foregroundColor. |
|
3053 |
formatComponent enable. |
|
3054 |
landscapeComponent enable. |
|
3055 |
||
3056 |
formatComponent label:p pageFormat. |
|
3057 |
pageFormat value:(p pageFormat). |
|
3058 |
landscape value:(p landscape). |
|
3059 |
] ifFalse:[ |
|
3060 |
fg := Button new disabledForegroundColor. |
|
3061 |
formatComponent disable. |
|
3062 |
landscapeComponent disable. |
|
3063 |
||
3064 |
formatComponent label:'unknown'. |
|
3065 |
landscape value:nil. |
|
3066 |
]. |
|
3067 |
hasMargins ifTrue:[ |
|
3068 |
unitList selectionIndex == 2 ifTrue:[ |
|
3069 |
unit := #mm |
|
3070 |
] ifFalse:[ |
|
3071 |
unit := #inch |
|
3072 |
]. |
|
3073 |
||
3074 |
topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit). |
|
3075 |
leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit). |
|
3076 |
rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit). |
|
3077 |
bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit). |
|
3078 |
||
3079 |
topMarginComponent enable. |
|
3080 |
leftMarginComponent enable. |
|
3081 |
rightMarginComponent enable. |
|
3082 |
bottomMarginComponent enable. |
|
3083 |
] ifFalse:[ |
|
3084 |
topMarginComponent disable. |
|
3085 |
leftMarginComponent disable. |
|
3086 |
rightMarginComponent disable. |
|
3087 |
bottomMarginComponent disable. |
|
3088 |
]. |
|
3089 |
formatLabel foregroundColor:fg. |
|
3090 |
landscapeLabel foregroundColor:fg. |
|
3091 |
||
3092 |
p notNil ifTrue:[ |
|
3093 |
commandList := p defaultCommands. |
|
3094 |
commandList notNil ifTrue:[ |
|
3095 |
commandListPop list:commandList |
|
3096 |
]. |
|
3097 |
||
3098 |
printCommand value:(p printCommand). |
|
3099 |
]. |
|
3100 |
p supportsPostscript ifFalse:[ |
|
3101 |
supportsColorComponent disable. |
|
3102 |
supportsColor value:false |
|
3103 |
] ifTrue:[ |
|
3104 |
supportsColorComponent enable. |
|
3105 |
supportsColor value:(Printer supportsColor). |
|
3106 |
] |
|
3107 |
]. |
|
2001 | 3108 |
unitList onChangeSend:#value to:updater. |
3109 |
printerType onChangeSend:#value to:updater. |
|
3110 |
updater value. |
|
3111 |
||
3112 |
box addVerticalSpace; |
|
2435 | 3113 |
addHelpButtonFor:'Launcher/printerSettings.html'; |
3114 |
addAbortAndOkButtons. |
|
2001 | 3115 |
box open. |
3116 |
||
2435 | 3117 |
(accepted := box accepted) ifTrue:[ |
3118 |
Printer := possiblePrinters at:(printerType selectionIndex). |
|
3119 |
Printer printCommand:printCommand value. |
|
3120 |
||
3121 |
Printer supportsPageSizes ifTrue:[ |
|
3122 |
Printer pageFormat:(pageFormat selection). |
|
3123 |
Printer landscape:(landscape value). |
|
3124 |
]. |
|
3125 |
Printer supportsMargins ifTrue:[ |
|
3126 |
unitList selectionIndex == 2 ifTrue:[ |
|
3127 |
unit := #mm |
|
3128 |
] ifFalse:[ |
|
3129 |
unit := #inch |
|
3130 |
]. |
|
3131 |
Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch). |
|
3132 |
Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch). |
|
3133 |
Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch). |
|
3134 |
Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch). |
|
3135 |
]. |
|
3136 |
Printer supportsPostscript ifTrue:[ |
|
3137 |
Printer supportsColor:supportsColor value. |
|
3138 |
]. |
|
2001 | 3139 |
]. |
2435 | 3140 |
box destroy. |
3141 |
^ accepted |
|
2001 | 3142 |
|
3143 |
"Modified: 9.9.1996 / 22:43:51 / stefan" |
|
3144 |
"Modified: 28.2.1997 / 14:00:13 / cg" |
|
3145 |
||
3146 |
! |
|
3147 |
||
3148 |
restoreSettingsFor:requestor |
|
3149 |
"restore settings from a settings-file." |
|
3150 |
||
3151 |
"a temporary kludge - we need a central systemSettings object for this, |
|
3152 |
which can be saved/restored with a single store/read. |
|
3153 |
Will move entries over to UserPreferences over time; |
|
3154 |
new items should always go there." |
|
3155 |
||
3156 |
|fileName resources| |
|
3157 |
||
3158 |
resources := requestor class classResources. |
|
3159 |
||
3160 |
fileName := Dialog |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3161 |
requestFileName:(resources string:'restore settings from:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3162 |
default:'settings.stx' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3163 |
ok:(resources string:'restore') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3164 |
abort:(resources string:'cancel') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3165 |
pattern:'*.stx' |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3166 |
fromDirectory:nil. |
2021 | 3167 |
|
3168 |
(fileName size == 0) ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3169 |
"/ canceled |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3170 |
^ self |
2001 | 3171 |
]. |
3172 |
||
3173 |
self withWaitCursorDo:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3174 |
Smalltalk fileIn:fileName. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3175 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3176 |
self reopenLauncher. |
2001 | 3177 |
]. |
3178 |
||
3179 |
"Modified: / 21.7.1998 / 11:37:54 / cg" |
|
3180 |
! |
|
3181 |
||
3182 |
saveSettingsFor:requestor |
|
3183 |
"save settings to a settings-file." |
|
3184 |
||
3185 |
"a temporary kludge - we need a central systemSettings object for this, |
|
3186 |
which can be saved/restored with a single store/read. |
|
3187 |
Will move entries over to UserPreferences over time; |
|
3188 |
new items should always go there." |
|
3189 |
||
2435 | 3190 |
|fileName resources| |
2001 | 3191 |
|
3192 |
resources := requestor class classResources. |
|
3193 |
||
3194 |
fileName := Dialog |
|
2201 | 3195 |
requestFileName:(resources string:'save settings in:') |
3196 |
default:'settings.stx' |
|
3197 |
ok:(resources string:'save') |
|
3198 |
abort:(resources string:'cancel') |
|
3199 |
pattern:'*.stx' |
|
3200 |
fromDirectory:nil. |
|
2001 | 3201 |
|
2435 | 3202 |
self saveSettingsFor:requestor in:fileName. |
3203 |
! |
|
3204 |
||
3205 |
saveSettingsFor:requestor in:fileName |
|
3206 |
"save settings to a settings-file." |
|
3207 |
||
3208 |
"a temporary kludge - we need a central systemSettings object for this, |
|
3209 |
which can be saved/restored with a single store/read. |
|
3210 |
Will move entries over to UserPreferences over time; |
|
3211 |
new items should always go there." |
|
3212 |
||
3213 |
|s screen currentUserPrefs| |
|
3214 |
||
2021 | 3215 |
(fileName size == 0) ifTrue:[ |
2201 | 3216 |
"/ canceled |
3217 |
^ self |
|
2001 | 3218 |
]. |
3219 |
||
3220 |
s := fileName asFilename writeStream. |
|
3221 |
s isNil ifTrue:[ |
|
2201 | 3222 |
self warn:'cannot write the ''' , fileName , ''' file'. |
3223 |
^ self |
|
2001 | 3224 |
]. |
3225 |
||
2435 | 3226 |
currentUserPrefs := UserPreferences current. |
2457 | 3227 |
screen := Screen current. |
2435 | 3228 |
|
2001 | 3229 |
s nextPutLine:'"/ ST/X saved settings'; |
3230 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
3231 |
nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
|
3232 |
nextPutLine:'"/'; |
|
3233 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
3234 |
nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
3235 |
nextPutLine:'"/'. |
|
3236 |
s cr. |
|
3237 |
||
3238 |
s nextPutLine:'"/'. |
|
3239 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
3240 |
s nextPutLine:'"/'. |
|
3241 |
s cr. |
|
3242 |
||
3243 |
s nextPutLine:'"/'. |
|
3244 |
s nextPutLine:'"/ Display settings:'. |
|
3245 |
s nextPutLine:'"/'. |
|
3246 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3247 |
s nextPutLine:'Display notNil ifTrue:['. |
2457 | 3248 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
2001 | 3249 |
screen fixColors notNil ifTrue:[ |
2201 | 3250 |
s nextPutLine:' Image flushDeviceImages.'. |
3251 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
3252 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
3253 |
s nextPutLine:' ].'. |
|
2001 | 3254 |
] ifFalse:[ |
2201 | 3255 |
s nextPutLine:' Display releaseFixColors.'. |
2001 | 3256 |
]. |
3257 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
3258 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
3259 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
3260 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
3261 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
3262 |
s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
|
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3263 |
s nextPutLine:' ].'. |
2001 | 3264 |
s nextPutLine:'].'. |
3265 |
s cr. |
|
3266 |
||
3267 |
s nextPutLine:'"/'. |
|
3268 |
s nextPutLine:'"/ Compiler settings:'. |
|
3269 |
s nextPutLine:'"/'. |
|
3270 |
s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
3271 |
nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
3272 |
nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
3273 |
nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
3274 |
nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.'; |
|
3275 |
nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
|
3276 |
nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
3277 |
nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
3278 |
||
3279 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
3280 |
||
3281 |
nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
3282 |
nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
3283 |
nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
3284 |
nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
3285 |
nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
3286 |
nextPutLine:'ObjectFileLoader linkArgs: ' , (ObjectFileLoader linkArgs storeString) , '.'; |
|
3287 |
nextPutLine:'ObjectFileLoader linkCommand: ' , (ObjectFileLoader linkCommand storeString) , '.'; |
|
3288 |
||
3289 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
3290 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
3291 |
||
3292 |
HistoryManager notNil ifTrue:[ |
|
2201 | 3293 |
HistoryManager isActive ifTrue:[ |
3294 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
3295 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
3296 |
] ifFalse:[ |
|
3297 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
3298 |
]. |
|
2001 | 3299 |
]. |
3300 |
||
3301 |
ObjectFileLoader notNil ifTrue:[ |
|
2201 | 3302 |
s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
3303 |
s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
2001 | 3304 |
]. |
3305 |
||
3306 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
3307 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
3308 |
||
3309 |
s cr. |
|
3310 |
s nextPutLine:'"/'. |
|
3311 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
3312 |
s nextPutLine:'"/'. |
|
3313 |
s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
3314 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
3315 |
nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
3316 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
3317 |
||
3318 |
||
3319 |
s cr. |
|
3320 |
s nextPutLine:'"/'. |
|
3321 |
s nextPutLine:'"/ Edit settings:'. |
|
3322 |
s nextPutLine:'"/'. |
|
3323 |
s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'. |
|
3324 |
s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'. |
|
2395 | 3325 |
s nextPutLine:'UserPreferences current syntaxColoring: ' , (currentUserPrefs syntaxColoring storeString) , '.'. |
3326 |
currentUserPrefs keysAndValuesDo:[:k :v | |
|
2203 | 3327 |
s nextPutLine:'UserPreferences current at:' , k storeString , ' put:' , v storeString , '.'. |
2201 | 3328 |
]. |
2001 | 3329 |
|
3330 |
s cr. |
|
3331 |
s nextPutLine:'"/'. |
|
3332 |
s nextPutLine:'"/ Tool settings:'. |
|
3333 |
s nextPutLine:'"/'. |
|
2395 | 3334 |
s nextPutLine:'UserPreferences current useNewInspector: ' , (currentUserPrefs useNewInspector storeString) , '.'. |
3335 |
s nextPutLine:'UserPreferences current useNewChangesBrowser: ' , (currentUserPrefs useNewChangesBrowser storeString) , '.'. |
|
2001 | 3336 |
|
3337 |
s cr. |
|
3338 |
s nextPutLine:'"/'. |
|
3339 |
s nextPutLine:'"/ Misc settings:'. |
|
3340 |
s nextPutLine:'"/'. |
|
3341 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
3342 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
3343 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
3344 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
3345 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
3346 |
||
3347 |
"/ claus - I dont think its a good idea to save those ... |
|
3348 |
nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
3349 |
nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
3350 |
||
3351 |
nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
|
3352 |
nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
2395 | 3353 |
nextPutLine:'UserPreferences current focusFollowsMouse: ' , (currentUserPrefs focusFollowsMouse ? true) storeString , '.'; |
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3354 |
nextPutLine:'Display notNil ifTrue:['; |
2457 | 3355 |
nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.'; |
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3356 |
nextPutLine:'].'; |
2001 | 3357 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
3358 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
2017 | 3359 |
(Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[ |
2201 | 3360 |
s nextPutLine:'Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'. |
2001 | 3361 |
]. |
3362 |
Processor isTimeSlicing ifTrue:[ |
|
2201 | 3363 |
s nextPutLine:'Processor startTimeSlicing.'. |
3364 |
s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.'). |
|
2001 | 3365 |
] ifFalse:[ |
2201 | 3366 |
s nextPutLine:'Processor stopTimeSlicing.'. |
2001 | 3367 |
]. |
3368 |
||
3369 |
s cr. |
|
3370 |
s nextPutLine:'"/'. |
|
3371 |
s nextPutLine:'"/ Printer settings:'. |
|
3372 |
s nextPutLine:'"/'. |
|
3373 |
s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
3374 |
nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
3375 |
||
3376 |
Printer supportsPageSizes ifTrue:[ |
|
2201 | 3377 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
3378 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
2001 | 3379 |
]. |
3380 |
Printer supportsMargins ifTrue:[ |
|
2201 | 3381 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
3382 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
3383 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
3384 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
2001 | 3385 |
]. |
3386 |
Printer supportsPostscript ifTrue:[ |
|
2201 | 3387 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
2001 | 3388 |
]. |
3389 |
||
3390 |
s cr. |
|
3391 |
s nextPutLine:'"/'. |
|
3392 |
s nextPutLine:'"/ Font settings:'. |
|
3393 |
s nextPutLine:'"/'. |
|
2269
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3394 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3395 |
s nextPutLine:'Display notNil ifTrue:['. |
2457 | 3396 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
2269
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3397 |
s nextPutLine:' View defaultFont: ' , (View defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3398 |
s nextPutLine:' Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3399 |
s nextPutLine:' Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3400 |
s nextPutLine:' Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3401 |
s nextPutLine:' SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3402 |
s nextPutLine:' MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3403 |
s nextPutLine:' PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3404 |
s nextPutLine:' TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3405 |
s nextPutLine:' EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3406 |
s nextPutLine:' CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
2456
8434c67045db
settings code must check for nil Display
Claus Gittinger <cg@exept.de>
parents:
2435
diff
changeset
|
3407 |
s nextPutLine:' ].'. |
2269
822bf9616e8d
only restore font settings if on the same display
Claus Gittinger <cg@exept.de>
parents:
2259
diff
changeset
|
3408 |
s nextPutLine:'].'. |
2001 | 3409 |
|
3410 |
s cr. |
|
3411 |
s nextPutLine:'"/'. |
|
3412 |
s nextPutLine:'"/ Language setting:'. |
|
3413 |
s nextPutLine:'"/'. |
|
3414 |
s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
3415 |
s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
3416 |
s close. |
|
3417 |
||
3418 |
" |
|
3419 |
Transcript topView application saveSettings |
|
3420 |
" |
|
3421 |
||
3422 |
"Modified: / 6.1.1999 / 14:24:16 / cg" |
|
3423 |
! |
|
3424 |
||
3425 |
sourceAndDebuggerSettingsFor:requestor |
|
3426 |
"open a dialog on source&debugger other settings" |
|
3427 |
||
3428 |
|box check butt setupButt logDoits updChanges changeFileName |
|
3429 |
useManager hasManager cvsIsSetup |
|
3430 |
repository repositoryHolder localSourceFirst |
|
3431 |
sourceCacheDir cacheEntry |
|
3432 |
component localCheck oldIndent nm fn manager |
|
3433 |
showErrorNotifier showVerboseStack |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3434 |
syntaxColoring fullSelectorCheck |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3435 |
resources pos currentUserPrefs| |
2001 | 3436 |
|
3437 |
currentUserPrefs := UserPreferences current. |
|
3438 |
||
3439 |
resources := requestor class classResources. |
|
3440 |
||
3441 |
"/ |
|
3442 |
"/ extract relevant system settings ... |
|
3443 |
"/ |
|
3444 |
logDoits := Smalltalk logDoits asValue. |
|
3445 |
updChanges := Class updatingChanges asValue. |
|
3446 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
3447 |
||
3448 |
(AbstractSourceCodeManager notNil |
|
3449 |
and:[AbstractSourceCodeManager isLoaded not]) ifTrue:[ |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3450 |
AbstractSourceCodeManager autoload. |
2001 | 3451 |
]. |
3452 |
||
3453 |
hasManager := AbstractSourceCodeManager notNil |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3454 |
and:[AbstractSourceCodeManager isLoaded]. |
2001 | 3455 |
|
3456 |
repositoryHolder := '' asValue. |
|
3457 |
hasManager ifTrue:[ |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3458 |
useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3459 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3460 |
manager notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3461 |
repository := manager repositoryName. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3462 |
repository notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3463 |
repositoryHolder := repository asValue. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3464 |
] ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3465 |
repositoryHolder := '' asValue. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3466 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3467 |
cvsIsSetup := true. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3468 |
] ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3469 |
cvsIsSetup := false asValue. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3470 |
] |
2001 | 3471 |
] ifFalse:[ |
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3472 |
useManager := false. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3473 |
localSourceFirst := false. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3474 |
cvsIsSetup := false. |
2001 | 3475 |
]. |
2037
7f824ca6e61b
removed ref to (old) Launcher class
Claus Gittinger <cg@exept.de>
parents:
2034
diff
changeset
|
3476 |
showErrorNotifier := (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) asValue. |
2001 | 3477 |
showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue. |
3478 |
syntaxColoring := currentUserPrefs syntaxColoring asValue. |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3479 |
fullSelectorCheck := currentUserPrefs fullSelectorCheck asValue. |
2001 | 3480 |
|
3481 |
sourceCacheDir := nil asValue. |
|
3482 |
||
3483 |
"/ |
|
3484 |
"/ create a box on those values ... |
|
3485 |
"/ |
|
3486 |
box := DialogBox new. |
|
3487 |
box label:(resources string:'Source & Debugger settings'). |
|
3488 |
||
3489 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
|
3490 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
|
3491 |
||
3492 |
component := box |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3493 |
addLabelledInputField:(resources string:'change file name:') |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3494 |
adjust:#right |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3495 |
on:changeFileName |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3496 |
tabable:true |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3497 |
separateAtX:0.4. |
2001 | 3498 |
component immediateAccept:true; acceptOnLeave:false. |
3499 |
||
3500 |
"/ y := box yPosition. |
|
3501 |
"/ component := box addTextLabel:(resources string:'change file name:'). |
|
3502 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
|
3503 |
"/ box yPosition:y. |
|
3504 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
|
3505 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
|
3506 |
||
3507 |
box addHorizontalLine. |
|
3508 |
||
3509 |
hasManager ifTrue:[ |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3510 |
pos := box yPosition. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3511 |
check := box addCheckBox:(resources string:'sourcecode management') on:useManager. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3512 |
check enableChannel:cvsIsSetup. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3513 |
box makeTabable:check. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3514 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3515 |
cvsIsSetup value ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3516 |
AbstractSourceCodeManager notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3517 |
check width:0.6. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3518 |
box yPosition:pos. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3519 |
setupButt := box addComponent:(Button label:(resources string:'setup...') |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3520 |
action:[|manager| |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3521 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3522 |
self cvsConfigurationDialogFor:requestor. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3523 |
manager := (Smalltalk at:#SourceCodeManager). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3524 |
cvsIsSetup value:manager notNil. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3525 |
manager notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3526 |
repositoryHolder value: manager repositoryName. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3527 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3528 |
setupButt beInvisible. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3529 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3530 |
]). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3531 |
box makeTabable:setupButt. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3532 |
setupButt left:0.6; width:0.4. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3533 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3534 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3535 |
oldIndent := box leftIndent. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3536 |
box leftIndent:30. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3537 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3538 |
component := box |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3539 |
addLabelledInputField:(resources string:'repository:') |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3540 |
adjust:#right |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3541 |
on:repositoryHolder |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3542 |
tabable:true |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3543 |
separateAtX:0.4. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3544 |
component immediateAccept:true; acceptOnLeave:false. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3545 |
component enableChannel:useManager. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3546 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3547 |
cacheEntry := box |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3548 |
addLabelledInputField:(resources string:'source cache dir:') |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3549 |
adjust:#right |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3550 |
on:sourceCacheDir |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3551 |
tabable:true |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3552 |
separateAtX:0.4. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3553 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3554 |
cacheEntry enableChannel:useManager. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3555 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3556 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3557 |
localCheck enableChannel:useManager. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3558 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3559 |
box leftIndent:oldIndent. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3560 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3561 |
(AbstractSourceCodeManager isNil |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3562 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3563 |
useManager value:false. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3564 |
"/ cacheEntry disable. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3565 |
"/ localCheck enable. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3566 |
] ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3567 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3568 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3569 |
box addHorizontalLine. |
2001 | 3570 |
]. |
3571 |
||
3572 |
pos := box yPosition. |
|
3573 |
check := box addCheckBox:(resources string:'syntax coloring') on:syntaxColoring. |
|
3574 |
check width:0.6. |
|
3575 |
box yPosition:pos. |
|
3576 |
butt := box addComponent:(Button label:(resources string:'configure...') action:[self syntaxColorConfigurationDialogFor:requestor]). |
|
3577 |
box makeTabable:butt. |
|
3578 |
butt enableChannel:syntaxColoring. |
|
3579 |
butt left:0.6; width:0.4. |
|
3580 |
||
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3581 |
check := box addCheckBox:(resources string:'immediate Selector check') on:fullSelectorCheck. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3582 |
check enableChannel:syntaxColoring. |
2001 | 3583 |
box addHorizontalLine. |
3584 |
||
3585 |
||
3586 |
box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier. |
|
3587 |
box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack. |
|
3588 |
||
3589 |
box |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3590 |
addHelpButtonFor:'Launcher/sourceSettings.html'; |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3591 |
addAbortAndOkButtons. |
2001 | 3592 |
|
3593 |
"/ |
|
3594 |
"/ show the box ... |
|
3595 |
"/ |
|
3596 |
box open. |
|
3597 |
||
3598 |
"/ |
|
3599 |
"/ update system settings |
|
3600 |
"/ |
|
3601 |
box accepted ifTrue:[ |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3602 |
Smalltalk logDoits:logDoits value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3603 |
Class updateChanges:updChanges value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3604 |
ObjectMemory nameForChanges:changeFileName value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3605 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3606 |
(hasManager and:[useManager value]) ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3607 |
manager isNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3608 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3609 |
manager := Smalltalk at:#SourceCodeManager. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3610 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3611 |
Class tryLocalSourceFirst:(localSourceFirst value). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3612 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3613 |
manager notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3614 |
localSourceFirst value ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3615 |
nm := sourceCacheDir value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3616 |
nm size > 0 ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3617 |
(fn := nm asFilename) exists ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3618 |
(self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3619 |
fn makeDirectory; |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3620 |
makeReadableForAll; |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3621 |
makeWritableForAll; |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3622 |
makeExecutableForAll. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3623 |
] |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3624 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3625 |
(fn exists |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3626 |
and:[fn isDirectory |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3627 |
and:[fn isReadable |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3628 |
and:[fn isWritable]]]) ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3629 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3630 |
] |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3631 |
] |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3632 |
] |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3633 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3634 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3635 |
repositoryHolder notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3636 |
repositoryHolder value size > 0 ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3637 |
manager notNil ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3638 |
manager initializeForRepository:repositoryHolder value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3639 |
] |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3640 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3641 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3642 |
] ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3643 |
Smalltalk at:#SourceCodeManager put:nil |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3644 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3645 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3646 |
showErrorNotifier value ifFalse:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3647 |
Exception emergencyHandler:nil |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3648 |
] ifTrue:[ |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3649 |
Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler) |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3650 |
]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3651 |
DebugView defaultVerboseBacktrace:(showVerboseStack value). |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3652 |
currentUserPrefs syntaxColoring:syntaxColoring value. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
3653 |
currentUserPrefs at:#fullSelectorCheck put:fullSelectorCheck value. |
2001 | 3654 |
]. |
3655 |
box destroy |
|
3656 |
||
3657 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
3658 |
"Created: / 17.1.1997 / 17:39:33 / cg" |
|
3659 |
"Modified: / 16.4.1998 / 17:18:47 / ca" |
|
3660 |
"Modified: / 13.10.1998 / 15:47:31 / cg" |
|
3661 |
! |
|
3662 |
||
3663 |
stcCompilerSettingsFor:requestor |
|
3664 |
"open an extra dialog on stc-compiler related settings" |
|
3665 |
||
3666 |
|box |
|
2018 | 3667 |
stcIncludes stcDefines stcOptions |
2001 | 3668 |
stcLibraries stcLibraryPath cc stc ccOptions |
3669 |
linkCommand linkArgs |
|
2019 | 3670 |
component t |
3671 |
canLoadBinaries thisIsADemoVersion |
|
2001 | 3672 |
resources| |
3673 |
||
3674 |
resources := requestor class classResources. |
|
3675 |
||
3676 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
3677 |
||
3678 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
|
3679 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
3680 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
3681 |
ccOptions := Compiler ccCompilationOptions asValue. |
|
3682 |
||
3683 |
cc := Compiler ccPath asValue. |
|
3684 |
stc := Compiler stcPath asValue. |
|
3685 |
linkCommand := ObjectFileLoader linkCommand asValue. |
|
3686 |
linkArgs := ObjectFileLoader linkArgs asValue. |
|
3687 |
||
3688 |
ObjectFileLoader notNil ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3689 |
(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3690 |
stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3691 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3692 |
(t := ObjectFileLoader libPath) notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3693 |
stcLibraryPath := t asValue. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3694 |
] |
2001 | 3695 |
]. |
3696 |
||
3697 |
box := DialogBox new. |
|
3698 |
box label:(resources string:'STC Compilation settings'). |
|
3699 |
||
3700 |
thisIsADemoVersion := (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn'). |
|
3701 |
ObjectFileLoader notNil ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3702 |
thisIsADemoVersion ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3703 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3704 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3705 |
addLabelledInputField:(resources string:'stc command:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3706 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3707 |
on:stc |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3708 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3709 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3710 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3711 |
component preferredExtent:(100 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3712 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3713 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3714 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3715 |
addLabelledInputField:(resources string:'stc options:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3716 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3717 |
on:stcOptions |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3718 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3719 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3720 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3721 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3722 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3723 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3724 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3725 |
addLabelledInputField:(resources string:'cc command:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3726 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3727 |
on:cc |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3728 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3729 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3730 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3731 |
component preferredExtent:(150 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3732 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3733 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3734 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3735 |
addLabelledInputField:(resources string:'cc options:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3736 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3737 |
on:ccOptions |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3738 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3739 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3740 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3741 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3742 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3743 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3744 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3745 |
addLabelledInputField:(resources string:'include directories:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3746 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3747 |
on:stcIncludes |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3748 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3749 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3750 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3751 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3752 |
canLoadBinaries ifFalse:[component disable]. |
2001 | 3753 |
|
3754 |
"/ box addVerticalSpace. |
|
3755 |
||
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3756 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3757 |
addLabelledInputField:(resources string:'defines:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3758 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3759 |
on:stcDefines |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3760 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3761 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3762 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3763 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3764 |
canLoadBinaries ifFalse:[component disable]. |
2001 | 3765 |
|
3766 |
"/ box addVerticalSpace. |
|
3767 |
||
3768 |
"/ box addVerticalSpace. |
|
3769 |
||
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3770 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3771 |
addLabelledInputField:(resources string:'link command:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3772 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3773 |
on:linkCommand |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3774 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3775 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3776 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3777 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3778 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3779 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3780 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3781 |
addLabelledInputField:(resources string:'link args:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3782 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3783 |
on:linkArgs |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3784 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3785 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3786 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3787 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3788 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3789 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3790 |
stcLibraries notNil ifTrue:[ |
2001 | 3791 |
"/ box addVerticalSpace. |
3792 |
||
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3793 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3794 |
addLabelledInputField:(resources string:'C-libraries:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3795 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3796 |
on:stcLibraries |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3797 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3798 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3799 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3800 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3801 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3802 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3803 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3804 |
stcLibraryPath notNil ifTrue:[ |
2001 | 3805 |
"/ box addVerticalSpace. |
3806 |
||
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3807 |
component := box |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3808 |
addLabelledInputField:(resources string:'stc libPath:') |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3809 |
adjust:#right |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3810 |
on:stcLibraryPath |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3811 |
tabable:true |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3812 |
separateAtX:0.3. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3813 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3814 |
component preferredExtent:(250 @ component preferredExtent y). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3815 |
canLoadBinaries ifFalse:[component disable]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3816 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3817 |
]. |
2001 | 3818 |
]. |
3819 |
||
3820 |
box |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3821 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3822 |
addAbortAndOkButtons. |
2001 | 3823 |
|
3824 |
box open. |
|
3825 |
||
3826 |
box accepted ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3827 |
thisIsADemoVersion ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3828 |
Compiler stcCompilationIncludes:stcIncludes value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3829 |
Compiler stcCompilationDefines:stcDefines value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3830 |
Compiler stcCompilationOptions:stcOptions value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3831 |
Compiler ccCompilationOptions:ccOptions value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3832 |
Compiler ccPath:cc value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3833 |
stc value ~= Compiler stcPath ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3834 |
Compiler stcPath:stc value |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3835 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3836 |
ObjectFileLoader linkCommand:linkCommand value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3837 |
ObjectFileLoader linkArgs:linkArgs value. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3838 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3839 |
|
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3840 |
ObjectFileLoader notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3841 |
stcLibraries notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3842 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3843 |
]. |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3844 |
stcLibraryPath notNil ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3845 |
ObjectFileLoader libPath:(stcLibraryPath value). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3846 |
] |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
3847 |
]. |
2001 | 3848 |
]. |
3849 |
box destroy |
|
3850 |
||
3851 |
"Modified: / 10.9.1995 / 19:19:18 / claus" |
|
3852 |
"Modified: / 9.9.1996 / 22:42:47 / stefan" |
|
3853 |
"Created: / 2.10.1998 / 16:27:49 / cg" |
|
3854 |
"Modified: / 21.10.1998 / 19:15:10 / cg" |
|
3855 |
! |
|
3856 |
||
3857 |
toolSettingsFor:requestor |
|
3858 |
"open a dialog on tool settings" |
|
3859 |
||
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3860 |
|box resources currentUserPrefs |
2239 | 3861 |
useNewInspector useNewChangesBrowser useNewVersionDiffBrowser |
3862 |
showClockInLauncher showClock launcher| |
|
2001 | 3863 |
|
3864 |
currentUserPrefs := UserPreferences current. |
|
3865 |
||
3866 |
resources := requestor class classResources. |
|
3867 |
||
3868 |
"/ |
|
3869 |
"/ extract relevant system settings ... |
|
3870 |
"/ |
|
3871 |
useNewInspector := currentUserPrefs useNewInspector asValue. |
|
3872 |
useNewChangesBrowser := currentUserPrefs useNewChangesBrowser asValue. |
|
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3873 |
showClockInLauncher := currentUserPrefs showClockInLauncher asValue. |
2395 | 3874 |
useNewVersionDiffBrowser := currentUserPrefs useNewVersionDiffBrowser asValue. |
2001 | 3875 |
|
3876 |
"/ |
|
3877 |
"/ create a box on those values ... |
|
3878 |
"/ |
|
3879 |
box := DialogBox new. |
|
3880 |
box label:(resources string:'Tool settings'). |
|
3881 |
||
3882 |
||
3883 |
||
3884 |
box addCheckBox:(resources string:'Use the new Changes Browser') on:useNewChangesBrowser. |
|
3885 |
box addHorizontalLine. |
|
2239 | 3886 |
box addCheckBox:(resources string:'Use the new VersionDiff Browser') on:useNewVersionDiffBrowser. |
3887 |
box addHorizontalLine. |
|
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3888 |
box addCheckBox:(resources string:'Use Hierarchical Inspector') on:useNewInspector. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3889 |
box addHorizontalLine. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3890 |
box addCheckBox:(resources string:'Show Clock in Launcher') on:showClockInLauncher. |
2001 | 3891 |
|
3892 |
box |
|
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3893 |
addHelpButtonFor:'Launcher/toolSettings.html'; |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3894 |
addAbortAndOkButtons. |
2001 | 3895 |
|
3896 |
"/ |
|
3897 |
"/ show the box ... |
|
3898 |
"/ |
|
3899 |
box open. |
|
3900 |
||
3901 |
"/ |
|
3902 |
"/ update system settings |
|
3903 |
"/ |
|
3904 |
box accepted ifTrue:[ |
|
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3905 |
currentUserPrefs useNewInspector:useNewInspector value. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3906 |
currentUserPrefs useNewChangesBrowser:useNewChangesBrowser value. |
2239 | 3907 |
currentUserPrefs useNewVersionDiffBrowser:useNewVersionDiffBrowser value. |
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3908 |
|
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3909 |
showClock := showClockInLauncher value. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3910 |
currentUserPrefs showClockInLauncher ~= showClock ifTrue:[ |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3911 |
currentUserPrefs showClockInLauncher:showClock. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3912 |
launcher := Transcript application. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3913 |
(launcher isKindOf:ToolApplicationModel) ifTrue:[ |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3914 |
showClock ifTrue:[ |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3915 |
launcher startClock |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3916 |
] ifFalse:[ |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3917 |
launcher stopClock |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3918 |
] |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3919 |
] |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3920 |
]. |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3921 |
|
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3922 |
useNewInspector value ifTrue:[ |
2382 | 3923 |
Inspector := NewInspector::NewInspectorView |
2227
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3924 |
] ifFalse:[ |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3925 |
Inspector := InspectorView |
d81cbdaa0599
#showClockInLauncher setting in tools-dialog
Claus Gittinger <cg@exept.de>
parents:
2218
diff
changeset
|
3926 |
]. |
2001 | 3927 |
]. |
3928 |
box destroy |
|
3929 |
||
3930 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
|
3931 |
"Modified: / 16.4.1998 / 17:18:47 / ca" |
|
3932 |
"Created: / 13.10.1998 / 15:44:36 / cg" |
|
3933 |
"Modified: / 13.10.1998 / 16:03:43 / cg" |
|
3934 |
! |
|
3935 |
||
3936 |
viewStyleSettingsFor:requestor |
|
3937 |
"open a dialog on viewStyle related settings" |
|
3938 |
||
2019 | 3939 |
|resourceDir dir box |
2001 | 3940 |
list listView scrView infoLabel infoForwarder newStyle |
2019 | 3941 |
someRsrcFile didApply resources listUpdater showStandardStylesOnly standardStyles| |
2001 | 3942 |
|
3943 |
showStandardStylesOnly := true asValue. |
|
2110
ed1910b1dd06
added decWindows to the standard styles
Claus Gittinger <cg@exept.de>
parents:
2097
diff
changeset
|
3944 |
standardStyles := #( |
2462 | 3945 |
'decWindows' |
3946 |
'iris' |
|
3947 |
'motif' |
|
3948 |
'mswindows95' |
|
3949 |
'next' |
|
3950 |
'normal' |
|
3951 |
'os2' |
|
3952 |
'st80' |
|
3953 |
). |
|
2001 | 3954 |
|
3955 |
resources := requestor class classResources. |
|
3956 |
||
3957 |
" |
|
3958 |
search resources directory for a list of .style files ... |
|
3959 |
" |
|
3960 |
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style'). |
|
2462 | 3961 |
someRsrcFile isNil ifTrue:[ |
3962 |
someRsrcFile := Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'. |
|
3963 |
]. |
|
2001 | 3964 |
someRsrcFile notNil ifTrue:[ |
2462 | 3965 |
resourceDir := someRsrcFile asFilename directoryName |
2001 | 3966 |
] ifFalse:[ |
2462 | 3967 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
2001 | 3968 |
]. |
3969 |
||
3970 |
resourceDir isNil ifTrue:[ |
|
2462 | 3971 |
self warn:(resources string:'no styles found (missing ''resources'' directory)'). |
3972 |
^ self |
|
2001 | 3973 |
]. |
3974 |
dir := resourceDir asFilename directoryContents. |
|
3975 |
||
3976 |
list := SelectionInList new. |
|
3977 |
||
3978 |
listUpdater := [ |
|
2462 | 3979 |
|listOfStyles lastSelection| |
3980 |
||
3981 |
lastSelection := list selection. |
|
3982 |
listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style']. |
|
3983 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name]. |
|
3984 |
Filename isCaseSensitive ifFalse:[ |
|
3985 |
listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase]. |
|
3986 |
]. |
|
3987 |
listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil. |
|
3988 |
showStandardStylesOnly value ifTrue:[ |
|
3989 |
listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName]. |
|
3990 |
]. |
|
3991 |
||
3992 |
listOfStyles sort. |
|
3993 |
list list:listOfStyles. |
|
3994 |
list selection:lastSelection. |
|
2001 | 3995 |
]. |
3996 |
listUpdater value. |
|
3997 |
||
3998 |
showStandardStylesOnly onChangeSend:#value to:listUpdater. |
|
3999 |
||
4000 |
infoForwarder := [ |
|
2462 | 4001 |
|nm sheet comment| |
4002 |
||
4003 |
comment := ''. |
|
4004 |
nm := list selection. |
|
4005 |
nm notNil ifTrue:[ |
|
4006 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
4007 |
comment := (sheet at:#comment ifAbsent:'') withoutSeparators. |
|
4008 |
]. |
|
4009 |
comment := comment withCRs asStringCollection. |
|
4010 |
comment size == 1 ifTrue:[ |
|
4011 |
comment := comment first |
|
4012 |
]. |
|
4013 |
infoLabel label:comment |
|
4014 |
]. |
|
2001 | 4015 |
|
4016 |
list onChangeSend:#value to:infoForwarder. |
|
4017 |
||
4018 |
box := Dialog new. |
|
4019 |
box label:(resources string:'Style selection'). |
|
4020 |
||
4021 |
(box addTextLabel:(resources at:'STYLE_MSG' default:'select a style') withCRs) adjust:#left. |
|
4022 |
listView := SelectionInListView on:list. |
|
4023 |
listView doubleClickAction:[:sel | box accept value:true. box hide]. |
|
4024 |
box addCheckBox:(resources string:'standard styles only') on:showStandardStylesOnly. |
|
4025 |
scrView := box addComponent:(ScrollableView forView:listView) tabable:true. |
|
4026 |
||
4027 |
box addVerticalSpace. |
|
4028 |
||
4029 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
|
4030 |
||
2048 | 4031 |
box addAbortAndOkButtons. |
2001 | 4032 |
"/ mhmh - the newLauncher does not yet handle apply (without close) correctly |
4033 |
"/ b := box addButton:(Button label:(resources string:'apply')). |
|
4034 |
"/ b action:[didApply := true. requestor changeViewStyleTo:(list selection)]. |
|
4035 |
||
4036 |
(standardStyles includes:View defaultStyle) ifFalse:[ |
|
2462 | 4037 |
showStandardStylesOnly value:false |
2001 | 4038 |
]. |
4039 |
list selection:(View defaultStyle). |
|
4040 |
||
4041 |
box stickAtBottomWithVariableHeight:scrView. |
|
4042 |
box stickAtBottomWithFixHeight:infoLabel. |
|
2019 | 4043 |
didApply := false. |
2001 | 4044 |
box open. |
4045 |
||
4046 |
box destroy. |
|
4047 |
box accepted ifTrue:[ |
|
2462 | 4048 |
((newStyle := list selection) ~= View defaultStyle |
4049 |
or:[didApply ~~ true]) ifTrue:[ |
|
4050 |
requestor changeViewStyleTo:newStyle. |
|
4051 |
]. |
|
2001 | 4052 |
]. |
4053 |
||
4054 |
" |
|
4055 |
self viewStyleSettingsFor:nil |
|
4056 |
" |
|
4057 |
||
4058 |
"Modified: / 14.9.1998 / 20:33:59 / cg" |
|
4059 |
! ! |
|
4060 |
||
4061 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs - file'! |
|
4062 |
||
4063 |
objectModuleDialogFor:requestor |
|
4064 |
"opens a moduleInfo dialog" |
|
4065 |
||
4066 |
<resource: #programMenu > |
|
4067 |
||
4068 |
|allModules moduleNames |
|
4069 |
allObjects methodObjects methodNames |
|
4070 |
cObjects cObjectNames |
|
4071 |
otherObjects otherObjectNames |
|
4072 |
box l handles unloadButton unloadAndRemoveButton |
|
4073 |
list1 list2 listView1 listView2 |
|
4074 |
y panel |
|
4075 |
showBuiltIn showModules showMethods showCObjects showOthers |
|
4076 |
moduleListUpdater check canDoIt menu |
|
4077 |
resources middleLabel| |
|
4078 |
||
4079 |
resources := requestor class classResources. |
|
4080 |
||
4081 |
showBuiltIn := true asValue. |
|
4082 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
|
4083 |
||
4084 |
showModules := canDoIt asValue. |
|
4085 |
showMethods := canDoIt asValue. |
|
4086 |
showCObjects := canDoIt asValue. |
|
4087 |
showOthers := canDoIt asValue. |
|
4088 |
||
4089 |
list1 := SelectionInList new. |
|
4090 |
list2 := SelectionInList new. |
|
4091 |
||
4092 |
moduleListUpdater := [ |
|
4093 |
|l| |
|
4094 |
||
4095 |
list2 list:nil. |
|
4096 |
||
4097 |
l := Array new. |
|
4098 |
handles := Array new. |
|
4099 |
||
4100 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
4101 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
4102 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
4103 |
allModules := allModules select:[:i | |
|
4104 |
|wantToSee| |
|
4105 |
||
4106 |
wantToSee := i dynamic. |
|
4107 |
showBuiltIn value ifTrue:[ |
|
4108 |
wantToSee := wantToSee not |
|
4109 |
]. |
|
4110 |
wantToSee |
|
4111 |
] |
|
4112 |
]. |
|
4113 |
||
4114 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
4115 |
allModules sort:[:a :b | (a id) > (b id)]. |
|
4116 |
moduleNames := allModules collect:[:entry | entry name]. |
|
4117 |
l := l , moduleNames. |
|
4118 |
handles := handles , allModules. |
|
4119 |
]. |
|
4120 |
||
4121 |
showMethods value ifTrue:[ |
|
4122 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
4123 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
4124 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
4125 |
'compiled method - removed' " , ' (in ' , mH pathName , ')' " |
|
4126 |
] ifFalse:[ |
|
4127 |
'compiled method ' , mH method whoString " , ' (in ' , mH pathName , ')' " |
|
4128 |
]. |
|
4129 |
]. |
|
4130 |
l := l , methodNames. |
|
4131 |
handles := handles , methodObjects. |
|
4132 |
]. |
|
4133 |
||
4134 |
showCObjects value ifTrue:[ |
|
4135 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
4136 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
|
4137 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
|
4138 |
l := l , cObjectNames. |
|
4139 |
handles := handles , cObjects. |
|
4140 |
]. |
|
4141 |
||
4142 |
showOthers value ifTrue:[ |
|
4143 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
4144 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
|
4145 |
or:[h isMethodHandle |
|
4146 |
or:[h isClassLibHandle]]) not]) asArray. |
|
4147 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
|
4148 |
l := l , otherObjectNames. |
|
4149 |
handles := handles , otherObjects. |
|
4150 |
]. |
|
4151 |
||
4152 |
showBuiltIn value ifTrue:[ |
|
4153 |
l := #('VM') , l. |
|
4154 |
handles := #(VM) , handles. |
|
4155 |
allModules := #(VM) , allModules. |
|
4156 |
]. |
|
4157 |
||
4158 |
list1 list:l. |
|
4159 |
unloadButton disable. |
|
4160 |
unloadAndRemoveButton disable. |
|
4161 |
]. |
|
4162 |
||
4163 |
showBuiltIn onChangeSend:#value to:moduleListUpdater. |
|
4164 |
showModules onChangeSend:#value to:moduleListUpdater. |
|
4165 |
showMethods onChangeSend:#value to:moduleListUpdater. |
|
4166 |
showCObjects onChangeSend:#value to:moduleListUpdater. |
|
4167 |
showOthers onChangeSend:#value to:moduleListUpdater. |
|
4168 |
||
4169 |
box := Dialog new. |
|
4170 |
box label:(resources string:'ST/X & Module Version information'). |
|
4171 |
||
4172 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
4173 |
listView1 model:list1. |
|
4174 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
4175 |
listView1 action:[:sel | |
|
4176 |
|info classNames tabs module| |
|
4177 |
||
4178 |
listView1 middleButtonMenu:nil. |
|
4179 |
||
4180 |
box withWaitCursorDo:[ |
|
4181 |
|nm fileName addr entry1 entry2 entry3 method l| |
|
4182 |
||
4183 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6 3.5). |
|
4184 |
||
4185 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
4186 |
info := allModules at:sel ifAbsent:nil. |
|
4187 |
]. |
|
4188 |
info isNil ifTrue:[ |
|
4189 |
"/ selected a method, cObject or unknown |
|
4190 |
||
4191 |
module := handles at:sel. |
|
4192 |
fileName := module pathName. |
|
4193 |
||
4194 |
module isMethodHandle ifTrue:[ |
|
4195 |
middleLabel label:'contains method:'. |
|
4196 |
||
4197 |
(method := module method) isNil ifTrue:[ |
|
4198 |
nm := '** removed **'. |
|
4199 |
] ifFalse:[ |
|
4200 |
menu := PopUpMenu |
|
4201 |
labels:#('inspect' 'browse') |
|
4202 |
selectors:#(inspect browse). |
|
4203 |
menu actionAt:#inspect put:[ method inspect ]. |
|
4204 |
menu actionAt:#browse put:[ |who| |
|
4205 |
who := method who. |
|
4206 |
SystemBrowser |
|
4207 |
openInClass:(who methodClass) |
|
4208 |
selector:(who methodSelector) |
|
4209 |
]. |
|
4210 |
listView1 middleButtonMenu:menu. |
|
4211 |
||
4212 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
|
4213 |
]. |
|
4214 |
entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
4215 |
entry1 colAt:1 put:'compiled method'; colAt:2 put:nm. |
|
4216 |
||
4217 |
entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
4218 |
entry2 colAt:1 put:'path'; colAt:2 put:fileName. |
|
4219 |
||
4220 |
entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
4221 |
entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code address hexPrintString leftPaddedTo:8 with:$0)). |
|
4222 |
||
4223 |
list2 list:(Array with:entry1 with:entry2 with:entry3). |
|
4224 |
] ifFalse:[ |
|
4225 |
(module isFunctionObjectHandle |
|
4226 |
and:[module functions notEmpty]) ifTrue:[ |
|
4227 |
middleLabel label:'contains function:'. |
|
4228 |
||
4229 |
menu := PopUpMenu |
|
4230 |
labels:#('inspect') |
|
4231 |
selectors:#(inspect). |
|
4232 |
menu actionAt:#inspect put:[ module functions inspect ]. |
|
4233 |
listView1 middleButtonMenu:menu. |
|
4234 |
||
4235 |
list2 list:((module functions select:[:f | f notNil]) |
|
4236 |
collect:[:f | |entry| |
|
4237 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
4238 |
entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)). |
|
4239 |
entry colAt:2 put:('address: (16r) ' , (f code address hexPrintString leftPaddedTo:8 with:$0)). |
|
4240 |
entry |
|
4241 |
]). |
|
4242 |
] ifFalse:[ |
|
4243 |
list2 list:#('nothing known about contents (no functions have been extracted)'). |
|
4244 |
] |
|
4245 |
]. |
|
4246 |
||
4247 |
unloadButton enable. |
|
4248 |
unloadAndRemoveButton disable. |
|
4249 |
] ifFalse:[ |
|
4250 |
info == #VM ifTrue:[ |
|
4251 |
"/ dummy entry for VM; |
|
4252 |
"/ show file versions in lower view. |
|
4253 |
||
4254 |
middleLabel label:'contains modules:'. |
|
4255 |
l := (ObjectMemory getVMIdentificationStrings). |
|
4256 |
l := l select:[:entry | entry includesString:'$Header']. |
|
4257 |
l := l select:[:entry | entry includesString:',v']. |
|
4258 |
l := l collect:[:entry | |
|
4259 |
|i1 i2 file revision date listEntry| |
|
4260 |
||
4261 |
listEntry := MultiColListEntry new:3 tabulatorSpecification:tabs. |
|
4262 |
||
4263 |
i1 := entry indexOfSubCollection:'librun'. |
|
4264 |
i1 ~~ 0 ifTrue:[ |
|
4265 |
i2 := entry indexOfSubCollection:',v' startingAt:i1. |
|
4266 |
i2 ~~ 0 ifTrue:[ |
|
4267 |
file := entry copyFrom:i1+7 to:(i2-1). |
|
4268 |
listEntry colAt:1 put:file. |
|
4269 |
||
4270 |
i1 := i2+3. |
|
4271 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
4272 |
revision := entry copyFrom:i1 to:(i2-1). |
|
4273 |
listEntry colAt:2 put:revision. |
|
4274 |
||
4275 |
i1 := i2+1. |
|
4276 |
i2 := entry indexOfSeparatorStartingAt:i1. |
|
4277 |
date := entry copyFrom:i1 to:(i2-1). |
|
4278 |
listEntry colAt:3 put:date. |
|
4279 |
]. |
|
4280 |
]. |
|
4281 |
listEntry. |
|
4282 |
"/ entry |
|
4283 |
]. |
|
4284 |
list2 list:l. |
|
4285 |
||
4286 |
unloadButton disable. |
|
4287 |
unloadAndRemoveButton disable. |
|
4288 |
] ifFalse:[ |
|
4289 |
"/ selected a package |
|
4290 |
||
4291 |
"/ fill bottom list with class-info |
|
4292 |
||
4293 |
middleLabel label:'contains classes:'. |
|
4294 |
classNames := info classNames asSortedCollection. |
|
4295 |
classNames := classNames select:[:cName | |
|
4296 |
|cls| |
|
4297 |
||
4298 |
cls := Smalltalk classNamed:cName. |
|
4299 |
cls isNil ifTrue:[ |
|
4300 |
true "a removed class" |
|
4301 |
] ifFalse:[ |
|
4302 |
cls isPrivate not |
|
4303 |
]. |
|
4304 |
]. |
|
4305 |
||
4306 |
classNames := classNames collect:[:cName | |
|
4307 |
|cls entry rev listEntry| |
|
4308 |
||
4309 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
4310 |
listEntry colAt:1 put:cName. |
|
4311 |
||
4312 |
cls := Smalltalk classNamed:cName. |
|
4313 |
cls isNil ifTrue:[ |
|
4314 |
listEntry colAt:2 put:'(class removed)'. |
|
4315 |
] ifFalse:[ |
|
4316 |
rev := cls binaryRevision. |
|
4317 |
rev notNil ifTrue:[ |
|
4318 |
cls isLoaded ifFalse:[ |
|
4319 |
entry := '(stub for: ' , rev. |
|
4320 |
] ifTrue:[ |
|
4321 |
entry :='(bin: ' , rev. |
|
4322 |
]. |
|
4323 |
cls revision ~= rev ifTrue:[ |
|
4324 |
entry := entry , ' / src: ' , cls revision |
|
4325 |
]. |
|
4326 |
listEntry colAt:2 put:entry , ')' |
|
4327 |
] ifFalse:[ |
|
4328 |
cls revision notNil ifTrue:[ |
|
4329 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
|
4330 |
] |
|
4331 |
] |
|
4332 |
]. |
|
4333 |
listEntry |
|
4334 |
]. |
|
4335 |
list2 list:classNames. |
|
4336 |
info dynamic ifTrue:[ |
|
4337 |
unloadButton enable. |
|
4338 |
unloadAndRemoveButton enable. |
|
4339 |
] ifFalse:[ |
|
4340 |
unloadButton disable. |
|
4341 |
unloadAndRemoveButton disable. |
|
4342 |
]. |
|
4343 |
]. |
|
4344 |
] |
|
4345 |
] |
|
4346 |
]. |
|
4347 |
||
4348 |
||
4349 |
panel := HorizontalPanelView new. |
|
4350 |
||
4351 |
panel add:(l := Label label:'show:'). |
|
4352 |
l adjust:#left; borderWidth:0. |
|
4353 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
|
4354 |
box makeTabable:check. |
|
4355 |
panel add:(check := CheckBox label:'classLibs' model:showModules). |
|
4356 |
canDoIt ifFalse:[ |
|
4357 |
check disable |
|
4358 |
] ifTrue:[ |
|
4359 |
box makeTabable:check. |
|
4360 |
]. |
|
4361 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
|
4362 |
canDoIt ifFalse:[ |
|
4363 |
check disable |
|
4364 |
] ifTrue:[ |
|
4365 |
box makeTabable:check. |
|
4366 |
]. |
|
4367 |
panel add:(check := CheckBox label:'c-objects' model:showCObjects). |
|
4368 |
canDoIt ifFalse:[ |
|
4369 |
check disable |
|
4370 |
] ifTrue:[ |
|
4371 |
box makeTabable:check. |
|
4372 |
]. |
|
4373 |
panel add:(check := CheckBox label:'others' model:showOthers). |
|
4374 |
canDoIt ifFalse:[ |
|
4375 |
check disable |
|
4376 |
] ifTrue:[ |
|
4377 |
box makeTabable:check. |
|
4378 |
]. |
|
4379 |
||
4380 |
panel horizontalLayout:#fitSpace. |
|
4381 |
"/ panel horizontalLayout:#leftSpace. |
|
4382 |
||
4383 |
box addComponent:panel tabable:false. |
|
4384 |
||
4385 |
box addVerticalSpace. |
|
4386 |
box addComponent:listView1 tabable:true. |
|
4387 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
4388 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
4389 |
||
4390 |
l := box addTextLabel:(resources string:'contains:'). |
|
4391 |
l adjust:#left; borderWidth:0. |
|
4392 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
4393 |
l topInset:(View viewSpacing). |
|
4394 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
4395 |
middleLabel := l. |
|
4396 |
||
4397 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
4398 |
listView2 model:list2; printItems:false. |
|
4399 |
box addComponent:listView2 tabable:true. |
|
4400 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
4401 |
listView2 disable. |
|
4402 |
||
4403 |
unloadButton := Button label:(resources string:'unload'). |
|
4404 |
unloadButton action:[ |
|
4405 |
box withWaitCursorDo:[ |
|
4406 |
|info idx pathName| |
|
4407 |
||
4408 |
idx := list1 selectionIndex. |
|
4409 |
info := allModules at:idx ifAbsent:nil. |
|
4410 |
||
4411 |
list1 selectionIndex:nil. |
|
4412 |
||
4413 |
info isNil ifTrue:[ |
|
4414 |
"/ selected a method |
|
4415 |
"/ idx := idx - allModules size. |
|
4416 |
pathName := (handles at:idx) pathName. |
|
4417 |
||
4418 |
] ifFalse:[ |
|
4419 |
"/ selected a package |
|
4420 |
pathName := info pathName. |
|
4421 |
]. |
|
4422 |
ObjectFileLoader unloadObjectFile:pathName. |
|
4423 |
moduleListUpdater value. |
|
4424 |
unloadButton disable. |
|
4425 |
] |
|
4426 |
]. |
|
4427 |
||
4428 |
unloadAndRemoveButton := Button label:(resources string:'remove classes & unload'). |
|
4429 |
unloadAndRemoveButton action:[ |
|
4430 |
box withWaitCursorDo:[ |
|
4431 |
|info idx pathName| |
|
4432 |
||
4433 |
idx := list1 selectionIndex. |
|
4434 |
info := allModules at:idx ifAbsent:nil. |
|
4435 |
||
4436 |
list1 selectionIndex:nil. |
|
4437 |
||
4438 |
info isNil ifTrue:[ |
|
4439 |
"/ selected a method |
|
4440 |
"/ idx := idx - allModules size. |
|
4441 |
pathName := (handles at:idx) pathName. |
|
4442 |
||
4443 |
] ifFalse:[ |
|
4444 |
"/ selected a package |
|
4445 |
pathName := info pathName. |
|
4446 |
]. |
|
4447 |
ObjectFileLoader unloadObjectFileAndRemoveClasses:pathName. |
|
4448 |
moduleListUpdater value. |
|
4449 |
unloadAndRemoveButton disable. |
|
4450 |
] |
|
4451 |
]. |
|
4452 |
||
4453 |
moduleListUpdater value. |
|
4454 |
||
4455 |
box addButton:unloadButton. |
|
4456 |
box addButton:unloadAndRemoveButton. |
|
4457 |
box addAbortButtonLabelled:(resources string:'dismiss'). |
|
4458 |
||
4459 |
y := box yPosition. |
|
4460 |
listView2 topInset:(l preferredExtent y + 5). |
|
4461 |
listView2 bottomInset:(box preferredExtent y - y). |
|
4462 |
||
4463 |
box width:(400 min:(box device width * 2 // 3)); |
|
4464 |
height:(450 min:(box device height - 50)). |
|
4465 |
||
4466 |
"/ box sizeFixed:true. |
|
4467 |
box openWithExtent:(600 min:(box device width * 2 // 3)) |
|
4468 |
@ |
|
4469 |
(500 min:(box device height - 50)) . |
|
4470 |
||
4471 |
box destroy. |
|
4472 |
||
4473 |
"Modified: / 17.9.1995 / 16:47:50 / claus" |
|
4474 |
"Created: / 31.7.1998 / 15:49:45 / cg" |
|
4475 |
"Modified: / 10.8.1998 / 11:33:22 / cg" |
|
2490
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4476 |
! |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4477 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4478 |
packageDialogFor:requestor |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4479 |
"opens a package dialog" |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4480 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4481 |
|allPackages packageList packageUpdater |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4482 |
box l listView tabs |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4483 |
y menu resources selectedPackage| |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4484 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4485 |
resources := requestor class classResources. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4486 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4487 |
box := Dialog new. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4488 |
box label:(resources string:'Packages'). |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4489 |
|
2493 | 4490 |
allPackages := Set new. |
2490
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4491 |
allPackages addAll:(Smalltalk knownPackages). |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4492 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4493 |
Project knownProjects do:[:package | |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4494 |
allPackages add:(package name) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4495 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4496 |
Project loadedProjects do:[:package | |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4497 |
allPackages add:(package name) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4498 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4499 |
allPackages := allPackages asOrderedCollection sort. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4500 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4501 |
packageUpdater := [ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4502 |
tabs := TabulatorSpecification unit:#inch positions:#(0 4). |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4503 |
packageList := allPackages collect:[:pName | |pkg entry| |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4504 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4505 |
pkg := Project projectWithId:pName asSymbol. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4506 |
(pkg notNil and:[pkg isLoaded]) ifTrue:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4507 |
entry colAt:1 put:pName asText allBold. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4508 |
entry colAt:2 put:'loaded'. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4509 |
] ifFalse:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4510 |
entry colAt:1 put:pName. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4511 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4512 |
(Smalltalk allClasses |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4513 |
contains:[:cls | cls package = pName and:[cls isLoaded not]]) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4514 |
ifTrue:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4515 |
(Smalltalk allClasses |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4516 |
contains:[:cls | cls package = pName and:[cls isLoaded]]) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4517 |
ifTrue:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4518 |
entry colAt:2 put:'loaded/autoloaded'. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4519 |
] ifFalse:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4520 |
entry colAt:2 put:'autoloaded'. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4521 |
] |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4522 |
] |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4523 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4524 |
entry |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4525 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4526 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4527 |
packageUpdater value. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4528 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4529 |
listView := HVScrollableView for:SelectionInListView miniScrollerH:true. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4530 |
listView list:packageList. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4531 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4532 |
box addComponent:listView tabable:true. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4533 |
listView origin:0.0@0.0 corner:1.0@1.0. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4534 |
listView bottomInset:40. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4535 |
listView action:[:selIndex | |pkg| |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4536 |
selectedPackage := (allPackages at:selIndex) asSymbol. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4537 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4538 |
pkg := Project projectWithId:selectedPackage. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4539 |
(pkg notNil and:[pkg isLoaded]) ifTrue:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4540 |
menu disable:#load. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4541 |
"/ menu enable:#unload. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4542 |
] ifFalse:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4543 |
"/ menu disable:#unload. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4544 |
menu enable:#load. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4545 |
] |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4546 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4547 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4548 |
menu := PopUpMenu |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4549 |
itemList:#( |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4550 |
('load...' load ) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4551 |
"/ ('-' nil ) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4552 |
"/ ('unload...' unload) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4553 |
) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4554 |
resources:resources. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4555 |
listView middleButtonMenu:menu. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4556 |
menu actionAt:#load put:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4557 |
box withWaitCursorDo:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4558 |
Smalltalk loadPackage:selectedPackage. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4559 |
packageUpdater value. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4560 |
] |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4561 |
]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4562 |
"/ menu actionAt:#unload put:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4563 |
"/ box withWaitCursorDo:[ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4564 |
"/ Smalltalk unloadPackage:selectedPackage. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4565 |
"/ packageUpdater value. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4566 |
"/ ]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4567 |
"/ ]. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4568 |
menu disable:#load. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4569 |
"/ menu disable:#unload. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4570 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4571 |
box addAbortButtonLabelled:(resources string:'dismiss'). |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4572 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4573 |
box width:(400 min:(box device width * 2 // 3)); |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4574 |
height:(450 min:(box device height - 50)). |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4575 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4576 |
box openWithExtent:(600 min:(box device width * 2 // 3)) |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4577 |
@ |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4578 |
(500 min:(box device height - 50)) . |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4579 |
|
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4580 |
box destroy. |
924e607d11d8
first version of a package dialog
Claus Gittinger <cg@exept.de>
parents:
2462
diff
changeset
|
4581 |
|
2001 | 4582 |
! ! |
4583 |
||
4584 |
!AbstractLauncherApplication::LauncherDialogs class methodsFor:'dialogs-private'! |
|
4585 |
||
4586 |
cvsConfigurationDialogFor:requestor |
|
4587 |
|box y cvsRootHolder component resources defaultsList| |
|
4588 |
||
4589 |
resources := requestor class classResources. |
|
4590 |
||
4591 |
OperatingSystem isUNIXlike ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4592 |
defaultsList := #('/files/CVS' '/CVS' 'host:/files/CVS' 'host:/CVS'). |
2001 | 4593 |
] ifFalse:[ |
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4594 |
OperatingSystem isMSDOSlike ifTrue:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4595 |
defaultsList := #(':local:c:\files\CVS' ':local:c:\CVS' 'host:/files/CVS' 'host:/CVS'). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4596 |
] ifFalse:[ |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4597 |
defaultsList := #('host:/files/CVS' 'host:/CVS'). |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4598 |
] |
2001 | 4599 |
]. |
4600 |
||
4601 |
cvsRootHolder := CVSSourceCodeManager repositoryName ? '/files/CVS'. |
|
4602 |
cvsRootHolder := cvsRootHolder asValue. |
|
4603 |
||
4604 |
"/ |
|
4605 |
"/ create a box to input the CVSRoot ... |
|
4606 |
"/ |
|
4607 |
box := DialogBox new. |
|
4608 |
box label:(resources string:'CVS Setup'). |
|
4609 |
||
4610 |
component := (box addTextLabel:'CVS SourceCodeManager setup'). |
|
4611 |
component adjust:#left. |
|
4612 |
||
4613 |
y := box yPosition. |
|
4614 |
component := box addTextLabel:(resources string:'CVSRoot:'). |
|
4615 |
component width:0.25; adjust:#right; borderWidth:0. |
|
4616 |
box yPosition:y. |
|
4617 |
component := box addComboBoxOn:nil tabable:true. |
|
4618 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
4619 |
component width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
4620 |
component list:defaultsList. |
|
4621 |
component model:cvsRootHolder. |
|
4622 |
||
4623 |
"/ component := box |
|
4624 |
"/ addLabelledInputField:(resources string:'CVSRoot:') |
|
4625 |
"/ adjust:#right |
|
4626 |
"/ on:nil |
|
4627 |
"/ tabable:true |
|
4628 |
"/ separateAtX:0.5. |
|
4629 |
"/ component acceptOnLeave:false. |
|
4630 |
"/ component model:cvsRootHolder. |
|
4631 |
||
4632 |
box |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4633 |
addHelpButtonFor:'Launcher/sourceSettings.html'; |
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4634 |
addAbortAndOkButtons. |
2001 | 4635 |
|
4636 |
"/ |
|
4637 |
"/ show the box ... |
|
4638 |
"/ |
|
4639 |
box extent:400@300. |
|
4640 |
box showAtPointer. |
|
4641 |
||
4642 |
"/ |
|
4643 |
"/ update system settings |
|
4644 |
"/ |
|
4645 |
box accepted ifTrue:[ |
|
2160
028c1d5740e5
exit smalltalk is now the default, when closing the launcher.
Claus Gittinger <cg@exept.de>
parents:
2149
diff
changeset
|
4646 |
CVSSourceCodeManager initializeForRepository:cvsRootHolder value |
2001 | 4647 |
]. |
4648 |
box destroy |
|
4649 |
||
4650 |
"Modified: / 16.4.1998 / 17:18:16 / ca" |
|
4651 |
"Modified: / 12.8.1998 / 17:09:02 / cg" |
|
4652 |
! |
|
4653 |
||
4654 |
fontBoxForEncoding:encodingMatch for:requestor |
|
4655 |
"open a fontBox, showing fonts which match some encoding |
|
4656 |
(used when changing to japanese ...)" |
|
4657 |
||
4658 |
|box y b |
|
4659 |
labelDef buttonDef listDef menuDef textDef |
|
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4660 |
models labels allOfThem filter resources defaultButton| |
2001 | 4661 |
|
4662 |
resources := requestor class classResources. |
|
4663 |
||
4664 |
encodingMatch notNil ifTrue:[ |
|
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4665 |
filter := [:f | f encoding notNil |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4666 |
and:[encodingMatch match:f encoding]]. |
2001 | 4667 |
]. |
4668 |
||
4669 |
models := OrderedCollection new. |
|
4670 |
labels := OrderedCollection new. |
|
4671 |
||
4672 |
models add:(allOfThem := nil asValue). |
|
4673 |
models add:(labelDef := Label defaultFont asValue). |
|
4674 |
models add:(buttonDef := Button defaultFont asValue). |
|
4675 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
4676 |
models add:(menuDef := MenuView defaultFont asValue). |
|
4677 |
models add:(textDef := TextView defaultFont asValue). |
|
4678 |
||
4679 |
box := Dialog new. |
|
4680 |
box label:(resources string:'Font settings'). |
|
4681 |
||
4682 |
models |
|
4683 |
with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
|
4684 |
do:[:model :title | |
|
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4685 |
|y2 lbl f i| |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4686 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4687 |
f := model value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4688 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4689 |
(box addTextLabel:title) adjust:#left. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4690 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4691 |
y := box yPosition. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4692 |
b := box addComponent:(Button label:(resources string:'change ...')) tabable:true. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4693 |
b relativeExtent:nil; extent:(b preferredExtent). |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4694 |
y2 := box yPosition. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4695 |
box yPosition:y. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4696 |
i := box leftIndent. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4697 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4698 |
(lbl := box addTextLabel:'') |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4699 |
adjust:#left; |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4700 |
font:(model value); |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4701 |
labelChannel:(BlockValue |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4702 |
with:[:v | |f| |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4703 |
f := v value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4704 |
f isNil ifTrue:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4705 |
'' |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4706 |
] ifFalse:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4707 |
f userFriendlyName |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4708 |
] |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4709 |
] |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4710 |
argument:model). |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4711 |
labels add:lbl. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4712 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4713 |
box leftIndent:i. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4714 |
box yPosition:(box yPosition max:y2). |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4715 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4716 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4717 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4718 |
b action:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4719 |
|f| |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4720 |
|
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4721 |
f := FontPanel |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4722 |
fontFromUserInitial:(model value) |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4723 |
title:(resources string:'font for %1' with:title) |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4724 |
filter:filter. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4725 |
f notNil ifTrue:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4726 |
model == allOfThem ifTrue:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4727 |
models do:[:m | m value:f]. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4728 |
labels do:[:l | l font:f] |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4729 |
] ifFalse:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4730 |
model value:f. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4731 |
lbl font:f. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4732 |
]. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4733 |
] |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4734 |
]. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4735 |
model == allOfThem ifTrue:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4736 |
box addVerticalSpace |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4737 |
] |
2001 | 4738 |
]. |
4739 |
||
2048 | 4740 |
box addAbortAndOkButtons. |
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4741 |
defaultButton := Button label:(resources string:'defaults'). |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4742 |
|
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4743 |
(DialogBox styleSheet at:'dialogBox.okAtLeft') ifTrue:[ |
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4744 |
box addButton:defaultButton after:nil. |
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4745 |
] ifFalse:[ |
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4746 |
box addButton:defaultButton before:nil. |
2047
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4747 |
]. |
bb2070a26bd2
care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents:
2045
diff
changeset
|
4748 |
defaultButton |
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4749 |
action:[ |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4750 |
"/ fetch defaults |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4751 |
View readStyleSheetAndUpdateAllStyleCaches. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4752 |
labelDef value: Label defaultFont. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4753 |
buttonDef value: Button defaultFont. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4754 |
listDef value: SelectionInListView defaultFont. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4755 |
menuDef value: MenuView defaultFont. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4756 |
textDef value: TextView defaultFont. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4757 |
]. |
2001 | 4758 |
|
4759 |
box open. |
|
4760 |
box accepted ifTrue:[ |
|
2209
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4761 |
Label defaultFont:labelDef value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4762 |
Button defaultFont:buttonDef value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4763 |
Toggle defaultFont:buttonDef value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4764 |
TextView withAllSubclasses do:[:cls | cls defaultFont:textDef value]. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4765 |
SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:listDef value]. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4766 |
MenuView defaultFont:menuDef value. |
753b5db1eea5
font change - also tell subclasses of Text- and SelListView
Claus Gittinger <cg@exept.de>
parents:
2207
diff
changeset
|
4767 |
PullDownMenu defaultFont:menuDef value. |
2001 | 4768 |
]. |
4769 |
box destroy. |
|
4770 |
^ box accepted |
|
4771 |
||
4772 |
"Created: / 27.2.1996 / 01:44:16 / cg" |
|
4773 |
"Modified: / 17.6.1996 / 13:38:48 / stefan" |
|
4774 |
"Modified: / 15.9.1998 / 22:04:51 / cg" |
|
4775 |
! |
|
4776 |
||
4777 |
syntaxColorConfigurationDialogFor:requestor |
|
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4778 |
|box frame exampleView y |
2001 | 4779 |
resources exampleText coloredText recolorAction |
4780 |
syntaxColor syntaxColors colorMenu oldUserPreferences |
|
4781 |
syntaxEmphasises syntaxColorSelector syntaxEmphasisSelector syntaxColoringBox |
|
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4782 |
syntaxEmphasisesBox syntaxColoringResetButton b resetList |
2395 | 4783 |
resetListBox currentUserPrefs| |
2001 | 4784 |
|
4785 |
resources := requestor class classResources. |
|
2395 | 4786 |
currentUserPrefs := UserPreferences current. |
2001 | 4787 |
|
4788 |
exampleText := |
|
4789 |
'methodSelector:methodArg |
|
4790 |
"method comment: |
|
4791 |
some stupid code to show the current settings" |
|
4792 |
||
4793 |
|methodVar| |
|
4794 |
||
4795 |
"/ another comment ... |
|
2200 | 4796 |
self at:methodArg. "/ a message |
4797 |
self bar:methodVar. "/ a bad message |
|
2045
59dae01315b9
added extra globalClassIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
2041
diff
changeset
|
4798 |
methodVar := Array new:1. |
2200 | 4799 |
unknonVar := 1. "/ a bad variable |
4800 |
UnknonVar := 1. "/ another bad variable |
|
2001 | 4801 |
"self bar:methodVar. detect commented code easily" |
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4802 |
1 to:5 do:[:i | self at:i + 1]. |
2001 | 4803 |
Transcript showCR:''some string'' , #someSymbol. |
2083 | 4804 |
^ self. |
2001 | 4805 |
'. |
4806 |
||
4807 |
coloredText := '' asValue. |
|
4808 |
recolorAction := [ coloredText value:(SyntaxHighlighter formatMethod:exampleText in:nil) ]. |
|
4809 |
recolorAction value. |
|
4810 |
||
4811 |
"/ |
|
4812 |
"/ create a box on those values ... |
|
4813 |
"/ |
|
4814 |
box := DialogBox new. |
|
4815 |
box label:(resources string:'Syntax Colors'). |
|
4816 |
||
4817 |
frame := View new. |
|
4818 |
frame extent:1.0 @ 200. |
|
4819 |
frame borderWidth:0. |
|
4820 |
||
4821 |
exampleView := HVScrollableView for:TextView in:frame. |
|
4822 |
exampleView model:coloredText. |
|
4823 |
exampleView origin:0.0@0.0 corner:1.0@1.0; inset:2. |
|
4824 |
||
4825 |
frame topInset:box yPosition. |
|
4826 |
box addComponent:frame withExtent:1.0@200. |
|
4827 |
box makeTabable:exampleView. |
|
4828 |
frame width:1.0. |
|
4829 |
||
4830 |
box addVerticalSpace. |
|
4831 |
||
2395 | 4832 |
oldUserPreferences := currentUserPrefs copy. |
2001 | 4833 |
|
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4834 |
syntaxColoringBox := box addComboListOn: (syntaxColors := SelectionInList with:UserPreferences syntaxColorNames initialSelection:1). |
2001 | 4835 |
syntaxColorSelector := [(syntaxColors selection replChar:$ withString: '') asLowercaseFirst asSymbol]. |
4836 |
syntaxEmphasisSelector := [((syntaxColorSelector value readStream upToAll: 'Color'), 'Emphasis') asLowercaseFirst asSymbol]. |
|
2395 | 4837 |
syntaxColor := (currentUserPrefs perform: syntaxColorSelector value) asValue. |
2001 | 4838 |
colorMenu := ColorMenu new. |
4839 |
colorMenu model: syntaxColor. |
|
4840 |
syntaxColor onChangeSend: #value to: |
|
2395 | 4841 |
[currentUserPrefs at: syntaxColorSelector value put: syntaxColor value. |
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4842 |
recolorAction value.]. |
2001 | 4843 |
syntaxColors onChangeSend: #value to: |
2395 | 4844 |
[syntaxColor value: (currentUserPrefs perform:syntaxColorSelector value). |
4845 |
syntaxEmphasises selection: (currentUserPrefs perform: syntaxEmphasisSelector value). |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4846 |
recolorAction value.]. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4847 |
|
2233 | 4848 |
syntaxEmphasises := SelectionInList |
4849 |
with:#( |
|
4850 |
normal |
|
4851 |
underline |
|
4852 |
#'red underline' |
|
4853 |
underwave |
|
4854 |
#'red underwave' |
|
4855 |
bold |
|
4856 |
boldUnderline |
|
4857 |
#'bold+red underline' |
|
4858 |
boldUnderwave |
|
4859 |
#'bold+red underwave' |
|
4860 |
italic |
|
4861 |
italicUnderline |
|
4862 |
#'italic+red underline' |
|
4863 |
italicUnderwave |
|
4864 |
#'italic+red underwave' |
|
4865 |
reverse |
|
4866 |
) |
|
4867 |
initialSelection:1. |
|
4868 |
syntaxEmphasisesBox := box addComboListOn:syntaxEmphasises. |
|
4869 |
syntaxEmphasises |
|
4870 |
onChangeSend:#value |
|
4871 |
to:[ |em| |
|
4872 |
em := syntaxEmphasises selection asSymbol. |
|
4873 |
em == #'red underline' ifTrue:[ em := Array with:#underline with:(#underlineColor->Color red)]. |
|
4874 |
em == #'red underwave' ifTrue:[ em := Array with:#underwave with:(#underlineColor->Color red)]. |
|
4875 |
em == #'bold+red underline' ifTrue:[ em := Array with:#bold with:#underline with:(#underlineColor->Color red)]. |
|
4876 |
em == #'bold+red underwave' ifTrue:[ em := Array with:#bold with:#underwave with:(#underlineColor->Color red)]. |
|
4877 |
em == #'italic+red underline' ifTrue:[ em := Array with:#italic with:#underline with:(#underlineColor->Color red)]. |
|
4878 |
em == #'italic+red underwave' ifTrue:[ em := Array with:#italic with:#underwave with:(#underlineColor->Color red)]. |
|
4879 |
||
2395 | 4880 |
currentUserPrefs at: syntaxEmphasisSelector value put:em. |
2233 | 4881 |
recolorAction value |
4882 |
]. |
|
2001 | 4883 |
syntaxColors changed:#value. "/ to force initial update of emphasis |
4884 |
box addComponent:colorMenu tabable:true. |
|
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4885 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4886 |
y := box yPosition. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4887 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4888 |
b := Button new label: (resources string:'reset to:'). |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4889 |
b action:[ |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4890 |
|resetSelector| |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4891 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4892 |
resetSelector := #( |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4893 |
#resetSyntaxColors |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4894 |
#resetSyntaxColorsGreenComments |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4895 |
#resetSyntaxColorsAllBlackExceptBadIDs |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4896 |
) at:resetList selectionIndex. |
2395 | 4897 |
currentUserPrefs perform:resetSelector. |
4898 |
syntaxColor value:(currentUserPrefs perform:syntaxColorSelector value). |
|
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4899 |
recolorAction value. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4900 |
]. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4901 |
syntaxColoringResetButton := box addComponent:b. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4902 |
box makeTabable:syntaxColoringResetButton. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4903 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4904 |
box yPosition:y. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4905 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4906 |
resetList := SelectionInList |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4907 |
with:#( |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4908 |
'default' |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4909 |
'default, but green comments' |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4910 |
'no colors, but highlight errors' |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4911 |
"/ add more here ... |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4912 |
) |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4913 |
initialSelection:1. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4914 |
resetListBox := box addComboListOn:resetList. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4915 |
box makeTabable:resetListBox. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4916 |
|
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4917 |
syntaxColoringBox enable. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4918 |
colorMenu enable. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4919 |
syntaxEmphasisesBox enable. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4920 |
syntaxColoringResetButton enable. |
2001 | 4921 |
|
4922 |
box |
|
4923 |
"/ addHelpButtonFor:'Launcher/sourceSettings.html'; |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4924 |
addAbortAndOkButtons. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4925 |
|
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4926 |
box stickAtBottomWithVariableHeight:frame. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4927 |
box stickAtBottomWithFixHeight:syntaxColoringBox. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4928 |
box stickAtBottomWithFixHeight:syntaxEmphasisesBox. |
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4929 |
box stickAtBottomWithFixHeight:colorMenu. |
2237
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4930 |
box stickAtBottomWithFixHeight:syntaxColoringResetButton left:0.0 right:0.5. |
ddd553ff2ed5
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
2234
diff
changeset
|
4931 |
box stickAtBottomWithFixHeight:resetListBox left:0.5 right:1.0. |
2001 | 4932 |
|
4933 |
"/ |
|
4934 |
"/ show the box ... |
|
4935 |
"/ |
|
2234 | 4936 |
box extent:600@400. |
2001 | 4937 |
box openModal. |
4938 |
||
4939 |
"/ |
|
4940 |
"/ update system settings |
|
4941 |
"/ |
|
4942 |
box accepted ifTrue:[ |
|
4943 |
] ifFalse: [ |
|
2194
e95ad72c0f46
added immedate selector check option
Claus Gittinger <cg@exept.de>
parents:
2165
diff
changeset
|
4944 |
(UserPreferences reset; current) declareAllFrom: oldUserPreferences |
2001 | 4945 |
]. |
4946 |
box destroy |
|
4947 |
||
4948 |
"Modified: / 16.4.1998 / 17:18:16 / ca" |
|
2234 | 4949 |
"Modified: / 7.7.1999 / 00:27:02 / cg" |
2001 | 4950 |
! ! |
4951 |
||
4952 |
!AbstractLauncherApplication class methodsFor:'documentation'! |
|
4953 |
||
4954 |
version |
|
2493 | 4955 |
^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.90 1999-12-16 20:46:14 cg Exp $' |
2001 | 4956 |
! ! |