Mercurial > hg > Applications > TreeVNC
changeset 365:6558eb66ac8e
Merge
author | innparusu |
---|---|
date | Mon, 10 Aug 2015 18:47:38 +0900 |
parents | 101a32eb084f (current diff) bc5624e3e9c5 (diff) |
children | 2d83bea06f00 |
files | TreeVNC.iml |
diffstat | 4 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/CuiViewer.java Mon Aug 10 18:46:18 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/CuiViewer.java Mon Aug 10 18:47:38 2015 +0900 @@ -136,21 +136,8 @@ final boolean hasJsch = checkJsch(); final boolean allowInteractive = allowAppletInteractiveConnections || !isApplet; - connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); + ConnectionPresenter connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); connectionPresenter.addModel("ConnectionParamsModel", connectionParams); - - - /* - * SwingViewerWindowFactory viewerWindowFactory = new - * SwingViewerWindowFactory( isSeparateFrame, isApplet, this); - * - * connectionPresenter.setConnectionWorkerFactory(new - * SwingConnectionWorkerFactory( connectionView.getFrame(), - * passwordFromParams, connectionPresenter, viewerWindowFactory, - * myRfb)); - */ - - connectionPresenter.setConnectionWorkerFactory( new SwingConnectionWorkerFactory(null, passwordFromParams, connectionPresenter, null, myRfb)); connectionPresenter.setCuiVersion(true); @@ -158,6 +145,11 @@ } @Override + public synchronized void newVNCConnection(ConnectionPresenter presenter) { + connectionPresenter = presenter; + } + + @Override public void windowOpened(WindowEvent e) { /* nop */ }
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Aug 10 18:46:18 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Aug 10 18:47:38 2015 +0900 @@ -224,7 +224,7 @@ public void run() { final boolean hasJsch = checkJsch(); final boolean allowInteractive = allowAppletInteractiveConnections || ! isApplet; - connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); + ConnectionPresenter connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); connectionPresenter.setNoConnection(noConnection); connectionPresenter.addModel("ConnectionParamsModel", connectionParams); ConnectionView connectionView = new ConnectionView( @@ -249,6 +249,11 @@ } @Override + public synchronized void newVNCConnection(ConnectionPresenter presenter) { + connectionPresenter = presenter; + } + + @Override public void windowOpened(WindowEvent e) { /* nop */ } @Override public void windowClosed(WindowEvent e) { /* nop */ } @@ -458,6 +463,7 @@ return rectangles; } + @Override public void setFitScreen() { SwingViewerWindow v = connectionPresenter.getViewer();
--- a/src/viewer_swing/java/com/glavsoft/viewer/ViewerInterface.java Mon Aug 10 18:46:18 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/ViewerInterface.java Mon Aug 10 18:47:38 2015 +0900 @@ -50,4 +50,6 @@ public void setFitScreen(); public ArrayList<Rectangle> getScreenRectangles(); + + void newVNCConnection(ConnectionPresenter presenter); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Mon Aug 10 18:46:18 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Mon Aug 10 18:47:38 2015 +0900 @@ -108,6 +108,9 @@ try { get(); presenter.showMessage("Handshake established"); + if(myRfb.hasViewer()) { + myRfb.getViewer().newVNCConnection(presenter); + } ClipboardControllerImpl clipboardController; if(!myRfb.getCuiVersion()) clipboardController = new ClipboardControllerImpl(workingProtocol, rfbSettings.getRemoteCharsetName());