9 "{ Package: 'jv:vdb' }" |
9 "{ Package: 'jv:vdb' }" |
10 |
10 |
11 "{ NameSpace: Smalltalk }" |
11 "{ NameSpace: Smalltalk }" |
12 |
12 |
13 AbstractSettingsApplication subclass:#VDBSettingsApplication |
13 AbstractSettingsApplication subclass:#VDBSettingsApplication |
14 instanceVariableNames:'infoPanel vdbPrettyPrintingEnabled vdbFrameFiltersEnabled' |
14 instanceVariableNames:'infoPanel vdbPrettyPrintingEnabled vdbFrameFiltersEnabled |
|
15 gdbExecutable' |
15 classVariableNames:'' |
16 classVariableNames:'' |
16 poolDictionaries:'' |
17 poolDictionaries:'' |
17 category:'VDB-UI-Others' |
18 category:'VDB-UI-Others' |
18 ! |
19 ! |
19 |
20 |
48 |
49 |
49 "Created: / 23-06-2005 / 09:27:10 / masca" |
50 "Created: / 23-06-2005 / 09:27:10 / masca" |
50 "Modified: / 10-04-2018 / 16:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
51 "Modified: / 10-04-2018 / 16:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
51 ! ! |
52 ! ! |
52 |
53 |
|
54 !VDBSettingsApplication class methodsFor:'help specs'! |
|
55 |
|
56 helpSpec |
|
57 "This resource specification was automatically generated |
|
58 by the UIHelpTool of ST/X." |
|
59 |
|
60 "Do not manually edit this!! If it is corrupted, |
|
61 the UIHelpTool may not be able to read the specification." |
|
62 |
|
63 " |
|
64 UIHelpTool openOnClass:VDBSettingsApplication |
|
65 " |
|
66 |
|
67 <resource: #help> |
|
68 |
|
69 ^ super helpSpec addPairsFrom:#( |
|
70 |
|
71 #ExecutableLabel |
|
72 'Path to GDB executable. If left empty, system GDB is used.' |
|
73 |
|
74 ) |
|
75 ! ! |
|
76 |
53 !VDBSettingsApplication class methodsFor:'interface specs'! |
77 !VDBSettingsApplication class methodsFor:'interface specs'! |
54 |
78 |
55 windowSpec |
79 windowSpec |
56 "This resource specification was automatically generated |
80 "This resource specification was automatically generated |
57 by the UIPainter of ST/X." |
81 by the UIPainter of ST/X." |
122 horizontalSpace: 3 |
146 horizontalSpace: 3 |
123 verticalSpace: 3 |
147 verticalSpace: 3 |
124 component: |
148 component: |
125 (SpecCollection |
149 (SpecCollection |
126 collection: ( |
150 collection: ( |
|
151 (ViewSpec |
|
152 name: 'Panel1' |
|
153 uuid: '7628c0d0-c755-11e8-8f9c-0021ccd5e3d3' |
|
154 component: |
|
155 (SpecCollection |
|
156 collection: ( |
|
157 (LabelSpec |
|
158 label: 'GDB executable:' |
|
159 name: 'ExecutableLabel' |
|
160 layout: (LayoutFrame 5 0 0 0 130 0 25 0) |
|
161 activeHelpKey: ExecutableLabel |
|
162 uuid: '7628c0d1-c755-11e8-8f9c-0021ccd5e3d3' |
|
163 translateLabel: true |
|
164 adjust: left |
|
165 ) |
|
166 (FilenameInputFieldSpec |
|
167 name: 'Executable' |
|
168 layout: (LayoutFrame 135 0 0 0 -100 1 0 1) |
|
169 uuid: '7628c0d2-c755-11e8-8f9c-0021ccd5e3d3' |
|
170 model: gdbExecutable |
|
171 immediateAccept: true |
|
172 acceptOnPointerLeave: true |
|
173 emptyFieldReplacementText: 'Autodetect' |
|
174 ) |
|
175 (ActionButtonSpec |
|
176 label: 'Browse' |
|
177 name: 'BrowseButton' |
|
178 layout: (LayoutFrame -100 1 0 0 -8 1 0 1) |
|
179 uuid: '7628c0d3-c755-11e8-8f9c-0021ccd5e3d3' |
|
180 translateLabel: true |
|
181 model: doSelectExecutable |
|
182 ) |
|
183 ) |
|
184 |
|
185 ) |
|
186 extent: (Point 695 25) |
|
187 ) |
|
188 (ViewSpec |
|
189 name: 'Spacer' |
|
190 uuid: '7628c0d4-c755-11e8-8f9c-0021ccd5e3d3' |
|
191 extent: (Point 695 15) |
|
192 ) |
127 (CheckBoxSpec |
193 (CheckBoxSpec |
128 label: 'Enable Pretty Printers' |
194 label: 'Enable Pretty Printers' |
129 name: 'EnablePrettyPrinters' |
195 name: 'EnablePrettyPrinters' |
130 uuid: '10c10303-3cd7-11e8-882f-0021ccd5e3d3' |
196 uuid: '10c10303-3cd7-11e8-882f-0021ccd5e3d3' |
131 model: vdbPrettyPrintingEnabled |
197 model: vdbPrettyPrintingEnabled |
148 |
214 |
149 ) |
215 ) |
150 ) |
216 ) |
151 ! ! |
217 ! ! |
152 |
218 |
|
219 !VDBSettingsApplication methodsFor:'actions'! |
|
220 |
|
221 doSelectExecutable |
|
222 | guess executable | |
|
223 |
|
224 guess := self gdbExecutable value asNilIfEmpty. |
|
225 guess isNil ifTrue:[ |
|
226 guess := GDBProcess gdbExecutable |
|
227 ]. |
|
228 [ guess notNil and:[ (guess := guess asFilename) exists not ] ] whileTrue:[ |
|
229 | p | |
|
230 |
|
231 p := guess directory. |
|
232 (p notNil and:[ p pathName = guess pathName ]) ifTrue:[ |
|
233 p := nil. |
|
234 ]. |
|
235 guess := p. |
|
236 ]. |
|
237 guess isNil ifTrue:[ |
|
238 guess := GDBProcess gdbExecutable |
|
239 ]. |
|
240 executable := Dialog requestFileName:(resources string:'Select GDB executable') default: guess ifFail:[ ^ self ]. |
|
241 self infoPanel hide. |
|
242 (executable includes: Character space) ifTrue:[ |
|
243 executable := '"' , executable , '"'. |
|
244 ]. |
|
245 self gdbExecutable value: executable |
|
246 |
|
247 "Created: / 03-10-2018 / 22:46:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
248 ! ! |
|
249 |
153 !VDBSettingsApplication methodsFor:'aspects'! |
250 !VDBSettingsApplication methodsFor:'aspects'! |
154 |
251 |
155 aspects |
252 aspects |
156 ^ #(vdbPrettyPrintingEnabled vdbFrameFiltersEnabled) |
253 ^ #(gdbExecutable vdbPrettyPrintingEnabled vdbFrameFiltersEnabled) |
157 |
254 |
158 "Created: / 10-04-2018 / 16:53:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
255 "Created: / 10-04-2018 / 16:53:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
256 "Modified: / 03-10-2018 / 22:29:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
257 ! |
|
258 |
|
259 gdbExecutable |
|
260 <resource: #uiAspect> |
|
261 |
|
262 "automatically generated by UIPainter ..." |
|
263 |
|
264 "*** the code below creates a default model when invoked." |
|
265 "*** (which may not be the one you wanted)" |
|
266 "*** Please change as required and accept it in the browser." |
|
267 "*** (and replace this comment by something more useful ;-)" |
|
268 |
|
269 gdbExecutable isNil ifTrue:[ |
|
270 gdbExecutable := ValueHolder new. |
|
271 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
272 "/ gdbExecutable addDependent:self. |
|
273 "/ gdbExecutable onChangeSend:#gdbExecutableChanged to:self. |
|
274 ]. |
|
275 ^ gdbExecutable. |
159 ! |
276 ! |
160 |
277 |
161 infoPanel |
278 infoPanel |
162 infoPanel isNil ifTrue:[ |
279 infoPanel isNil ifTrue:[ |
163 infoPanel := Tools::InlineMessageDialog new. |
280 infoPanel := Tools::InlineMessageDialog new. |
207 ^ vdbPrettyPrintingEnabled. |
324 ^ vdbPrettyPrintingEnabled. |
208 |
325 |
209 "Modified: / 10-04-2018 / 16:53:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
326 "Modified: / 10-04-2018 / 16:53:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
210 ! ! |
327 ! ! |
211 |
328 |
|
329 !VDBSettingsApplication methodsFor:'protocol'! |
|
330 |
|
331 basicSaveSettings |
|
332 self gdbExecutable value = '' ifTrue:[ |
|
333 self gdbExecutable setValue: nil |
|
334 ]. |
|
335 super basicSaveSettings. |
|
336 |
|
337 "Created: / 04-10-2018 / 09:46:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
338 ! ! |
|
339 |
|
340 !VDBSettingsApplication class methodsFor:'documentation'! |
|
341 |
|
342 version_HG |
|
343 |
|
344 ^ '$Changeset: <not expanded> $' |
|
345 ! ! |
|
346 |
212 |
347 |
213 VDBSettingsApplication initialize! |
348 VDBSettingsApplication initialize! |