Mercurial > hg > Applications > tvnjviewer
changeset 24:94b36ee816ef
put viewer instance for closing window
author | sugi |
---|---|
date | Sat, 08 Nov 2014 19:13:58 +0900 |
parents | 0d3cf24fe634 |
children | bf9480332e72 |
files | src/viewer_swing/java/com/glavsoft/viewer/Viewer.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Sat Nov 08 16:45:29 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Sat Nov 08 19:13:58 2014 +0900 @@ -24,6 +24,9 @@ package com.glavsoft.viewer; +import alice.datasegment.DataSegment; +import alice.datasegment.ReceiveData; + import com.glavsoft.rfb.protocol.ProtocolSettings; import com.glavsoft.viewer.cli.Parser; import com.glavsoft.viewer.mvp.View; @@ -34,6 +37,7 @@ import com.glavsoft.viewer.swing.gui.ConnectionView; import javax.swing.*; + import java.awt.*; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; @@ -94,16 +98,18 @@ setLoggingLevel(parser.isSet(ParametersHandler.ARG_VERBOSE) ? Level.FINE : parser.isSet(ParametersHandler.ARG_VERBOSE_MORE) ? Level.FINER : Level.INFO); - + paramsMask = ParametersHandler.completeSettingsFromCLI(parser, connectionParams, settings, uiSettings); passwordFromParams = parser.getValueFor(ParametersHandler.ARG_PASSWORD); logger.info("TightVNC Viewer version " + ver()); isApplet = false; - + if (parser.isSetPlainOptions()) { if ("localhost".equals(parser.getPlainOptionAt(0))) { connectionParams.hostName = "localhost"; isApplet = true; + ReceiveData rData = new ReceiveData(this, false, false); + DataSegment.getLocal().put("viewer", rData, null); }; } }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Nov 08 16:45:29 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Nov 08 19:13:58 2014 +0900 @@ -905,5 +905,6 @@ final JDialog infoDialog = infoPane.createDialog(frame, "VNC connection info"); infoDialog.setModalityType(Dialog.ModalityType.MODELESS); infoDialog.setVisible(true); + } } \ No newline at end of file