# HG changeset patch # User sugi # Date 1398857422 -32400 # Node ID 432dac0b9dae3210ca4447c82c4035503bc93d25 # Parent c063d32fd983c51b7e5d9eb0d9593d30f7044736 delete Share Screen pop up in display mode. diff -r c063d32fd983 -r 432dac0b9dae build.gradle --- a/build.gradle Wed Apr 30 18:19:44 2014 +0900 +++ b/build.gradle Wed Apr 30 20:30:22 2014 +0900 @@ -1,8 +1,8 @@ apply plugin:'java' apply plugin: 'eclipse' -sourceCompatibility = 1.6 -targetCompatibility = 1.6 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 version = '2.7.2' project.ext.baseName = 'tightvnc-jviewer' diff -r c063d32fd983 -r 432dac0b9dae src/main/java/com/glavsoft/rfb/protocol/Protocol.java --- a/src/main/java/com/glavsoft/rfb/protocol/Protocol.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/Protocol.java Wed Apr 30 20:30:22 2014 +0900 @@ -37,14 +37,9 @@ import com.glavsoft.rfb.protocol.state.ProtocolState; import com.glavsoft.transport.Reader; import com.glavsoft.transport.Writer; -import com.glavsoft.viewer.swing.ClipboardControllerImpl; -import com.glavsoft.viewer.swing.Surface; - import java.util.logging.Logger; import jp.ac.u_ryukyu.treevnc.MyRfbProto; -import jp.ac.u_ryukyu.treevnc.server.MyRfbProtoProxy; -import jp.ac.u_ryukyu.treevnc.server.VncProxyService; public class Protocol implements ProtocolContext, IChangeSettingsListener { private ProtocolState state; diff -r c063d32fd983 -r 432dac0b9dae src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Wed Apr 30 20:30:22 2014 +0900 @@ -292,8 +292,16 @@ in.readBytes(b); } + byte initData[] = {7, -128, 4, 56, 32, 24, 0, 1, 0, -1, 0, -1, 0, -1, 16, 8, 0, 0, 0, 0, 0, 0, 0, 7, 102, 105, 114, 101, 102, 108, 121}; private void sendInitData(Writer os) throws TransportException { - os.write(context.getInitData()); + // In case of "-d" we have no context + if (context != null){ + os.write(context.getInitData()); + } else { + // Send dummy data + os.write(initData); + + } } public void setProtocolContext(Protocol workingProtocol) { diff -r c063d32fd983 -r 432dac0b9dae src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Wed Apr 30 20:30:22 2014 +0900 @@ -123,7 +123,6 @@ parser.parse(argv); if (parser.isSet(ParametersHandler.ARG_HELP)) { printUsage(parser.optionsUsage()); - System.out.println("aaaaaa"); System.exit(0); } initProxy1("localhost"); diff -r c063d32fd983 -r 432dac0b9dae src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java --- a/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Wed Apr 30 20:30:22 2014 +0900 @@ -64,6 +64,7 @@ private boolean needReconnection = true; private boolean isTreeVNC = false; private boolean cuiVersion; + private boolean noConnection = false; public ConnectionPresenter(boolean hasSshSupport, boolean allowInteractive) { this.hasSshSupport = hasSshSupport; @@ -88,9 +89,14 @@ show(); populate(); } else { - connect(); + if (!noConnection) + connect(); } } + + public void setNoConnection(boolean c){ + noConnection = c; + } public void setUseSsh(boolean useSsh) { setModelProperty(PROPERTY_USE_SSH, useSsh, boolean.class); diff -r c063d32fd983 -r 432dac0b9dae src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java --- a/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Wed Apr 30 20:30:22 2014 +0900 @@ -9,6 +9,7 @@ private int width; private int height; private String hostName = null; + private boolean noConnection = false; public static void main(String[] args) { new TreeViewer().vncStart(args); @@ -18,6 +19,7 @@ modeSelect(args); if (treeProxy) { VncProxyService vps = new VncProxyService(); + vps.setNoConnection(noConnection); vps.proxyStart(args,width,height); } ViewerImpl v; @@ -42,6 +44,7 @@ } else if ("-d".equals(args[i])) { // behave as root with display. // use this on main display such as large tv. + noConnection = true; treeProxy = true; viewer = true; } else if ("--cui".equals(args[i])) { diff -r c063d32fd983 -r 432dac0b9dae src/viewer_swing/java/com/glavsoft/viewer/Viewer.java --- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Wed Apr 30 18:19:44 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Wed Apr 30 20:30:22 2014 +0900 @@ -66,6 +66,7 @@ boolean isTreeVNC = false; protected MyRfbProto myRfb; private boolean cuiVersion; + private boolean noConnection; public static void main(String[] args) { Parser parser = new Parser(); @@ -206,12 +207,17 @@ return false; } } - + + public void setNoConnection(boolean c){ + noConnection = c; + } + @Override public void run() { final boolean hasJsch = checkJsch(); final boolean allowInteractive = allowAppletInteractiveConnections || ! isApplet; connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); + connectionPresenter.setNoConnection(noConnection); connectionPresenter.addModel("ConnectionParamsModel", connectionParams); final ConnectionView connectionView = new ConnectionView( Viewer.this, // appWindowListener