]> git.proxmox.com Git - vncterm.git/blob - tigerpatches/javascript-events.patch
use builtin dh_params with newer gnutls
[vncterm.git] / tigerpatches / javascript-events.patch
1 Index: new/java/src/com/tigervnc/vncviewer/VncViewer.java
2 ===================================================================
3 --- new.orig/java/src/com/tigervnc/vncviewer/VncViewer.java 2013-05-10 07:41:18.000000000 +0200
4 +++ new/java/src/com/tigervnc/vncviewer/VncViewer.java 2013-05-10 07:41:18.000000000 +0200
5 @@ -27,11 +27,15 @@
6
7 package com.tigervnc.vncviewer;
8
9 +import netscape.javascript.*;
10 import java.awt.*;
11 import java.awt.event.*;
12 import java.io.*;
13 import java.net.*;
14
15 +import java.awt.Graphics;
16 +import java.applet.Applet;
17 +
18 public class VncViewer extends java.applet.Applet
19 implements java.lang.Runnable, WindowListener, ComponentListener {
20
21 @@ -94,6 +98,9 @@
22
23 String PVECert;
24
25 + JSObject jswin;
26 + String myid;
27 +
28 // Reference to this applet for inter-applet communication.
29 public static java.applet.Applet refApplet;
30
31 @@ -129,6 +136,11 @@
32
33 refApplet = this;
34
35 + if (inAnApplet) {
36 + jswin = JSObject.getWindow(this);
37 + myid = getParameter("id");
38 + }
39 +
40 if (inSeparateFrame) {
41 vncFrame = new Frame("TigerVNC");
42 if (!inAnApplet) {
43 @@ -159,6 +171,9 @@
44
45 rfbThread = new Thread(this);
46 rfbThread.start();
47 +
48 + String[] myparam = { myid, "init"};
49 + jswin.call("PVE_vnc_console_event", myparam);
50 }
51
52 public void update(Graphics g) {
53 @@ -1002,6 +1017,8 @@
54
55 if (inAnApplet) {
56 showMessage("Disconnected");
57 + String[] myparam = { myid, "disconnect"};
58 + jswin.call("PVE_vnc_console_event", myparam);
59 } else {
60 System.exit(0);
61 }
62 @@ -1019,6 +1036,8 @@
63 // vncContainer null, applet not inited,
64 // can not present the error to the user.
65 Thread.currentThread().stop();
66 + String[] myparam = { myid, "error", str};
67 + jswin.call("PVE_vnc_console_event", myparam);
68 } else {
69 System.exit(1);
70 }
71 @@ -1040,6 +1059,8 @@
72 rfb.close();
73
74 if (inAnApplet) {
75 + String[] myparam = { myid, "error", str};
76 + jswin.call("PVE_vnc_console_event", myparam);
77 showMessage(str);
78 } else {
79 System.exit(1);
80 @@ -1109,6 +1130,9 @@
81 rfb.close();
82 if (inSeparateFrame)
83 vncFrame.dispose();
84 +
85 + String[] myparam = { myid, "destroy"};
86 + jswin.call("PVE_vnc_console_event", myparam);
87 }
88
89 //
90 @@ -1157,6 +1181,8 @@
91 if (!inAnApplet) {
92 System.exit(0);
93 }
94 + String[] myparam = { myid, "close"};
95 + jswin.call("PVE_vnc_console_event", myparam);
96 }
97
98 //
99 Index: new/java/src/com/tigervnc/vncviewer/Makefile
100 ===================================================================
101 --- new.orig/java/src/com/tigervnc/vncviewer/Makefile 2013-05-10 07:41:18.000000000 +0200
102 +++ new/java/src/com/tigervnc/vncviewer/Makefile 2013-05-10 07:43:17.000000000 +0200
103 @@ -4,7 +4,7 @@
104
105 CP = cp
106 JC = javac
107 -JCFLAGS = -target 1.7 -classpath ../../../
108 +JCFLAGS = -target 1.7 -classpath ../../../ -Djava.ext.dirs=/usr/share/icedtea-web/
109 JAR = jar
110 ARCHIVE = VncViewer.jar
111 MANIFEST = MANIFEST.MF