Mercurial > 510Connectbot
changeset 140:4fe73e73d4d7
fill vt320 buffer from tn5250 buffer when font size shrinks
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 20 Jun 2014 19:08:47 -0700 |
parents | c2fa8ae31cfa |
children | 13cea57ac61e |
files | src/com/five_ten_sg/connectbot/transport/TN5250.java src/org/tn5250j/framework/tn5250/Screen5250.java |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java Fri Jun 20 18:57:11 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java Fri Jun 20 19:08:47 2014 -0700 @@ -260,6 +260,7 @@ handler = new tnvt(screen52, true, false, bridge, manager); screen52.setVT(handler); screen52.setBuffer(buffer); + bridge.addFontSizeChangedListener(screen52); connected = handler.connect(host, homeDirectory, buffer); if (connected) bridge.onConnected(); } @@ -327,6 +328,7 @@ public void close() { handler.disconnect(); connected = false; + bridge.removeFontSizeChangedListener(screen52); bridge.dispatchDisconnect(false); }
--- a/src/org/tn5250j/framework/tn5250/Screen5250.java Fri Jun 20 18:57:11 2014 -0700 +++ b/src/org/tn5250j/framework/tn5250/Screen5250.java Fri Jun 20 19:08:47 2014 -0700 @@ -38,9 +38,10 @@ import android.util.Log; import de.mud.terminal.VDUBuffer; import de.mud.terminal.vt320; - - -public class Screen5250 { +import com.five_ten_sg.connectbot.service.FontSizeChangedListener; + + +public class Screen5250 implements FontSizeChangedListener { private static final String TAG = "Screen5250"; private ScreenFields screenFields; private int lastAttr; @@ -3778,6 +3779,10 @@ updateDirty(); } + public void onFontSizeChanged(float size) { + fireScreenChanged(0, 0, numRows-1, numCols-1); + } + /** * repaint part of the screen *