Mercurial > 510Connectbot
changeset 425:b284b8f9e535 stable-1.9.0-8
cleanup logging
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 31 Oct 2014 17:22:05 -0700 |
parents | 09c1d3aae3f0 |
children | 9b9821808222 |
files | src/com/five_ten_sg/connectbot/service/TerminalMonitor.java src/org/tn5250j/framework/tn5250/Screen5250.java |
diffstat | 2 files changed, 3 insertions(+), 147 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 31 12:40:09 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 31 17:22:05 2014 -0700 @@ -124,7 +124,7 @@ char[] len = forceRead(1); char[] packet = forceRead(len[0]); char cmd = packet[0]; - Log.i(TAG, String.format("received %d command", (int)cmd)); + Log.i(TAG, String.format("received %s", commands[cmd])); switch (cmd) { case MONITOR_CMD_SETFIELD: @@ -445,7 +445,6 @@ } public synchronized void setField(int l, int c, char[] data, int offset) { - Log.i(TAG, "setField()"); int len = data.length - offset; char[] da = new char[len]; System.arraycopy(data, offset, da, 0, len); @@ -464,7 +463,6 @@ } public synchronized void showUrl(char [] data, int offset) { - Log.i(TAG, "setField()"); char[] da = new char[data.length - offset]; System.arraycopy(data, offset, da, 0, data.length - offset); String url = new String(da); @@ -494,7 +492,7 @@ } public synchronized void screenWatch(int l, int c, int len) { - Log.i(TAG, "screenWatch()"); + Log.i(TAG, String.format("screenWatch(line %d, col %d, len %d)", l, c, len)); start_line = l; end_line = l; start_column = c; @@ -502,7 +500,7 @@ } public synchronized void depress(int vk_key) { - Log.i(TAG, String.format("depress() %d", vk_key)); + Log.i(TAG, String.format("depress(%d)", vk_key)); Integer x = keymap.get(new Integer(vk_key)); if (x != null) buffer.keyDepressed(x, ' ', 0); @@ -518,7 +516,6 @@ public synchronized void cursorRequest() { - Log.i(TAG, "cursorRequest()"); cursorMoved(CURSOR_REQUESTED); }
--- a/src/org/tn5250j/framework/tn5250/Screen5250.java Fri Oct 31 12:40:09 2014 -0700 +++ b/src/org/tn5250j/framework/tn5250/Screen5250.java Fri Oct 31 17:22:05 2014 -0700 @@ -387,147 +387,6 @@ return sumVector; } - /** - * This will move the screen cursor based on the mouse event. - * - * I do not think the checks here for the gui characters should be here but - * will leave them here for now until we work out the interaction. This - * should be up to the gui frontend in my opinion. - * - * @param pos - */ - public boolean moveCursor(int pos) { - if (!oia.isKeyBoardLocked()) { - if (pos < 0) - return false; - - // because getRowColFromPoint returns offset of 1,1 we need to - // translate to offset 0,0 - // pos -= (numCols + 1); - int g = planes.getWhichGUI(pos); - - // lets check for hot spots - if (g >= BUTTON_LEFT && g <= BUTTON_LAST) { - StringBuffer aid = new StringBuffer(); - boolean aidFlag = true; - - switch (g) { - case BUTTON_RIGHT: - case BUTTON_MIDDLE: - while (planes.getWhichGUI(--pos) != BUTTON_LEFT) { - } - - case BUTTON_LEFT: - if (planes.getChar(pos) == 'F') { - pos++; - } - else - aidFlag = false; - - if (planes.getChar(pos + 1) != '=' - && planes.getChar(pos + 1) != '.' - && planes.getChar(pos + 1) != '/') { - Log.d(TAG, " Hotspot clicked!!! we will send characters " - + planes.getChar(pos) + " " + planes.getChar(pos + 1)); - aid.append(planes.getChar(pos)); - aid.append(planes.getChar(pos + 1)); - } - else { - Log.d(TAG, " Hotspot clicked!!! we will send character " - + planes.getChar(pos)); - aid.append(planes.getChar(pos)); - } - - break; - } - - if (aidFlag) { - switch (g) { - case BUTTON_LEFT_UP: - case BUTTON_MIDDLE_UP: - case BUTTON_RIGHT_UP: - case BUTTON_ONE_UP: - case BUTTON_SB_UP: - case BUTTON_SB_GUIDE: - sessionVT.sendAidKey(AID_ROLL_UP); - break; - - case BUTTON_LEFT_DN: - case BUTTON_MIDDLE_DN: - case BUTTON_RIGHT_DN: - case BUTTON_ONE_DN: - case BUTTON_SB_DN: - case BUTTON_SB_THUMB: - sessionVT.sendAidKey(AID_ROLL_DOWN); - break; - - case BUTTON_LEFT_EB: - case BUTTON_MIDDLE_EB: - case BUTTON_RIGHT_EB: - StringBuffer eb = new StringBuffer(); - - while (planes.getWhichGUI(pos--) != BUTTON_LEFT_EB) - ; - - while (planes.getWhichGUI(pos++) != BUTTON_RIGHT_EB) { - eb.append(planes.getChar(pos)); - } - - sessionVT.showURL(eb.toString()); - // take out the log statement when we are sure it is - // working - Log.i(TAG, "Send to external Browser: " + eb.toString()); - break; - - default: - int aidKey = Integer.parseInt(aid.toString()); - - if (aidKey >= 1 && aidKey <= 12) - sessionVT.sendAidKey(0x30 + aidKey); - - if (aidKey >= 13 && aidKey <= 24) - sessionVT.sendAidKey(0xB0 + (aidKey - 12)); - } - } - else { - if (screenFields.getCurrentField() != null) { - int xPos = screenFields.getCurrentField().startPos(); - - for (int x = 0; x < aid.length(); x++) { - // System.out.println(sr + "," + (sc + x) + " " + - // aid.charAt(x)); - planes.setChar(xPos + x , aid.charAt(x)); - } - - // System.out.println(aid); - screenFields.setCurrentFieldMDT(); - sessionVT.sendAidKey(AID_ENTER); - } - } - - // return back to the calling routine that the cursor was not moved - // but something else here was done like aid keys or the such - return false; - } - - // this is a note to not execute this code here when we - // implement - // the remain after edit function option. - // if (gui.rubberband.isAreaSelected()) { - // gui.rubberband.reset(); - // gui.repaint(); - // } else { - goto_XY(pos); - isInField(); - // return back to the calling object that the cursor was indeed - // moved with in the screen object - return true; - // } - } - - return false; - } - public void setVT(tnvt v) { sessionVT = v; }