# HG changeset patch # User Carl Byington # Date 1402506220 25200 # Node ID a3fd10a8c0dec8c5741f739dade315256cb3818c # Parent 34ce32c4e807617680d885d48c249c042cfc163e start tn5250 integration diff -r 34ce32c4e807 -r a3fd10a8c0de src/com/five_ten_sg/connectbot/service/TerminalBridge.java --- a/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Wed Jun 11 09:55:40 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Wed Jun 11 10:03:40 2014 -0700 @@ -100,7 +100,7 @@ public Bitmap bitmap = null; public vt320 buffer = null; - private TerminalView parent = null; + public TerminalView parent = null; private final Canvas canvas = new Canvas(); private boolean disconnected = false; @@ -453,8 +453,7 @@ charHeight = (int)FloatMath.ceil(fm.descent - fm.top); // refresh any bitmap with new font size - if (parent != null) - parentChanged(parent); + if (parent != null) parentChanged(parent); for (FontSizeChangedListener ofscl : fontSizeChangedListeners) ofscl.onFontSizeChanged(size); @@ -1388,10 +1387,7 @@ dismiss(); return true; } - -// return keyListener.onKey(parent, event.getKeyCode(), event); } - return super.dispatchKeyEvent(event); } }; diff -r 34ce32c4e807 -r a3fd10a8c0de src/com/five_ten_sg/connectbot/transport/AbsTransport.java --- a/src/com/five_ten_sg/connectbot/transport/AbsTransport.java Wed Jun 11 09:55:40 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/transport/AbsTransport.java Wed Jun 11 10:03:40 2014 -0700 @@ -86,7 +86,7 @@ // play beep noise @Override public void beep() { - if (bridge.parent.isShown()) + if ((bridge.parent != null) && (bridge.parent.isShown())) manager.playBeep(); else manager.sendActivityNotification(host); @@ -237,14 +237,18 @@ return emulation; } - public vt320 getTransportBuffer() { - if (buffer == null) buffer = new vt320Default(); + protected vt320 setupTransportBuffer() { int scrollback = (host.getWantSession()) ? manager.getScrollback() : 0; buffer.setBufferSize(scrollback); buffer.setDisplay(bridge); return buffer; } + public vt320 getTransportBuffer() { + buffer = new vt320Default(); + return setupTransportBuffer(); + } + public void setLinks(TerminalManager manager, TerminalBridge bridge, HostBean host, String emulation) { this.manager = manager; this.bridge = bridge; diff -r 34ce32c4e807 -r a3fd10a8c0de src/com/five_ten_sg/connectbot/transport/TN5250.java --- a/src/com/five_ten_sg/connectbot/transport/TN5250.java Wed Jun 11 09:55:40 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java Wed Jun 11 10:03:40 2014 -0700 @@ -252,7 +252,7 @@ @Override public vt320 getTransportBuffer() { buffer = new vt320x5250(); - return super(); + return setupTransportBuffer(); }