author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 01 Aug 2013 10:27:56 +0100 | |
branch | jv |
changeset 13289 | cc75e3cd0362 |
parent 13250 | 0decde6c459d |
parent 13260 | c3f318979431 |
child 15566 | 184cea584be5 |
permissions | -rw-r--r-- |
5296 | 1 |
" |
2 |
COPYRIGHT (c) 2001 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 |
"{ Package: 'stx:libtool' }" |
|
13 |
||
5305 | 14 |
MultiViewToolApplication subclass:#TerminalApplication |
13257 | 15 |
instanceVariableNames:'initialDirectory keepAlive keepAliveProcess' |
5296 | 16 |
classVariableNames:'' |
17 |
poolDictionaries:'' |
|
18 |
category:'Interface-Smalltalk' |
|
19 |
! |
|
20 |
||
21 |
!TerminalApplication class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2001 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
5297 | 39 |
A simple wrapper around a Terminal-View, adding a pullDown menu. |
5296 | 40 |
|
41 |
[author:] |
|
42 |
Claus Gittinger |
|
43 |
" |
|
44 |
! ! |
|
45 |
||
46 |
!TerminalApplication class methodsFor:'interface specs'! |
|
47 |
||
48 |
windowSpec |
|
49 |
"This resource specification was automatically generated |
|
50 |
by the UIPainter of ST/X." |
|
51 |
||
52 |
"Do not manually edit this!! If it is corrupted, |
|
53 |
the UIPainter may not be able to read the specification." |
|
54 |
||
55 |
" |
|
56 |
UIPainter new openOnClass:TerminalApplication andSelector:#windowSpec |
|
57 |
TerminalApplication new openInterface:#windowSpec |
|
58 |
TerminalApplication open |
|
59 |
" |
|
60 |
||
61 |
<resource: #canvas> |
|
62 |
||
63 |
^ |
|
64 |
#(#FullSpec |
|
65 |
#name: #windowSpec |
|
66 |
#window: |
|
67 |
#(#WindowSpec |
|
68 |
#label: 'Terminal' |
|
69 |
#name: 'Terminal' |
|
70 |
#min: #(#Point 10 10) |
|
71 |
#bounds: #(#Rectangle 13 23 445 264) |
|
72 |
#menu: #mainMenu |
|
73 |
) |
|
74 |
#component: |
|
75 |
#(#SpecCollection |
|
76 |
#collection: #( |
|
77 |
#(#NoteBookViewSpec |
|
78 |
#name: 'NoteBook1' |
|
79 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
80 |
#model: #selectedWorkspaceIndexHolder |
|
81 |
#menu: #tabList |
|
82 |
#useIndex: true |
|
83 |
#accessTabMenuAction: #tabMenuAt: |
|
84 |
#canvas: #workspaceHolder |
|
85 |
#canvasInset: 0 |
|
86 |
#canvasFrameLevel: 0 |
|
87 |
#keepCanvasAlive: true |
|
88 |
#tabLevel: 1 |
|
89 |
) |
|
90 |
) |
|
91 |
||
92 |
) |
|
93 |
) |
|
94 |
! ! |
|
95 |
||
96 |
!TerminalApplication class methodsFor:'menu specs'! |
|
97 |
||
98 |
mainMenu |
|
99 |
"This resource specification was automatically generated |
|
100 |
by the MenuEditor of ST/X." |
|
101 |
||
102 |
"Do not manually edit this!! If it is corrupted, |
|
103 |
the MenuEditor may not be able to read the specification." |
|
104 |
||
13214 | 105 |
|
5296 | 106 |
" |
13214 | 107 |
MenuEditor new openOnClass:TerminalApplication andSelector:#mainMenu |
108 |
(Menu new fromLiteralArrayEncoding:(TerminalApplication mainMenu)) startUp |
|
5296 | 109 |
" |
110 |
||
111 |
<resource: #menu> |
|
112 |
||
113 |
^ |
|
13214 | 114 |
#(Menu |
115 |
( |
|
116 |
(MenuItem |
|
117 |
label: 'File' |
|
118 |
submenu: |
|
119 |
(Menu |
|
120 |
( |
|
121 |
(MenuItem |
|
122 |
label: 'New Shell' |
|
123 |
itemValue: newWorkspace |
|
5296 | 124 |
) |
13214 | 125 |
(MenuItem |
126 |
label: '-' |
|
127 |
) |
|
128 |
(MenuItem |
|
129 |
label: 'Playback File...' |
|
130 |
itemValue: menuPlayback |
|
5296 | 131 |
) |
13214 | 132 |
(MenuItem |
133 |
label: '-' |
|
134 |
) |
|
135 |
(MenuItem |
|
136 |
label: 'Save As...' |
|
137 |
itemValue: menuSaveAs |
|
5296 | 138 |
) |
13214 | 139 |
(MenuItem |
140 |
enabled: hasMultipleBuffersHolder |
|
141 |
label: 'Save all As...' |
|
142 |
itemValue: menuSaveAllAs |
|
5296 | 143 |
) |
13214 | 144 |
(MenuItem |
145 |
label: '-' |
|
146 |
) |
|
147 |
(MenuItem |
|
148 |
label: 'Exit' |
|
149 |
itemValue: closeRequest |
|
5296 | 150 |
) |
13214 | 151 |
) |
152 |
nil |
|
153 |
nil |
|
154 |
) |
|
155 |
) |
|
156 |
(MenuItem |
|
157 |
label: 'View' |
|
158 |
submenu: |
|
159 |
(Menu |
|
160 |
( |
|
161 |
(MenuItem |
|
162 |
label: 'Normal' |
|
163 |
itemValue: setNormalDisplayMode |
|
5296 | 164 |
) |
13214 | 165 |
(MenuItem |
166 |
label: 'Reverse' |
|
167 |
itemValue: setReverseDisplayMode |
|
5296 | 168 |
) |
13214 | 169 |
(MenuItem |
170 |
label: 'Green' |
|
171 |
itemValue: setGreenDisplayMode |
|
5296 | 172 |
) |
13217 | 173 |
(MenuItem |
174 |
label: 'Red' |
|
175 |
itemValue: setRedDisplayMode |
|
176 |
) |
|
177 |
(MenuItem |
|
178 |
label: '-' |
|
179 |
) |
|
180 |
(MenuItem |
|
181 |
label: 'Ignore Text Color Commands' |
|
182 |
indication: noColors: |
|
183 |
) |
|
5296 | 184 |
) |
185 |
nil |
|
186 |
nil |
|
187 |
) |
|
188 |
) |
|
13214 | 189 |
(MenuItem |
190 |
label: 'Buffers' |
|
191 |
nameKey: Buffer |
|
192 |
submenu: |
|
193 |
(Menu |
|
194 |
( |
|
195 |
(MenuItem |
|
196 |
label: 'Add Buffer' |
|
197 |
itemValue: addWorkspace |
|
5296 | 198 |
) |
13214 | 199 |
(MenuItem |
200 |
label: 'Rename...' |
|
201 |
itemValue: renameWorkspace |
|
5296 | 202 |
) |
13214 | 203 |
(MenuItem |
204 |
label: '-' |
|
5296 | 205 |
) |
13214 | 206 |
(MenuItem |
207 |
enabled: canRemoveWorkspace |
|
208 |
label: 'Remove Buffer' |
|
209 |
itemValue: removeWorkspace |
|
5296 | 210 |
) |
211 |
) |
|
212 |
nil |
|
213 |
nil |
|
214 |
) |
|
215 |
) |
|
13214 | 216 |
(MenuItem |
217 |
label: 'Edit' |
|
218 |
submenu: |
|
219 |
(Menu |
|
220 |
( |
|
221 |
(MenuItem |
|
222 |
enabled: hasSelectionInActiveWorkspace |
|
223 |
label: 'Copy' |
|
224 |
itemValue: copySelection |
|
5296 | 225 |
) |
13214 | 226 |
(MenuItem |
227 |
label: 'Paste' |
|
228 |
itemValue: paste |
|
5296 | 229 |
) |
13214 | 230 |
(MenuItem |
231 |
label: '-' |
|
5296 | 232 |
) |
13214 | 233 |
(MenuItem |
234 |
label: 'Select All' |
|
235 |
itemValue: selectAll |
|
5296 | 236 |
) |
237 |
) |
|
238 |
nil |
|
239 |
nil |
|
240 |
) |
|
241 |
) |
|
13214 | 242 |
(MenuItem |
243 |
label: 'Shell' |
|
244 |
submenu: |
|
245 |
(Menu |
|
246 |
( |
|
247 |
(MenuItem |
|
248 |
label: 'Interrupt' |
|
249 |
itemValue: doSendInterrupt |
|
5296 | 250 |
) |
13214 | 251 |
(MenuItem |
252 |
label: 'Kill' |
|
253 |
itemValue: doSendKillSignal |
|
5296 | 254 |
) |
13214 | 255 |
(MenuItem |
256 |
label: '-' |
|
5296 | 257 |
) |
13214 | 258 |
(MenuItem |
13244 | 259 |
label: 'Send "~." (ssh/telnet quit)' |
260 |
itemValue: doSendTildeStop |
|
261 |
) |
|
262 |
(MenuItem |
|
13260 | 263 |
label: 'Keep Connection Alive' |
13257 | 264 |
indication: keepSSHConnectionAliveHolder |
265 |
) |
|
266 |
(MenuItem |
|
13244 | 267 |
label: '-' |
268 |
) |
|
269 |
(MenuItem |
|
13214 | 270 |
label: 'Reset Terminal' |
271 |
itemValue: doReset |
|
5296 | 272 |
) |
273 |
) |
|
274 |
nil |
|
275 |
nil |
|
276 |
) |
|
277 |
) |
|
13214 | 278 |
(MenuItem |
279 |
label: 'Help' |
|
280 |
startGroup: right |
|
281 |
submenu: |
|
282 |
(Menu |
|
283 |
( |
|
284 |
(MenuItem |
|
285 |
label: 'Documentation' |
|
286 |
itemValue: openDocumentation |
|
5296 | 287 |
) |
13214 | 288 |
(MenuItem |
289 |
label: '-' |
|
5296 | 290 |
) |
13214 | 291 |
(MenuItem |
292 |
label: 'About this Application...' |
|
293 |
itemValue: openAboutThisApplication |
|
5296 | 294 |
) |
295 |
) |
|
296 |
nil |
|
297 |
nil |
|
298 |
) |
|
299 |
) |
|
300 |
) |
|
301 |
nil |
|
302 |
nil |
|
303 |
) |
|
13260 | 304 |
|
305 |
"Modified: / 30-07-2013 / 11:01:18 / cg" |
|
5296 | 306 |
! |
307 |
||
308 |
tabMenu |
|
309 |
"This resource specification was automatically generated |
|
310 |
by the MenuEditor of ST/X." |
|
311 |
||
312 |
"Do not manually edit this!! If it is corrupted, |
|
313 |
the MenuEditor may not be able to read the specification." |
|
314 |
||
315 |
" |
|
316 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu |
|
317 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp |
|
318 |
" |
|
319 |
||
320 |
<resource: #menu> |
|
321 |
||
322 |
^ |
|
323 |
#(#Menu |
|
324 |
#( |
|
325 |
#(#MenuItem |
|
326 |
#label: 'Add Buffer' |
|
327 |
#translateLabel: true |
|
328 |
"/ #triggerOnDown: true |
|
329 |
#value: #addWorkspace |
|
330 |
) |
|
331 |
#(#MenuItem |
|
332 |
#label: 'Rename...' |
|
333 |
#translateLabel: true |
|
334 |
"/ #triggerOnDown: true |
|
335 |
#value: #renameWorkspace: |
|
336 |
) |
|
337 |
#(#MenuItem |
|
338 |
#label: '-' |
|
339 |
) |
|
340 |
#(#MenuItem |
|
341 |
#label: 'Remove Buffer' |
|
342 |
#translateLabel: true |
|
343 |
"/ #triggerOnDown: true |
|
344 |
#value: #removeWorkspace: |
|
345 |
#enabled: #canRemoveWorkspace: |
|
346 |
) |
|
347 |
) |
|
348 |
nil |
|
349 |
nil |
|
350 |
) |
|
351 |
! ! |
|
352 |
||
353 |
!TerminalApplication class methodsFor:'special startup'! |
|
354 |
||
5300 | 355 |
openIn:aDirectory |
356 |
"launch a new terminal in some directory" |
|
357 |
||
358 |
|terminal| |
|
5296 | 359 |
|
5300 | 360 |
terminal := self new. |
361 |
terminal initialDirectory:aDirectory. |
|
362 |
terminal open. |
|
363 |
^ terminal |
|
5296 | 364 |
|
365 |
" |
|
5300 | 366 |
TerminalApplication open |
367 |
TerminalApplication openIn:'/etc' |
|
5296 | 368 |
" |
369 |
! ! |
|
370 |
||
13257 | 371 |
!TerminalApplication methodsFor:'aspects'! |
372 |
||
373 |
keepSSHConnectionAliveHolder |
|
374 |
keepAlive isNil ifTrue:[ |
|
375 |
keepAlive := false asValue. |
|
376 |
keepAlive onChangeSend:#keepSSHConnectionAliveHolderChanged to:self. |
|
377 |
]. |
|
378 |
^ keepAlive |
|
379 |
||
380 |
"Created: / 30-07-2013 / 07:51:59 / cg" |
|
381 |
! ! |
|
382 |
||
5296 | 383 |
!TerminalApplication methodsFor:'menu-actions'! |
384 |
||
385 |
addWorkspace |
|
386 |
self addWindow:(self createWorkspace) named:'Terminal%1' |
|
387 |
! |
|
388 |
||
389 |
createWorkspace |
|
390 |
|scr| |
|
391 |
||
10937 | 392 |
"/ JV@2011-11-30: XTermView disabled as recent changes in |
393 |
"/ #startShellInSelectedWindow leads to infinite loop. |
|
394 |
"/ further investigation needed. |
|
9812 | 395 |
|
12216
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
396 |
(OperatingSystem isUNIXlike and:[XTermView notNil]) ifTrue:[ |
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
397 |
scr := XTermView new. |
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
398 |
scr workingDirectory: initialDirectory. |
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
399 |
] ifFalse:[ |
10937 | 400 |
VT100TerminalView isNil ifTrue:[ |
401 |
self error:'missing: VT100TerminalView' |
|
402 |
]. |
|
10253 | 403 |
scr := (HVScrollableView for:VT100TerminalView). |
404 |
scr autoHideScrollBars:false. |
|
405 |
scr horizontalMini:true. |
|
12216
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
406 |
]. |
10253 | 407 |
|
5296 | 408 |
self window realized ifTrue:[ |
409 |
self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
|
410 |
]. |
|
411 |
^ scr |
|
9812 | 412 |
|
413 |
"Modified: / 08-04-2011 / 14:56:57 / cg" |
|
12216
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
414 |
"Modified: / 03-04-2012 / 10:19:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5296 | 415 |
! |
416 |
||
417 |
doKill |
|
418 |
self selectedWorkspacesTextView doKill. |
|
419 |
! |
|
420 |
||
421 |
doReset |
|
422 |
self selectedWorkspacesTextView doReset. |
|
423 |
! |
|
424 |
||
425 |
doSendInterrupt |
|
426 |
self selectedWorkspacesTextView doSendInterrupt. |
|
427 |
! |
|
428 |
||
429 |
doSendKillSignal |
|
430 |
self selectedWorkspacesTextView doSendKillSignal. |
|
431 |
! |
|
432 |
||
13244 | 433 |
doSendTildeStop |
434 |
self selectedWorkspacesTextView send:'~.'. |
|
435 |
||
436 |
"Created: / 29-07-2013 / 18:20:36 / cg" |
|
437 |
! |
|
438 |
||
13257 | 439 |
keepSSHConnectionAliveHolderChanged |
440 |
keepAlive value ifTrue:[ |
|
441 |
self startKeepAliveProcess |
|
442 |
] ifFalse:[ |
|
443 |
self stopKeepAliveProcess |
|
444 |
] |
|
445 |
||
446 |
"Created: / 30-07-2013 / 07:53:12 / cg" |
|
447 |
! |
|
448 |
||
5296 | 449 |
menuPlayback |
450 |
|file suff| |
|
451 |
||
452 |
suff := 'sh'. |
|
453 |
||
454 |
OperatingSystem isMSDOSlike ifTrue:[ suff := 'bat' ]. |
|
455 |
file := Dialog requestFileName:'Playback file' default:('file.',suff) pattern:('*.',suff). |
|
456 |
file size > 0 ifTrue:[ |
|
457 |
self playbackFile:file |
|
458 |
] |
|
459 |
! |
|
460 |
||
13217 | 461 |
noColors |
462 |
^ self selectedWorkspacesTextView noColors |
|
463 |
! |
|
464 |
||
465 |
noColors:aBoolean |
|
466 |
self selectedWorkspacesTextView noColors:aBoolean. |
|
467 |
! |
|
468 |
||
5296 | 469 |
openDocumentation |
470 |
"opens the documentation file" |
|
471 |
||
5351 | 472 |
self openHTMLDocument: 'tools/misc/TOP.html#TERMINAL' |
5296 | 473 |
! |
474 |
||
475 |
playbackFile:aFileName |
|
476 |
|file ws| |
|
477 |
||
478 |
file := aFileName asFilename. |
|
479 |
file exists ifFalse:[ |
|
480 |
Dialog warn:(resources string:'File %1 does not exist.' with:file asString). |
|
481 |
^ self |
|
482 |
]. |
|
483 |
||
484 |
ws := self selectedWorkspacesTextView. |
|
485 |
file readingLinesDo:[:eachLine | ws sendLine:eachLine] |
|
486 |
. |
|
13214 | 487 |
! |
488 |
||
489 |
setGreenDisplayMode |
|
490 |
self selectedWorkspacesTextView setGreenDisplayMode. |
|
491 |
! |
|
492 |
||
493 |
setNormalDisplayMode |
|
494 |
self selectedWorkspacesTextView setNormalDisplayMode. |
|
495 |
! |
|
496 |
||
13217 | 497 |
setRedDisplayMode |
498 |
self selectedWorkspacesTextView setRedDisplayMode. |
|
499 |
! |
|
500 |
||
13214 | 501 |
setReverseDisplayMode |
502 |
self selectedWorkspacesTextView setReverseDisplayMode. |
|
5296 | 503 |
! ! |
504 |
||
505 |
!TerminalApplication methodsFor:'private'! |
|
506 |
||
507 |
isModifiedWorkspace:aView |
|
508 |
^ false |
|
13257 | 509 |
! |
510 |
||
511 |
startKeepAliveProcess |
|
512 |
"keep alive, by sending a return from time to time. |
|
513 |
Raise to top, if connection is lost" |
|
514 |
||
515 |
keepAliveProcess isNil ifTrue:[ |
|
516 |
keepAliveProcess := |
|
517 |
[ |
|
518 |
[true] whileTrue:[ |
|
13259 | 519 |
self selectedWorkspacesTextView sendCR:''. |
13257 | 520 |
Delay waitForSeconds:30. |
521 |
]. |
|
522 |
] newProcess. |
|
523 |
keepAliveProcess resume. |
|
524 |
]. |
|
525 |
||
526 |
"Created: / 30-07-2013 / 09:14:36 / cg" |
|
527 |
! |
|
528 |
||
529 |
stopKeepAliveProcess |
|
530 |
|p| |
|
531 |
||
532 |
(p := keepAliveProcess) notNil ifTrue:[ |
|
533 |
keepAliveProcess := nil. |
|
534 |
p terminate |
|
535 |
]. |
|
536 |
||
537 |
"Created: / 30-07-2013 / 09:15:05 / cg" |
|
5296 | 538 |
! ! |
539 |
||
540 |
!TerminalApplication methodsFor:'startup'! |
|
541 |
||
13289
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
542 |
startShellInSelectedWindow |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
543 |
|vt| |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
544 |
|
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
545 |
vt := self selectedWorkspacesTextView. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
546 |
(vt notNil and:[vt superView realized]) ifFalse:[ |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
547 |
self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
548 |
^ self. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
549 |
]. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
550 |
|
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
551 |
vt startShellIn:initialDirectory. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
552 |
vt shellTerminateAction:[self shellFinishedInWorkspace:vt]. |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
553 |
vt masterWindow:(self window). "/ to change window title |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
554 |
|
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
555 |
"Modified: / 07-04-2011 / 09:03:55 / cg" |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
556 |
"Modified: / 03-04-2012 / 10:31:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
557 |
! ! |
cc75e3cd0362
Merged 90f5185cb746 and a7c09789affb (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
558 |
|
13257 | 559 |
!TerminalApplication methodsFor:'startup & release'! |
5296 | 560 |
|
5300 | 561 |
initialDirectory:aDirectory |
562 |
initialDirectory := aDirectory |
|
563 |
! |
|
564 |
||
5299 | 565 |
postBuildWith:aBuilder |
566 |
|w h| |
|
567 |
||
568 |
super postBuildWith:aBuilder. |
|
569 |
||
570 |
w := self window width max:(workspaces first preferredExtent x). |
|
571 |
h := builder menuBar height + (workspaces first preferredExtent y). |
|
572 |
self window extent:(w@h). |
|
573 |
! |
|
574 |
||
5296 | 575 |
postOpenWith:aBuilder |
576 |
self startShellInSelectedWindow. |
|
577 |
super postOpenWith:aBuilder |
|
578 |
! |
|
579 |
||
13257 | 580 |
release |
581 |
self stopKeepAliveProcess. |
|
582 |
super release. |
|
583 |
||
584 |
"Created: / 30-07-2013 / 07:54:16 / cg" |
|
585 |
! |
|
586 |
||
5305 | 587 |
shellFinishedInWorkspace:aView |
588 |
"/ vt backgroundColor:(Color red). |
|
589 |
aView |
|
590 |
cr; |
|
591 |
nextPutLine:('>> shell terminated.' asText allBold colorizeAllWith:Color red). |
|
5296 | 592 |
! ! |
593 |
||
594 |
!TerminalApplication class methodsFor:'documentation'! |
|
595 |
||
13217 | 596 |
version |
13260 | 597 |
^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.19 2013-07-30 09:02:01 cg Exp $' |
13217 | 598 |
! |
599 |
||
9812 | 600 |
version_CVS |
13260 | 601 |
^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.19 2013-07-30 09:02:01 cg Exp $' |
12144 | 602 |
! |
603 |
||
12650
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12216
diff
changeset
|
604 |
version_HG |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12216
diff
changeset
|
605 |
|
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12216
diff
changeset
|
606 |
^ '$Changeset: <not expanded> $' |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12216
diff
changeset
|
607 |
! |
e0f607754b9a
Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12216
diff
changeset
|
608 |
|
12144 | 609 |
version_SVN |
12216
5698c277f043
- Improvements in FileBrowserV2/V3
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12201
diff
changeset
|
610 |
^ '$Id: TerminalApplication.st 7963 2012-04-03 12:32:03Z vranyj1 $' |
5296 | 611 |
! ! |
13135 | 612 |