391 |
391 |
392 "/ JV@2011-11-30: XTermView disabled as recent changes in |
392 "/ JV@2011-11-30: XTermView disabled as recent changes in |
393 "/ #startShellInSelectedWindow leads to infinite loop. |
393 "/ #startShellInSelectedWindow leads to infinite loop. |
394 "/ further investigation needed. |
394 "/ further investigation needed. |
395 |
395 |
396 "/ (OperatingSystem isUNIXlike and:[XTermView notNil]) ifTrue:[ |
396 (OperatingSystem isUNIXlike and:[XTermView notNil]) ifTrue:[ |
397 "/ scr := XTermView new. |
397 scr := XTermView new. |
398 "/ scr workingDirectory: initialDirectory. |
398 scr workingDirectory: initialDirectory. |
399 "/ ] ifFalse:[ |
399 ] ifFalse:[ |
400 VT100TerminalView isNil ifTrue:[ |
400 VT100TerminalView isNil ifTrue:[ |
401 self error:'missing: VT100TerminalView' |
401 self error:'missing: VT100TerminalView' |
402 ]. |
402 ]. |
403 scr := (HVScrollableView for:VT100TerminalView). |
403 scr := (HVScrollableView for:VT100TerminalView). |
404 scr autoHideScrollBars:false. |
404 scr autoHideScrollBars:false. |
405 scr horizontalMini:true. |
405 scr horizontalMini:true. |
406 "/ ]. |
406 ]. |
407 |
407 |
408 self window realized ifTrue:[ |
408 self window realized ifTrue:[ |
409 self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
409 self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
410 ]. |
410 ]. |
411 ^ scr |
411 ^ scr |
412 |
412 |
413 "Modified: / 08-04-2011 / 14:56:57 / cg" |
413 "Modified: / 08-04-2011 / 14:56:57 / cg" |
414 "Modified (format): / 30-11-2011 / 11:06:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
414 "Modified: / 03-04-2012 / 10:19:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
415 ! |
415 ! |
416 |
416 |
417 doKill |
417 doKill |
418 self selectedWorkspacesTextView doKill. |
418 self selectedWorkspacesTextView doKill. |
419 ! |
419 ! |
535 ]. |
535 ]. |
536 |
536 |
537 "Created: / 30-07-2013 / 09:15:05 / cg" |
537 "Created: / 30-07-2013 / 09:15:05 / cg" |
538 ! ! |
538 ! ! |
539 |
539 |
|
540 !TerminalApplication methodsFor:'startup'! |
|
541 |
|
542 startShellInSelectedWindow |
|
543 |vt| |
|
544 |
|
545 vt := self selectedWorkspacesTextView. |
|
546 (vt notNil and:[vt superView realized]) ifFalse:[ |
|
547 self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
|
548 ^ self. |
|
549 ]. |
|
550 |
|
551 vt startShellIn:initialDirectory. |
|
552 vt shellTerminateAction:[self shellFinishedInWorkspace:vt]. |
|
553 vt masterWindow:(self window). "/ to change window title |
|
554 |
|
555 "Modified: / 07-04-2011 / 09:03:55 / cg" |
|
556 "Modified: / 03-04-2012 / 10:31:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
557 ! ! |
|
558 |
540 !TerminalApplication methodsFor:'startup & release'! |
559 !TerminalApplication methodsFor:'startup & release'! |
541 |
560 |
542 initialDirectory:aDirectory |
561 initialDirectory:aDirectory |
543 initialDirectory := aDirectory |
562 initialDirectory := aDirectory |
544 ! |
563 ! |
568 shellFinishedInWorkspace:aView |
587 shellFinishedInWorkspace:aView |
569 "/ vt backgroundColor:(Color red). |
588 "/ vt backgroundColor:(Color red). |
570 aView |
589 aView |
571 cr; |
590 cr; |
572 nextPutLine:('>> shell terminated.' asText allBold colorizeAllWith:Color red). |
591 nextPutLine:('>> shell terminated.' asText allBold colorizeAllWith:Color red). |
573 ! |
|
574 |
|
575 startShellInSelectedWindow |
|
576 |vt| |
|
577 |
|
578 vt := self selectedWorkspacesTextView. |
|
579 (vt notNil and:[vt superView realized]) ifFalse:[ |
|
580 self window sensor pushUserEvent:#startShellInSelectedWindow for:self. |
|
581 ^ self. |
|
582 ]. |
|
583 |
|
584 vt startShellIn:initialDirectory. |
|
585 vt shellTerminateAction:[self shellFinishedInWorkspace:vt]. |
|
586 vt masterWindow:(self window). "/ to change window title |
|
587 |
|
588 "Modified: / 07-04-2011 / 09:03:55 / cg" |
|
589 ! ! |
592 ! ! |
590 |
593 |
591 !TerminalApplication class methodsFor:'documentation'! |
594 !TerminalApplication class methodsFor:'documentation'! |
592 |
595 |
593 version |
596 version |
594 ^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.19 2013-07-30 09:02:01 cg Exp $' |
597 ^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.20 2014-02-05 18:57:01 cg Exp $' |
595 ! |
598 ! |
596 |
599 |
597 version_CVS |
600 version_CVS |
598 ^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.19 2013-07-30 09:02:01 cg Exp $' |
601 ^ '$Header: /cvs/stx/stx/libtool/TerminalApplication.st,v 1.20 2014-02-05 18:57:01 cg Exp $' |
599 ! ! |
602 ! ! |
600 |
603 |