merged in jv's chenges
authorClaus Gittinger <cg@exept.de>
Wed, 05 Feb 2014 19:57:03 +0100
changeset 13816 732c224bdfb9
parent 13815 2b090510c0b7
child 13817 92a5c6e81647
merged in jv's chenges
XTermView.st
--- a/XTermView.st	Wed Feb 05 19:57:01 2014 +0100
+++ b/XTermView.st	Wed Feb 05 19:57:03 2014 +0100
@@ -103,12 +103,18 @@
     "But hackish..."
     app := self application.
     app ifNil:[^self].
+    (app class == FileApplicationNoteBook::Terminal) ifTrue:[
+        app doClose.
+        ^self.
+    ].
     #(removeWorkspace "WorkspaceApplication"
-      doCloseApplication "FileBrowserNotebook"
       bufferMenuRemoveCurrentBuffer "NewSystemBrowser"
     ) do:[:closeSelector|
-        (app topApplication respondsTo: closeSelector) ifTrue:
-            [app topApplication perform: closeSelector]].
+        (app topApplication respondsTo: closeSelector) ifTrue: [
+            app topApplication perform: closeSelector.
+            ^self
+        ]
+    ].
 
     "Created: / 06-06-2011 / 10:04:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -138,8 +144,106 @@
     "Created: / 25-11-2010 / 12:34:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!XTermView methodsFor:'menu'!
+
+doClear
+    "reset the scroll-range etc, clear the text buffer"
+
+"/    rangeStartLine := 1.
+"/    rangeEndLine := numberOfLines.
+"/
+"/    self normal.
+"/    self clear.
+
+    "Created: / 03-04-2007 / 08:58:59 / cg"
+    "Modified: / 03-04-2012 / 10:34:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doReset
+    "reset the scroll-range; 
+     may have to reset more in the future (current font-set; color; etc)"
+
+"/    rangeStartLine := 1.
+"/    rangeEndLine := numberOfLines.
+"/
+"/    self normal.
+
+    "Modified: / 03-04-2012 / 10:34:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doSendInterrupt
+    "send an INT-signal to the shell (UNIX only)"
+    pid notNil ifTrue:[
+        OperatingSystem sendSignal:(OperatingSystem sigINT) to:pid negated.
+    ].
+
+    "Modified: / 10-06-1998 / 17:49:49 / cg"
+    "Modified: / 03-04-2012 / 10:34:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doSendKillSignal
+    "send a KILL-signal to the shell (UNIX only)"
+
+    pid notNil ifTrue:[
+        OperatingSystem sendSignal:(OperatingSystem sigKILL) to:pid negated.
+    ]
+
+    "Modified: / 03-04-2012 / 10:34:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !XTermView methodsFor:'mimicry'!
 
+defaultFileNameForFileDialog
+
+    ^nil
+
+    "Created: / 03-05-2012 / 12:29:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+lineLimit:aSmallInteger
+
+    "Nothing"
+
+    "Created: / 03-04-2012 / 10:42:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+list
+    ^nil
+
+    "Created: / 17-07-2012 / 21:11:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+modified
+
+    ^false
+
+    "Created: / 03-05-2012 / 11:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+save
+
+    Dialog warn: 'Not yet implemented for XTermView'
+
+    "Created: / 03-04-2012 / 10:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+selectionAsString
+
+    ^ (device getSelectionOwnerOf: #PRIMARY) = drawableId ifTrue:[
+        device getClipboardText:#selection for:drawableId
+    ] ifFalse:[
+        nil
+    ]
+
+    "Created: / 03-04-2012 / 10:30:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sendLine:aString
+    self halt:'please define sendLine: here'.
+
+    "Created: / 03-04-2012 / 10:33:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 shellTerminateAction: aBlock
 
     "Nothing to do"
@@ -167,12 +271,13 @@
 !
 
 xtermArgs
+
     | args |
 
     args := OrderedCollection new.
     args
         add: self xtermExecutable;
-        add: (XTermType == #rxvt ifTrue:['-embed'] ifFalse:['-into']); add:self drawableId address printString;        
+        add: (XTermType == #xterm ifTrue:['-into'] ifFalse:['-embed']); add: drawableId address printString;        
         add: '-j';
         add: '-font'; add: (device fullFontNameOf: (font fontId));
         add: '-fg'; add: 'white'"(self xcolorNameFor: foreground)";
@@ -183,9 +288,9 @@
         add: '-tn'; add: 'xterm'
     ].
 
-    ^ args asArray
+    ^args asArray
 
-    "Modified: / 10-06-2011 / 19:51:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-09-2013 / 00:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 xtermExecutable
@@ -248,7 +353,7 @@
 
 isTextView
 
-    ^false
+    ^true
 
     "Created: / 13-09-2011 / 11:22:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -256,11 +361,11 @@
 !XTermView class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/XTermView.st,v 1.4 2014-02-04 10:06:57 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/XTermView.st,v 1.5 2014-02-05 18:57:03 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: XTermView.st,v 1.4 2014-02-04 10:06:57 stefan Exp $'
+    ^ '$Id: XTermView.st,v 1.5 2014-02-05 18:57:03 cg Exp $'
 ! !