Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
73f19d71
Commit
73f19d71
authored
Oct 19, 2008
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ssl VNC viewer jars and patch file.
parent
1c03dd4d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
400 additions
and
118 deletions
+400
-118
SignedUltraViewerSSL.jar
classes/ssl/SignedUltraViewerSSL.jar
+0
-0
SignedVncViewer.jar
classes/ssl/SignedVncViewer.jar
+0
-0
UltraViewerSSL.jar
classes/ssl/UltraViewerSSL.jar
+0
-0
VncViewer.jar
classes/ssl/VncViewer.jar
+0
-0
ss_vncviewer
classes/ssl/ss_vncviewer
+81
-15
ultravnc-102-JavaViewer-ssl-etc.patch
classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
+319
-103
No files found.
classes/ssl/SignedUltraViewerSSL.jar
View file @
73f19d71
No preview for this file type
classes/ssl/SignedVncViewer.jar
View file @
73f19d71
No preview for this file type
classes/ssl/UltraViewerSSL.jar
View file @
73f19d71
No preview for this file type
classes/ssl/VncViewer.jar
View file @
73f19d71
No preview for this file type
classes/ssl/ss_vncviewer
View file @
73f19d71
...
@@ -229,6 +229,22 @@ do
...
@@ -229,6 +229,22 @@ do
;;
;;
"-grab") VNCVIEWER_GRAB_SERVER=1; export VNCVIEWER_GRAB_SERVER
"-grab") VNCVIEWER_GRAB_SERVER=1; export VNCVIEWER_GRAB_SERVER
;;
;;
"-x11cursor") VNCVIEWER_X11CURSOR=1; export VNCVIEWER_X11CURSOR
;;
"-rawlocal") VNCVIEWER_RAWLOCAL=1; export VNCVIEWER_RAWLOCAL
;;
"-scale") shift; SSVNC_SCALE="$1"; export SSVNC_SCALE
;;
"-ssvnc_encodings") shift; VNCVIEWER_ENCODINGS="$1"; export VNCVIEWER_ENCODINGS
;;
"-rfbversion") shift; VNCVIEWER_RFBVERSION="$1"; export VNCVIEWER_RFBVERSION
;;
"-nobell") VNCVIEWER_NOBELL=1; export VNCVIEWER_NOBELL
;;
"-popupfix") VNCVIEWER_POPUP_FIX=1; export VNCVIEWER_POPUP_FIX
;;
"-realvnc4") VNCVIEWER_IS_REALVNC4=1; export VNCVIEWER_IS_REALVNC4
;;
"-h"*) help; exit 0
"-h"*) help; exit 0
;;
;;
"--h"*) help; exit 0
"--h"*) help; exit 0
...
@@ -273,6 +289,7 @@ if [ "X$reverse" != "X" ]; then
...
@@ -273,6 +289,7 @@ if [ "X$reverse" != "X" ]; then
echo "*Warning*: -listen and a single proxy/gateway does not make sense."
echo "*Warning*: -listen and a single proxy/gateway does not make sense."
sleep 3
sleep 3
fi
fi
SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
fi
fi
fi
fi
if [ "X$ssh_cmd" = "X" ]; then
if [ "X$ssh_cmd" = "X" ]; then
...
@@ -342,6 +359,9 @@ if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
...
@@ -342,6 +359,9 @@ if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
use_ssh=""
use_ssh=""
use_sshssl=""
use_sshssl=""
direct_connect=1
direct_connect=1
if echo "$SSVNC_ULTRA_DSM" | grep 'noultra:' > /dev/null; then
SSVNC_NO_ULTRA_DSM=1; export SSVNC_NO_ULTRA_DSM
fi
fi
fi
# (possibly) tell the vncviewer to only listen on lo:
# (possibly) tell the vncviewer to only listen on lo:
...
@@ -1448,9 +1468,16 @@ Kecho proxy=$proxy
...
@@ -1448,9 +1468,16 @@ Kecho proxy=$proxy
echo ""
echo ""
echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode."
echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode."
echo ""
echo ""
echo "$VNCVIEWERCMD" "$@" -listen $N
N2=$N
if [ "X$VNCVIEWER_IS_REALVNC4" = "X1" ]; then
N2=`echo "$N2" | sed -e 's/://g'`
if [ $N2 -le 200 ]; then
N2=`expr $N2 + 5500`
fi
fi
echo "$VNCVIEWERCMD" "$@" -listen $N2
echo ""
echo ""
$VNCVIEWERCMD "$@" -listen $N
$VNCVIEWERCMD "$@" -listen $N
2
fi
fi
exit $?
exit $?
...
@@ -1536,14 +1563,19 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -1536,14 +1563,19 @@ if [ "X$direct_connect" != "X" ]; then
echo ""
echo ""
echo "Using UltraVNC DSM Plugin key for encryption:"
echo "Using UltraVNC DSM Plugin key for encryption:"
echo ""
echo ""
echo " $SSVNC_ULTRA_DSM PORT HOST:PORT"
ustr=`echo "$SSVNC_ULTRA_DSM" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo " $ustr PORT HOST:PORT"
echo ""
echo ""
elif [ "X$getport" = "X" ]; then
elif [ "X$getport" = "X" ]; then
echo ""
echo ""
echo "Running viewer for direct connection:"
echo "Running viewer for direct connection:"
echo ""
if echo X"$@" | grep chatonly > /dev/null; then
echo "** NOTE: THERE WILL BE NO SSL OR SSH ENCRYPTION **"
:
echo ""
else
echo ""
echo "** NOTE: THERE WILL BE NO SSL OR SSH ENCRYPTION **"
echo ""
fi
fi
fi
x=""
x=""
if [ "X$SSVNC_NO_ENC_WARN" != "X" ]; then
if [ "X$SSVNC_NO_ENC_WARN" != "X" ]; then
...
@@ -1594,9 +1626,25 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -1594,9 +1626,25 @@ if [ "X$direct_connect" != "X" ]; then
if [ "X$reverse" = "X" ]; then
if [ "X$reverse" = "X" ]; then
hostdisp="$host:$disp"
hostdisp="$host:$disp"
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
hostdisp="exec=$SSVNC_ULTRA_DSM 0 $host:$port"
if [ "X$SSVNC_USE_OURS" = "X1" ]; then
hostdisp="exec=$SSVNC_ULTRA_DSM 0 $host:$port"
else
pf=`findfree 5970`
cmd="$SSVNC_ULTRA_DSM -$pf $host:$port"
pf=`expr $pf - 5900`
hostdisp="localhost:$pf"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:"
echo
echo "$ustr &"
echo
$cmd &
dsm_pid=$!
sleep 2
fi
fi
fi
echo "$VNCVIEWERCMD" "$@" "$hostdisp"
hostdisp2=`echo "$hostdisp" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "$VNCVIEWERCMD" "$@" "$hostdisp2"
trap "final" 0 2 15
trap "final" 0 2 15
echo ""
echo ""
$VNCVIEWERCMD "$@" "$hostdisp"
$VNCVIEWERCMD "$@" "$hostdisp"
...
@@ -1614,13 +1662,17 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -1614,13 +1662,17 @@ if [ "X$direct_connect" != "X" ]; then
trap "final" 0 2 15
trap "final" 0 2 15
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
echo "NOTE: The ultravnc_dsm_helper only runs once. So after the first LISTEN"
echo "NOTE: The ultravnc_dsm_helper only runs once. So after the first LISTEN"
echo " ends, you
will have to Press Ctrl-C and restart for a new
connection."
echo " ends, you
may have to Press Ctrl-C and restart for another
connection."
echo ""
echo ""
SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
VNCVIEWER_LISTEN_LOCALHOST=1
export VNCVIEWER_LISTEN_LOCALHOST
dport=`expr 5500 + $disp`
dport=`expr 5500 + $disp`
cmd="$SSVNC_ULTRA_DSM $dport localhost:$use"
cmd="$SSVNC_ULTRA_DSM $dport localhost:$use"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:"
echo "Running:"
echo
echo
echo "$
cmd
&"
echo "$
ustr
&"
echo
echo
$cmd &
$cmd &
dsm_pid=$!
dsm_pid=$!
...
@@ -1630,9 +1682,16 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -1630,9 +1682,16 @@ if [ "X$direct_connect" != "X" ]; then
disp=`expr $disp - 5500`
disp=`expr $disp - 5500`
fi
fi
fi
fi
echo "$VNCVIEWERCMD" "$@" -listen $disp
disp2=$disp
if [ "X$VNCVIEWER_IS_REALVNC4" = "X1" ]; then
disp2=`echo "$disp2" | sed -e 's/://g'`
if [ $disp2 -le 200 ]; then
disp2=`expr $disp2 + 5500`
fi
fi
echo "$VNCVIEWERCMD" "$@" -listen $disp2
echo ""
echo ""
$VNCVIEWERCMD "$@" -listen $disp
$VNCVIEWERCMD "$@" -listen $disp
2
fi
fi
exit $?
exit $?
fi
fi
...
@@ -1793,7 +1852,7 @@ if [ "X$stunnel_exec" = "X" ]; then
...
@@ -1793,7 +1852,7 @@ if [ "X$stunnel_exec" = "X" ]; then
if [ "X$mycert" != "X" ]; then
if [ "X$mycert" != "X" ]; then
sleep 1
sleep 1
echo ""
echo ""
echo "(
pausing for possible certificate passphrase dialog
)"
echo "(
** pausing for possible certificate passphrase dialog **
)"
echo ""
echo ""
sleep 4
sleep 4
fi
fi
...
@@ -1829,7 +1888,14 @@ else
...
@@ -1829,7 +1888,14 @@ else
echo ""
echo ""
echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode."
echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode."
echo ""
echo ""
echo "$VNCVIEWERCMD" "$@" -listen $N
N2=$N
if [ "X$VNCVIEWER_IS_REALVNC4" = "X1" ]; then
N2=`echo "$N2" | sed -e 's/://g'`
if [ $N2 -le 200 ]; then
N2=`expr $N2 + 5500`
fi
fi
echo "$VNCVIEWERCMD" "$@" -listen $N2
trap "final" 0 2 15
trap "final" 0 2 15
echo ""
echo ""
if [ "X$proxy" != "X" ]; then
if [ "X$proxy" != "X" ]; then
...
@@ -1838,7 +1904,7 @@ else
...
@@ -1838,7 +1904,7 @@ else
PPROXY_KILLPID=+1; export PPROXY_KILLPID;
PPROXY_KILLPID=+1; export PPROXY_KILLPID;
$ptmp &
$ptmp &
fi
fi
$VNCVIEWERCMD "$@" -listen $N
$VNCVIEWERCMD "$@" -listen $N
2
fi
fi
sleep 1
sleep 1
classes/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
View file @
73f19d71
...
@@ -121,14 +121,18 @@ diff -Naur JavaViewer.orig/ButtonPanel.java JavaViewer/ButtonPanel.java
...
@@ -121,14 +121,18 @@ diff -Naur JavaViewer.orig/ButtonPanel.java JavaViewer/ButtonPanel.java
}
}
diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
--- JavaViewer.orig/FTPFrame.java 2005-03-15 23:53:14.000000000 -0500
--- JavaViewer.orig/FTPFrame.java 2005-03-15 23:53:14.000000000 -0500
+++ JavaViewer/FTPFrame.java 2008-
09-07 21:12:11
.000000000 -0400
+++ JavaViewer/FTPFrame.java 2008-
10-04 18:09:36
.000000000 -0400
@@ -24,8 +24,1
3
@@
@@ -24,8 +24,1
7
@@
import java.io.*;
import java.io.*;
import java.util.ArrayList;
import java.util.ArrayList;
import java.util.Vector;
import java.util.Vector;
+import java.util.Date;
+import java.util.Date;
import javax.swing.*;
import javax.swing.*;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.*;
+
+// begin runge/x11vnc
+// begin runge/x11vnc
+import java.util.Arrays;
+import java.util.Arrays;
+// end runge/x11vnc
+// end runge/x11vnc
...
@@ -136,7 +140,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -136,7 +140,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/*
/*
* Created on Feb 25, 2004
* Created on Feb 25, 2004
@@ -74,12 +
79
,31 @@
@@ -74,12 +
83
,31 @@
public javax.swing.JTextField connectionStatus = null;
public javax.swing.JTextField connectionStatus = null;
public boolean updateDriveList;
public boolean updateDriveList;
private Vector remoteList = null;
private Vector remoteList = null;
...
@@ -168,7 +172,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -168,7 +172,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
// sf@2004 - Separate directories and files for better lisibility
// sf@2004 - Separate directories and files for better lisibility
private ArrayList DirsList;
private ArrayList DirsList;
@@ -125,11 +1
49
,61 @@
@@ -125,11 +1
53
,61 @@
void refreshRemoteLocation()
void refreshRemoteLocation()
{
{
...
@@ -230,7 +234,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -230,7 +234,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/*
/*
* Prints the list of drives on the remote directory and returns a String[].
* Prints the list of drives on the remote directory and returns a String[].
* str takes as string like A:fC:lD:lE:lF:lG:cH:c
* str takes as string like A:fC:lD:lE:lF:lG:cH:c
@@ -143,6 +2
17
,9 @@
@@ -143,6 +2
21
,9 @@
int size = str.length();
int size = str.length();
String driveType = null;
String driveType = null;
String[] drive = new String[str.length() / 3];
String[] drive = new String[str.length() / 3];
...
@@ -240,7 +244,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -240,7 +244,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
// Loop through the string to create a String[]
// Loop through the string to create a String[]
for (int i = 0; i < size; i = i + 3) {
for (int i = 0; i < size; i = i + 3) {
@@ -150,26 +2
27
,52 @@
@@ -150,26 +2
31
,52 @@
driveType = str.substring(i + 2, i + 3);
driveType = str.substring(i + 2, i + 3);
if (driveType.compareTo("f") == 0)
if (driveType.compareTo("f") == 0)
drive[i / 3] += "\\ Floppy";
drive[i / 3] += "\\ Floppy";
...
@@ -285,11 +289,11 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -285,11 +289,11 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ } else {
+ } else {
+ if (C_drive >= 0) {
+ if (C_drive >= 0) {
+ remoteDrivesComboBox.setSelectedIndex(C_drive);
+ remoteDrivesComboBox.setSelectedIndex(C_drive);
bFound = true;
+
bFound = true;
+System.out.println("ComboBox: C_drive index: " + C_drive);
+System.out.println("ComboBox: C_drive index: " + C_drive);
+ } else if (O_drive >= 0) {
+ } else if (O_drive >= 0) {
+ remoteDrivesComboBox.setSelectedIndex(O_drive);
+ remoteDrivesComboBox.setSelectedIndex(O_drive);
+
bFound = true;
bFound = true;
+System.out.println("ComboBox: Other_drive index: " + O_drive);
+System.out.println("ComboBox: Other_drive index: " + O_drive);
}
}
}
}
...
@@ -299,7 +303,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -299,7 +303,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
updateDriveList = false;
updateDriveList = false;
return drive;
return drive;
}
}
@@ -185,6 +2
88
,8 @@
@@ -185,6 +2
92
,8 @@
stopButton.setVisible(true);
stopButton.setVisible(true);
stopButton.setEnabled(true);
stopButton.setEnabled(true);
receiveButton.setEnabled(false);
receiveButton.setEnabled(false);
...
@@ -308,7 +312,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -308,7 +312,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteTopButton.setEnabled(false);
remoteTopButton.setEnabled(false);
sendButton.setEnabled(false);
sendButton.setEnabled(false);
remoteFileTable.setEnabled(false);
remoteFileTable.setEnabled(false);
@@ -207,6 +31
2
,8 @@
@@ -207,6 +31
6
,8 @@
stopButton.setVisible(false);
stopButton.setVisible(false);
stopButton.setEnabled(false);
stopButton.setEnabled(false);
receiveButton.setEnabled(true);
receiveButton.setEnabled(true);
...
@@ -317,7 +321,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -317,7 +321,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteTopButton.setEnabled(true);
remoteTopButton.setEnabled(true);
sendButton.setEnabled(true);
sendButton.setEnabled(true);
remoteFileTable.setEnabled(true);
remoteFileTable.setEnabled(true);
@@ -221,10 +3
28
,11 @@
@@ -221,10 +3
32
,11 @@
/*
/*
* Print Directory prints out all the contents of a directory
* Print Directory prints out all the contents of a directory
*/
*/
...
@@ -330,7 +334,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -330,7 +334,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
remoteFileTable.setListData(remoteList);
remoteFileTable.setListData(remoteList);
}
}
@@ -235,10 +34
3
,12 @@
@@ -235,10 +34
7
,12 @@
* @return void
* @return void
*/
*/
private void initialize() {
private void initialize() {
...
@@ -344,7 +348,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -344,7 +348,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/**
/**
* This method initializes jContentPane. This is the main content pane
* This method initializes jContentPane. This is the main content pane
*
*
@@ -253,6 +36
3
,33 @@
@@ -253,6 +36
7
,33 @@
jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST);
jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST);
jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST);
jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER);
jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER);
...
@@ -378,7 +382,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -378,7 +382,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return jContentPane;
return jContentPane;
}
}
@@ -270,6 +4
07
,7 @@
@@ -270,6 +4
11
,7 @@
topPanelLocal.add(getLocalMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelLocal.add(getLocalMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelLocal.add(getLocalTopButton(), java.awt.BorderLayout.EAST);
topPanelLocal.add(getLocalTopButton(), java.awt.BorderLayout.EAST);
topPanelLocal.setBackground(java.awt.Color.lightGray);
topPanelLocal.setBackground(java.awt.Color.lightGray);
...
@@ -386,7 +390,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -386,7 +390,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return topPanelLocal;
return topPanelLocal;
}
}
@@ -288,6 +4
26
,7 @@
@@ -288,6 +4
30
,7 @@
topPanelRemote.add(getRemoteMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelRemote.add(getRemoteMachineLabel(), java.awt.BorderLayout.CENTER);
topPanelRemote.add(getRemoteTopButton(), java.awt.BorderLayout.EAST);
topPanelRemote.add(getRemoteTopButton(), java.awt.BorderLayout.EAST);
topPanelRemote.setBackground(java.awt.Color.lightGray);
topPanelRemote.setBackground(java.awt.Color.lightGray);
...
@@ -394,7 +398,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -394,7 +398,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return topPanelRemote;
return topPanelRemote;
}
}
@@ -301,6 +44
0
,7 @@
@@ -301,6 +44
4
,7 @@
if (topPanelCenter == null) {
if (topPanelCenter == null) {
topPanelCenter = new javax.swing.JPanel();
topPanelCenter = new javax.swing.JPanel();
topPanelCenter.add(getDummyButton(), null);
topPanelCenter.add(getDummyButton(), null);
...
@@ -402,7 +406,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -402,7 +406,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return topPanelCenter;
return topPanelCenter;
}
}
@@ -328,6 +4
68
,7 @@
@@ -328,6 +4
72
,7 @@
topPanel.add(getRemoteTopButton(), null);
topPanel.add(getRemoteTopButton(), null);
topPanel.setBackground(java.awt.Color.lightGray);
topPanel.setBackground(java.awt.Color.lightGray);
*/
*/
...
@@ -410,7 +414,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -410,7 +414,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return topPanel;
return topPanel;
}
}
@@ -348,6 +4
89
,7 @@
@@ -348,6 +4
93
,7 @@
statusPanel.add(getJProgressBar(), null);
statusPanel.add(getJProgressBar(), null);
statusPanel.add(getConnectionStatus(), null);
statusPanel.add(getConnectionStatus(), null);
statusPanel.setBackground(java.awt.Color.lightGray);
statusPanel.setBackground(java.awt.Color.lightGray);
...
@@ -418,7 +422,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -418,7 +422,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return statusPanel;
return statusPanel;
@@ -368,6 +51
0
,7 @@
@@ -368,6 +51
4
,7 @@
remotePanel.add(getRemoteScrollPane(), null);
remotePanel.add(getRemoteScrollPane(), null);
remotePanel.add(getRemoteStatus(), null);
remotePanel.add(getRemoteStatus(), null);
remotePanel.setBackground(java.awt.Color.lightGray);
remotePanel.setBackground(java.awt.Color.lightGray);
...
@@ -426,7 +430,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -426,7 +430,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remotePanel;
return remotePanel;
}
}
@@ -390,6 +53
3
,7 @@
@@ -390,6 +53
7
,7 @@
localPanel.setComponentOrientation(
localPanel.setComponentOrientation(
java.awt.ComponentOrientation.UNKNOWN);
java.awt.ComponentOrientation.UNKNOWN);
localPanel.setName("localPanel");
localPanel.setName("localPanel");
...
@@ -434,7 +438,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -434,7 +438,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localPanel;
return localPanel;
}
}
@@ -405,12 +5
49
,15 @@
@@ -405,12 +5
53
,15 @@
buttonPanel = new javax.swing.JPanel();
buttonPanel = new javax.swing.JPanel();
buttonPanel.setLayout(null);
buttonPanel.setLayout(null);
buttonPanel.add(getReceiveButton(), null);
buttonPanel.add(getReceiveButton(), null);
...
@@ -450,7 +454,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -450,7 +454,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return buttonPanel;
return buttonPanel;
}
}
@@ -422,10 +5
69
,11 @@
@@ -422,10 +5
73
,11 @@
private javax.swing.JButton getSendButton() {
private javax.swing.JButton getSendButton() {
if (sendButton == null) {
if (sendButton == null) {
sendButton = new javax.swing.JButton();
sendButton = new javax.swing.JButton();
...
@@ -463,7 +467,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -463,7 +467,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return sendButton;
return sendButton;
@@ -438,7 +5
86
,7 @@
@@ -438,7 +5
90
,7 @@
private javax.swing.JButton getReceiveButton() {
private javax.swing.JButton getReceiveButton() {
if (receiveButton == null) {
if (receiveButton == null) {
receiveButton = new javax.swing.JButton();
receiveButton = new javax.swing.JButton();
...
@@ -472,7 +476,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -472,7 +476,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
receiveButton.setText("<< Receive");
receiveButton.setText("<< Receive");
receiveButton.setName("receiveButton");
receiveButton.setName("receiveButton");
receiveButton.addActionListener(this);
receiveButton.addActionListener(this);
@@ -453,7 +60
1
,7 @@
@@ -453,7 +60
5
,7 @@
private javax.swing.JButton getDeleteButton() {
private javax.swing.JButton getDeleteButton() {
if (deleteButton == null) {
if (deleteButton == null) {
deleteButton = new javax.swing.JButton();
deleteButton = new javax.swing.JButton();
...
@@ -481,7 +485,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -481,7 +485,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
deleteButton.setText("Delete File");
deleteButton.setText("Delete File");
deleteButton.setName("deleteButton");
deleteButton.setName("deleteButton");
deleteButton.addActionListener(this);
deleteButton.addActionListener(this);
@@ -468,7 +6
16
,7 @@
@@ -468,7 +6
20
,7 @@
private javax.swing.JButton getNewFolderButton() {
private javax.swing.JButton getNewFolderButton() {
if (newFolderButton == null) {
if (newFolderButton == null) {
newFolderButton = new javax.swing.JButton();
newFolderButton = new javax.swing.JButton();
...
@@ -490,7 +494,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -490,7 +494,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
newFolderButton.setText("New Folder");
newFolderButton.setText("New Folder");
newFolderButton.setName("newFolderButton");
newFolderButton.setName("newFolderButton");
newFolderButton.addActionListener(this);
newFolderButton.addActionListener(this);
@@ -476,6 +62
4
,39 @@
@@ -476,6 +62
8
,39 @@
return newFolderButton;
return newFolderButton;
}
}
...
@@ -530,7 +534,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -530,7 +534,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/**
/**
* This method initializes stopButton
* This method initializes stopButton
*
*
@@ -486,7 +6
67
,7 @@
@@ -486,7 +6
71
,7 @@
if (stopButton == null)
if (stopButton == null)
{
{
stopButton = new javax.swing.JButton();
stopButton = new javax.swing.JButton();
...
@@ -539,7 +543,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -539,7 +543,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
stopButton.setText("Stop");
stopButton.setText("Stop");
stopButton.setName("stopButton");
stopButton.setName("stopButton");
stopButton.addActionListener(this);
stopButton.addActionListener(this);
@@ -503,8 +68
4
,12 @@
@@ -503,8 +68
8
,12 @@
private javax.swing.JButton getCloseButton() {
private javax.swing.JButton getCloseButton() {
if (closeButton == null) {
if (closeButton == null) {
closeButton = new javax.swing.JButton();
closeButton = new javax.swing.JButton();
...
@@ -554,7 +558,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -554,7 +558,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
closeButton.setName("closeButton");
closeButton.setName("closeButton");
closeButton.addActionListener(this);
closeButton.addActionListener(this);
}
}
@@ -551,6 +7
36
,7 @@
@@ -551,6 +7
40
,7 @@
//Select the second entry (e.g. C:\)
//Select the second entry (e.g. C:\)
// localDrivesComboBox.setSelectedIndex(1);
// localDrivesComboBox.setSelectedIndex(1);
localDrivesComboBox.addActionListener(this);
localDrivesComboBox.addActionListener(this);
...
@@ -562,7 +566,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -562,7 +566,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
updateDriveList = false;
updateDriveList = false;
return localDrivesComboBox;
return localDrivesComboBox;
@@ -567,6 +75
3
,7 @@
@@ -567,6 +75
7
,7 @@
remoteDrivesComboBox.setFont(
remoteDrivesComboBox.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
remoteDrivesComboBox.addActionListener(this);
remoteDrivesComboBox.addActionListener(this);
...
@@ -570,7 +574,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -570,7 +574,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteDrivesComboBox;
return remoteDrivesComboBox;
@@ -587,6 +77
4
,7 @@
@@ -587,6 +77
8
,7 @@
localMachineLabel.setFont(
localMachineLabel.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 11));
new java.awt.Font("Dialog", java.awt.Font.BOLD, 11));
localMachineLabel.setEditable(false);
localMachineLabel.setEditable(false);
...
@@ -578,7 +582,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -578,7 +582,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localMachineLabel;
return localMachineLabel;
}
}
@@ -622,6 +81
0
,7 @@
@@ -622,6 +81
4
,7 @@
localTopButton.setFont(
localTopButton.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
localTopButton.addActionListener(this);
localTopButton.addActionListener(this);
...
@@ -586,7 +590,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -586,7 +590,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localTopButton;
return localTopButton;
}
}
@@ -638,6 +8
27
,7 @@
@@ -638,6 +8
31
,7 @@
remoteTopButton.setFont(
remoteTopButton.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
remoteTopButton.addActionListener(this);
remoteTopButton.addActionListener(this);
...
@@ -594,7 +598,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -594,7 +598,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteTopButton;
return remoteTopButton;
}
}
@@ -650,9 +84
0
,24 @@
@@ -650,9 +84
4
,24 @@
private javax.swing.JList getLocalFileTable() {
private javax.swing.JList getLocalFileTable() {
if (localFileTable == null) {
if (localFileTable == null) {
localList = new Vector(0);
localList = new Vector(0);
...
@@ -619,7 +623,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -619,7 +623,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localFileTable;
return localFileTable;
}
}
@@ -669,6 +87
4
,7 @@
@@ -669,6 +87
8
,7 @@
localScrollPane.setFont(
localScrollPane.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
localScrollPane.setName("localFileList");
localScrollPane.setName("localFileList");
...
@@ -627,7 +631,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -627,7 +631,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localScrollPane;
return localScrollPane;
}
}
@@ -680,10 +8
86
,25 @@
@@ -680,10 +8
90
,25 @@
private javax.swing.JList getRemoteFileTable() {
private javax.swing.JList getRemoteFileTable() {
if (remoteFileTable == null) {
if (remoteFileTable == null) {
remoteList = new Vector(0);
remoteList = new Vector(0);
...
@@ -653,7 +657,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -653,7 +657,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteFileTable;
return remoteFileTable;
@@ -698,6 +9
19
,7 @@
@@ -698,6 +9
23
,7 @@
remoteScrollPane = new javax.swing.JScrollPane();
remoteScrollPane = new javax.swing.JScrollPane();
remoteScrollPane.setViewportView(getRemoteFileTable());
remoteScrollPane.setViewportView(getRemoteFileTable());
remoteScrollPane.setPreferredSize(new java.awt.Dimension(325, 418));
remoteScrollPane.setPreferredSize(new java.awt.Dimension(325, 418));
...
@@ -661,7 +665,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -661,7 +665,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteScrollPane;
return remoteScrollPane;
}
}
@@ -716,6 +9
38
,7 @@
@@ -716,6 +9
42
,7 @@
remoteLocation.setBackground(new Color(255,255,238));
remoteLocation.setBackground(new Color(255,255,238));
remoteLocation.setFont(
remoteLocation.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
...
@@ -669,7 +673,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -669,7 +673,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteLocation;
return remoteLocation;
}
}
@@ -732,6 +95
5
,7 @@
@@ -732,6 +95
9
,7 @@
localLocation.setBackground( new Color(255,255,238));
localLocation.setBackground( new Color(255,255,238));
localLocation.setFont(
localLocation.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
...
@@ -677,7 +681,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -677,7 +681,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localLocation;
return localLocation;
}
}
@@ -748,6 +97
2
,7 @@
@@ -748,6 +97
6
,7 @@
localStatus.setFont(
localStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
localStatus.setEditable(false);
localStatus.setEditable(false);
...
@@ -685,7 +689,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -685,7 +689,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return localStatus;
return localStatus;
}
}
@@ -764,6 +9
89
,7 @@
@@ -764,6 +9
93
,7 @@
remoteStatus.setFont(
remoteStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
remoteStatus.setEditable(false);
remoteStatus.setEditable(false);
...
@@ -693,7 +697,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -693,7 +697,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return remoteStatus;
return remoteStatus;
}
}
@@ -777,9 +100
3
,10 @@
@@ -777,9 +100
7
,10 @@
historyComboBox = new javax.swing.JComboBox();
historyComboBox = new javax.swing.JComboBox();
historyComboBox.setFont(
historyComboBox.setFont(
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
new java.awt.Font("Dialog", java.awt.Font.BOLD, 10));
...
@@ -705,7 +709,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -705,7 +709,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return historyComboBox;
return historyComboBox;
}
}
@@ -791,6 +10
18
,7 @@
@@ -791,6 +10
22
,7 @@
private javax.swing.JProgressBar getJProgressBar() {
private javax.swing.JProgressBar getJProgressBar() {
if (jProgressBar == null) {
if (jProgressBar == null) {
jProgressBar = new javax.swing.JProgressBar();
jProgressBar = new javax.swing.JProgressBar();
...
@@ -713,7 +717,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -713,7 +717,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
return jProgressBar;
return jProgressBar;
}
}
@@ -806,6 +103
4
,7 @@
@@ -806,6 +103
8
,7 @@
connectionStatus.setBackground(java.awt.Color.lightGray);
connectionStatus.setBackground(java.awt.Color.lightGray);
connectionStatus.setFont(
connectionStatus.setFont(
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
...
@@ -721,7 +725,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -721,7 +725,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
connectionStatus.setEditable(false);
connectionStatus.setEditable(false);
return connectionStatus;
return connectionStatus;
@@ -815,7 +104
4
,12 @@
@@ -815,7 +104
8
,12 @@
* Implements Action listener.
* Implements Action listener.
*/
*/
public void actionPerformed(ActionEvent evt) {
public void actionPerformed(ActionEvent evt) {
...
@@ -735,7 +739,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -735,7 +739,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (evt.getSource() == closeButton)
if (evt.getSource() == closeButton)
{ // Close Button
{ // Close Button
@@ -829,15 +106
3
,27 @@
@@ -829,15 +106
7
,27 @@
{
{
doReceive();
doReceive();
}
}
...
@@ -765,7 +769,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -765,7 +769,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
else if (evt.getSource() == localTopButton)
else if (evt.getSource() == localTopButton)
{
{
@@ -845,12 +109
1
,17 @@
@@ -845,12 +109
5
,17 @@
}
}
else if (evt.getSource() == remoteTopButton)
else if (evt.getSource() == remoteTopButton)
{
{
...
@@ -783,7 +787,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -783,7 +787,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
else if(evt.getSource()==newFolderButton)
else if(evt.getSource()==newFolderButton)
{
{
doNewFolder();
doNewFolder();
@@ -864,7 +111
5
,7 @@
@@ -864,7 +111
9
,7 @@
private void doNewFolder()
private void doNewFolder()
{
{
...
@@ -792,7 +796,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -792,7 +796,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if(selectedTable.equals("remote"))
if(selectedTable.equals("remote"))
{
{
name = remoteLocation.getText()+name;
name = remoteLocation.getText()+name;
@@ -880,34 +113
1
,106 @@
@@ -880,34 +113
5
,106 @@
historyComboBox.setSelectedIndex(0);
historyComboBox.setSelectedIndex(0);
}
}
}
}
...
@@ -909,7 +913,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -909,7 +913,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
return;
return;
}
}
@@ -916,7 +12
39
,7 @@
@@ -916,7 +12
43
,7 @@
// sf@2004 - Delete prompt
// sf@2004 - Delete prompt
if (remoteList.contains(sFileName))
if (remoteList.contains(sFileName))
{
{
...
@@ -918,7 +922,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -918,7 +922,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION)
if (r == JOptionPane.NO_OPTION)
return;
return;
}
}
@@ -926,18 +12
49
,22 @@
@@ -926,18 +12
53
,22 @@
}
}
else
else
{
{
...
@@ -944,7 +948,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -944,7 +948,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION)
if (r == JOptionPane.NO_OPTION)
return;
return;
}
}
@@ -952,21 +12
79
,25 @@
@@ -952,21 +12
83
,25 @@
private void doReceive()
private void doReceive()
{
{
...
@@ -974,7 +978,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -974,7 +978,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION)
if (r == JOptionPane.NO_OPTION)
return;
return;
}
}
@@ -979,23 +131
0,89
@@
@@ -979,23 +131
4,101
@@
viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath);
viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath);
}
}
...
@@ -1032,6 +1036,18 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1032,6 +1036,18 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ //updateHistory("Downloaded " + localSelection.toString());
+ //updateHistory("Downloaded " + localSelection.toString());
+ String remoteFileName = this.remoteLocation.getText();
+ String remoteFileName = this.remoteLocation.getText();
+ remoteFileName+= ((String) this.remoteFileTable.getSelectedValue()).substring(1);
+ remoteFileName+= ((String) this.remoteFileTable.getSelectedValue()).substring(1);
+ System.out.println("remoteFileName: " + remoteFileName);
+if (false) {
+ char[] b = remoteFileName.toCharArray();
+ for (int n = 0; n < b.length; n++) {
+ System.out.print(Integer.toHexString(b[n]) + " ");
+ }
+ System.out.println("");
+ for (int n = 0; n < b.length; n++) {
+ System.out.print(b[n]);
+ }
+ System.out.println("");
+}
+
+
+ String localDestinationPath = tmp.getAbsolutePath();
+ String localDestinationPath = tmp.getAbsolutePath();
+ viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath);
+ viewer.rfb.requestRemoteFile(remoteFileName,localDestinationPath);
...
@@ -1068,7 +1084,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1068,7 +1084,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if (r == JOptionPane.NO_OPTION)
if (r == JOptionPane.NO_OPTION)
return;
return;
}
}
@@ -1013,6 +14
10
,7 @@
@@ -1013,6 +14
26
,7 @@
//
//
private void doStop()
private void doStop()
{
{
...
@@ -1076,7 +1092,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1076,7 +1092,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
viewer.rfb.fAbort = true;
viewer.rfb.fAbort = true;
}
}
/**
/**
@@ -1024,6 +14
22
,14 @@
@@ -1024,6 +14
38
,14 @@
System.out.println("History: " + message);
System.out.println("History: " + message);
historyComboBox.insertItemAt(new String(message), 0);
historyComboBox.insertItemAt(new String(message), 0);
}
}
...
@@ -1091,7 +1107,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1091,7 +1107,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/**
/**
* This method updates the file table to the current selection of the remoteComboBox
* This method updates the file table to the current selection of the remoteComboBox
@@ -1034,11 +14
40
,41 @@
@@ -1034,11 +14
56
,41 @@
remoteSelection = null;
remoteSelection = null;
if (!updateDriveList) {
if (!updateDriveList) {
...
@@ -1136,7 +1152,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1136,7 +1152,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteFileTable.setListData(remoteList);
remoteFileTable.setListData(remoteList);
}
}
/**
/**
@@ -1048,6 +1
484
,7 @@
@@ -1048,6 +1
500
,7 @@
private void changeLocalDrive()
private void changeLocalDrive()
{
{
File currentDrive = new File(localDrivesComboBox.getSelectedItem().toString());
File currentDrive = new File(localDrivesComboBox.getSelectedItem().toString());
...
@@ -1144,7 +1160,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1144,7 +1160,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
if(currentDrive.canRead())
if(currentDrive.canRead())
{
{
localSelection = null;
localSelection = null;
@@ -1057,9 +1
494
,11 @@
@@ -1057,9 +1
510
,11 @@
else
else
{
{
localList.clear();
localList.clear();
...
@@ -1156,7 +1172,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1156,7 +1172,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
/**
/**
* Determines which FileTable was double-clicked and updates the table
* Determines which FileTable was double-clicked and updates the table
@@ -1098,10 +15
37
,18 @@
@@ -1098,10 +15
53
,18 @@
selectedTable = "remote";
selectedTable = "remote";
localFileTable.setBackground(new Color(238, 238, 238));
localFileTable.setBackground(new Color(238, 238, 238));
remoteFileTable.setBackground(new Color(255, 255, 255));
remoteFileTable.setBackground(new Color(255, 255, 255));
...
@@ -1177,7 +1193,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1177,7 +1193,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
/*
/*
@@ -1115,10 +15
62
,38 @@
@@ -1115,10 +15
78
,38 @@
localFileTable.setBackground(new Color(255, 255, 255));
localFileTable.setBackground(new Color(255, 255, 255));
File currentSelection = new File(currentLocalDirectory, getTrimmedSelection());
File currentSelection = new File(currentLocalDirectory, getTrimmedSelection());
...
@@ -1217,7 +1233,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1217,7 +1233,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/**
/**
* Updates the Remote File Table based on selection. Called from mouseClicked handler
* Updates the Remote File Table based on selection. Called from mouseClicked handler
*/
*/
@@ -1126,20 +16
01
,29 @@
@@ -1126,20 +16
17
,29 @@
String name = null;
String name = null;
String action = null;
String action = null;
String drive = null;
String drive = null;
...
@@ -1249,7 +1265,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1249,7 +1265,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
remoteFileTable.setListData(remoteList);
remoteFileTable.setListData(remoteList);
}
}
else if (!name.substring(0, 2).equals(" [") && !name.substring((name.length() - 1), name.length()).equals("]"))
else if (!name.substring(0, 2).equals(" [") && !name.substring((name.length() - 1), name.length()).equals("]"))
@@ -1149,6 +16
33
,7 @@
@@ -1149,6 +16
49
,7 @@
remoteSelection = remoteLocation.getText() + name.substring(0, name.length());
remoteSelection = remoteLocation.getText() + name.substring(0, name.length());
drive = remoteLocation.getText();
drive = remoteLocation.getText();
// ??
// ??
...
@@ -1257,7 +1273,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1257,7 +1273,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
else
else
{
{
@@ -1159,10 +16
44
,12 @@
@@ -1159,10 +16
60
,12 @@
remoteLocation.setText(drive);
remoteLocation.setText(drive);
viewer.rfb.readServerDirectory(drive);
viewer.rfb.readServerDirectory(drive);
remoteList.clear();
remoteList.clear();
...
@@ -1270,7 +1286,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1270,7 +1286,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
/**
/**
* Updates the Local File Table based on selection. Called from MouseClicked handler
* Updates the Local File Table based on selection. Called from MouseClicked handler
*/
*/
@@ -1188,6 +16
75
,7 @@
@@ -1188,6 +16
91
,7 @@
else if (currentSelection.isFile())
else if (currentSelection.isFile())
{
{
localSelection = currentSelection.getAbsoluteFile();
localSelection = currentSelection.getAbsoluteFile();
...
@@ -1278,7 +1294,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1278,7 +1294,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
else if (currentSelection.isDirectory())
else if (currentSelection.isDirectory())
{
{
@@ -1201,13 +1
689
,22 @@
@@ -1201,13 +1
705
,22 @@
*
*
*/
*/
private String getTrimmedSelection(){
private String getTrimmedSelection(){
...
@@ -1308,7 +1324,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1308,7 +1324,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
}
}
/*
/*
@@ -1241,36 +17
38,113
@@
@@ -1241,36 +17
54,148
@@
return null;
return null;
}
}
...
@@ -1343,6 +1359,17 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1343,6 +1359,17 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ String ms = dotPast(m, 3);
+ String ms = dotPast(m, 3);
+ return s + " (" + ms + " MB)";
+ return s + " (" + ms + " MB)";
+ }
+ }
+ }
+
+ int max_char(String text) {
+ int maxc = 0;
+ char chars[] = text.toCharArray();
+ for (int n = 0; n < chars.length; n++) {
+ if ((int) chars[n] > maxc) {
+ maxc = (int) chars[n];
+ }
+ }
+ return maxc;
+ }
+ }
/*
/*
...
@@ -1390,12 +1417,36 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1390,12 +1417,36 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+
+
+ ArrayList DirInfo = new ArrayList();
+ ArrayList DirInfo = new ArrayList();
+ ArrayList FilInfo = new ArrayList();
+ ArrayList FilInfo = new ArrayList();
+
+ Charset charset = Charset.forName("ISO-8859-1");
+ CharsetDecoder decoder = charset.newDecoder();
+ CharsetEncoder encoder = charset.newEncoder();
// Populate the Lists
// Populate the Lists
for (int i = 0; i < contents.length; i++)
for (int i = 0; i < contents.length; i++)
{
{
- if (allFiles[i].isDirectory())
- if (allFiles[i].isDirectory())
+ String f2 = contents[i];
+ String f1 = contents[i];
+
+if (false) {
+
+System.out.println("max_char: " + max_char(f1) + " " + f1);
+ if (max_char(f1) > 255) {
+ try {
+System.out.println("bbuf1");
+ ByteBuffer bbuf = encoder.encode(CharBuffer.wrap(f1.toCharArray()));
+System.out.println("bbuf2");
+ CharBuffer cbuf = decoder.decode(bbuf);
+System.out.println("bbuf3");
+ f1 = cbuf.toString();
+System.out.println("did bbuf: " + f1);
+ } catch (Exception e) {
+ ;
+ }
+ }
+}
+
+ String f2 = f1;
+ if (f2.length() < 24) {
+ if (f2.length() < 24) {
+ for (int ik = f2.length(); ik < 24; ik++) {
+ for (int ik = f2.length(); ik < 24; ik++) {
+ f2 = f2 + " ";
+ f2 = f2 + " ";
...
@@ -1404,13 +1455,15 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1404,13 +1455,15 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ String s = f2 + " \tLastmod: " + timeStr(allFiles[i].lastModified()) + " \t\tSize: " + sizeStr((int) allFiles[i].length());
+ String s = f2 + " \tLastmod: " + timeStr(allFiles[i].lastModified()) + " \t\tSize: " + sizeStr((int) allFiles[i].length());
+ if (allFiles[i].isDirectory()) {
+ if (allFiles[i].isDirectory()) {
// localList.addElement("[" + contents[i] + "]");
// localList.addElement("[" + contents[i] + "]");
DirsList.add(" [" + contents[i] + "]"); // sf@2004
-
DirsList.add(" [" + contents[i] + "]"); // sf@2004
- else
- else
- {
- {
+ DirsList.add(" [" + f1 + "]"); // sf@2004
+ DirInfo.add(s);
+ DirInfo.add(s);
+ } else {
+ } else {
// localList.addElement(contents[i]);
// localList.addElement(contents[i]);
FilesList.add(" " + contents[i]); // sf@2004
- FilesList.add(" " + contents[i]); // sf@2004
+ FilesList.add(" " + f1); // sf@2004
+ FilInfo.add(s);
+ FilInfo.add(s);
}
}
}
}
...
@@ -1428,7 +1481,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
...
@@ -1428,7 +1481,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
FilesList.clear();
FilesList.clear();
DirsList.clear();
DirsList.clear();
@@ -1296,3 +1
870
,147 @@
@@ -1296,3 +1
921
,147 @@
}
}
} // @jve:visual-info decl-index=0 visual-constraint="10,10"
} // @jve:visual-info decl-index=0 visual-constraint="10,10"
...
@@ -1593,7 +1646,7 @@ diff -Naur JavaViewer.orig/OptionsFrame.java JavaViewer/OptionsFrame.java
...
@@ -1593,7 +1646,7 @@ diff -Naur JavaViewer.orig/OptionsFrame.java JavaViewer/OptionsFrame.java
choices[shareDesktopIndex].select("Yes");
choices[shareDesktopIndex].select("Yes");
diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
--- JavaViewer.orig/RfbProto.java 2006-05-24 15:14:40.000000000 -0400
--- JavaViewer.orig/RfbProto.java 2006-05-24 15:14:40.000000000 -0400
+++ JavaViewer/RfbProto.java 2008-
09-14 10:50:33
.000000000 -0400
+++ JavaViewer/RfbProto.java 2008-
10-06 13:32:30
.000000000 -0400
@@ -31,6 +31,7 @@
@@ -31,6 +31,7 @@
import java.net.Socket;
import java.net.Socket;
import java.util.*;
import java.util.*;
...
@@ -1738,7 +1791,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1738,7 +1791,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
if (contentParam == rfbADrivesList)
if (contentParam == rfbADrivesList)
{
{
readFTPMsgDriveList();
readFTPMsgDriveList();
@@ -688,
21 +737,3
1 @@
@@ -688,
13 +737,2
1 @@
// Internally used. Write an Rfb message to the server
// Internally used. Write an Rfb message to the server
void writeRfbFileTransferMsg(
void writeRfbFileTransferMsg(
...
@@ -1754,29 +1807,60 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1754,29 +1807,60 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
+ String text) throws IOException
+ String text) throws IOException
{
{
byte b[] = new byte[12];
byte b[] = new byte[12];
+ byte byteArray[];
+
+ if (viewer.dsmActive) {
+ if (viewer.dsmActive) {
+ // need to send the rfbFileTransfer msg type twice for the plugin...
+ // need to send the rfbFileTransfer msg type twice for the plugin...
+ byte b2[] = new byte[1];
+ byte b2[] = new byte[1];
+ b2[0] = (byte) rfbFileTransfer;
+ b2[0] = (byte) rfbFileTransfer;
+ os.write(b2);
+ os.write(b2);
+ }
+ }
+
b[0] = (byte) rfbFileTransfer;
b[0] = (byte) rfbFileTransfer;
b[1] = (byte) contentType;
b[1] = (byte) contentType;
b[2] = (byte) contentParam;
@@ -702,7 +759,7 @@
byte by = 0;
byte by = 0;
long c = 0;
long c = 0;
- length++;
- length++;
+
+
+ if (text != null) {
+ length++; // we send the null I guess???
+ }
c = size & 0xFF000000;
c = size & 0xFF000000;
by = (byte) (c >>> 24);
by = (byte) (c >>> 24);
b[4] = by;
b[4] = by;
@@ -729,6 +788,8 @@
@@ -716,6 +773,32 @@
by = (byte) c;
b[7] = by;
+ if (text != null) {
+ byte byteArray0[] = text.getBytes();
+ int maxc = max_char(text);
+ if (maxc > 255) {
+ System.out.println("writeRfbFileTransferMsg: using getBytes(\"UTF-8\")");
+ byteArray0 = text.getBytes("UTF-8");
+ } else if (maxc > 127) {
+ System.out.println("writeRfbFileTransferMsg: using getBytes(\"ISO-8859-1\")");
+ byteArray0 = text.getBytes("ISO-8859-1");
+ }
+ byteArray = new byte[byteArray0.length + 1];
+ for (int i = 0; i < byteArray0.length; i++) {
+ byteArray[i] = byteArray0[i];
+ }
+ byteArray[byteArray.length - 1] = 0;
+System.out.println("writeRfbFileTransferMsg: length: " + length + " -> byteArray.length: " + byteArray.length);
+
+ // will equal length for ascii, ISO-8859-1, more for UTF-8
+ length = byteArray.length;
+
+ //length++; // used to not include null byte at end.
+ } else {
+ String moo = "moo";
+ byteArray = moo.getBytes();
+ }
+
c = length & 0xFF000000;
by = (byte) (c >>> 24);
b[8] = by;
@@ -729,29 +812,91 @@
by = (byte) c;
by = (byte) c;
b[11] = by;
b[11] = by;
os.write(b);
os.write(b);
...
@@ -1785,8 +1869,85 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1785,8 +1869,85 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
if (text != null)
if (text != null)
@@ -746,12 +807,12 @@
{
- byte byteArray[] = text.getBytes();
- byte byteArray2[] = new byte[byteArray.length + 1];
- for (int i = 0; i < byteArray.length; i++) {
- byteArray2[i] = byteArray[i];
+ os.write(byteArray);
+ }
+ }
+
+ int max_char(String text) {
+ int maxc = 0;
+ char chars[] = text.toCharArray();
+ for (int n = 0; n < chars.length; n++) {
+ if ((int) chars[n] > maxc) {
+ maxc = (int) chars[n];
}
- byteArray2[byteArray2.length - 1] = 0;
- os.write(byteArray2);
}
-
+ return maxc;
+ }
+
+ String guess_encoding(char[] chars) {
+ boolean saw_high_char = false;
+
+ for (int i = 0; i < chars.length; i++) {
+ if (chars[i] == '\0') {
+ break;
+ }
+ if (chars[i] >= 128) {
+ saw_high_char = true;
+ break;
+ }
+ }
+ if (!saw_high_char) {
+ return "ASCII";
+ }
+ char prev = 1;
+ boolean valid_utf8 = true;
+ int n = 0;
+ for (int i = 0; i < chars.length; i++) {
+ if (chars[i] == '\0') {
+ break;
+ }
+ char c = chars[i];
+ if (prev < 128 && c >= 128) {
+ if (c >> 5 == 0x6) {
+ n = 1;
+ } else if (c >> 4 == 0xe) {
+ n = 2;
+ } else if (c >> 3 == 0x1e) {
+ n = 3;
+ } else if (c >> 2 == 0x3e) {
+ n = 4;
+ } else {
+ valid_utf8 = false;
+ break;
+ }
+ } else {
+ if (n > 0) {
+ if (c < 128) {
+ valid_utf8 = false;
+ break;
+ }
+ n--;
+ }
+ }
+
+ prev = c;
+ }
+ if (valid_utf8) {
+ return "UTF-8";
+ } else {
+ return "ISO-8859-1";
+ }
}
+
//Internally used. Write an rfb message to the server for sending files ONLY
//Internally used. Write an rfb message to the server for sending files ONLY
int writeRfbFileTransferMsgForSendFile(
int writeRfbFileTransferMsgForSendFile(
- int contentType,
- int contentType,
...
@@ -1804,7 +1965,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1804,7 +1965,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
{
{
File f = new File(source);
File f = new File(source);
fis = new FileInputStream(f);
fis = new FileInputStream(f);
@@ -768,50 +
829
,47 @@
@@ -768,50 +
913
,47 @@
while (bytesRead!=-1)
while (bytesRead!=-1)
{
{
...
@@ -1896,7 +2057,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1896,7 +2057,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
writeRfbFileTransferMsg(fError ? rfbAbortFileTransfer : rfbEndOfFile, 0, 0, 0, null);
writeRfbFileTransferMsg(fError ? rfbAbortFileTransfer : rfbEndOfFile, 0, 0, 0, null);
@@ -831,24 +
889
,30 @@
@@ -831,24 +
973
,30 @@
{
{
System.out.print((char) is.readUnsignedByte());
System.out.print((char) is.readUnsignedByte());
}
}
...
@@ -1935,7 +2096,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1935,7 +2096,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
viewer.ftp.historyComboBox.setSelectedIndex(0);
viewer.ftp.historyComboBox.setSelectedIndex(0);
viewer.ftp.enableButtons();
viewer.ftp.enableButtons();
@@ -907,7 +
971
,7 @@
@@ -907,7 +
1055
,7 @@
//Handles acknowledgement that the file has been deleted on the server
//Handles acknowledgement that the file has been deleted on the server
void deleteRemoteFileFeedback() throws IOException
void deleteRemoteFileFeedback() throws IOException
{
{
...
@@ -1944,7 +2105,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1944,7 +2105,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
int length = is.readInt();
int length = is.readInt();
String f = "";
String f = "";
for (int i = 0; i < length; i++)
for (int i = 0; i < length; i++)
@@ -916,7 +
980
,11 @@
@@ -916,7 +
1064
,11 @@
}
}
viewer.ftp.refreshRemoteLocation();
viewer.ftp.refreshRemoteLocation();
...
@@ -1957,7 +2118,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1957,7 +2118,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
viewer.ftp.historyComboBox.setSelectedIndex(0);
viewer.ftp.historyComboBox.setSelectedIndex(0);
}
}
@@ -926,12 +
994
,7 @@
@@ -926,12 +
1078
,7 @@
try
try
{
{
String temp = text;
String temp = text;
...
@@ -1971,7 +2132,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1971,7 +2132,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
catch (IOException e)
catch (IOException e)
{
{
@@ -943,7 +10
06
,7 @@
@@ -943,7 +10
90
,7 @@
// Handles acknowledgement that the directory has been created on the server
// Handles acknowledgement that the directory has been created on the server
void createRemoteDirectoryFeedback() throws IOException
void createRemoteDirectoryFeedback() throws IOException
{
{
...
@@ -1980,7 +2141,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1980,7 +2141,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
int length = is.readInt();
int length = is.readInt();
String f="";
String f="";
for (int i = 0; i < length; i++)
for (int i = 0; i < length; i++)
@@ -951,7 +10
14
,11 @@
@@ -951,7 +10
98
,11 @@
f += (char)is.readUnsignedByte();
f += (char)is.readUnsignedByte();
}
}
viewer.ftp.refreshRemoteLocation();
viewer.ftp.refreshRemoteLocation();
...
@@ -1993,7 +2154,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -1993,7 +2154,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
viewer.ftp.historyComboBox.setSelectedIndex(0);
viewer.ftp.historyComboBox.setSelectedIndex(0);
}
}
@@ -961,12 +1
028
,7 @@
@@ -961,12 +1
112
,7 @@
try
try
{
{
String temp = text;
String temp = text;
...
@@ -2007,7 +2168,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2007,7 +2168,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
catch (IOException e)
catch (IOException e)
{
{
@@ -979,15 +1
041
,13 @@
@@ -979,15 +1
125
,13 @@
{
{
try
try
{
{
...
@@ -2027,7 +2188,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2027,7 +2188,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
catch (IOException e)
catch (IOException e)
{
{
@@ -1004,6 +1
064
,9 @@
@@ -1004,6 +1
148
,9 @@
viewer.ftp.disableButtons();
viewer.ftp.disableButtons();
int size = is.readInt();
int size = is.readInt();
int length = is.readInt();
int length = is.readInt();
...
@@ -2037,7 +2198,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2037,7 +2198,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
String tempName = "";
String tempName = "";
for (int i = 0; i < length; i++)
for (int i = 0; i < length; i++)
@@ -1011,6 +1
074
,15 @@
@@ -1011,6 +1
158
,15 @@
tempName += (char) is.readUnsignedByte();
tempName += (char) is.readUnsignedByte();
}
}
...
@@ -2053,7 +2214,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2053,7 +2214,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
// sf@2004 - Read the high part of file size (not yet in rfbFileTransferMsg for
// sf@2004 - Read the high part of file size (not yet in rfbFileTransferMsg for
// backward compatibility reasons...)
// backward compatibility reasons...)
int sizeH = is.readInt();
int sizeH = is.readInt();
@@ -1021,7 +1
093
,16 @@
@@ -1021,7 +1
177
,16 @@
fileSize=0;
fileSize=0;
fileChunkCounter = 0;
fileChunkCounter = 0;
String fileName = receivePath;
String fileName = receivePath;
...
@@ -2071,7 +2232,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2071,7 +2232,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
writeRfbFileTransferMsg(rfbFileHeader, 0, 0, 0, null);
writeRfbFileTransferMsg(rfbFileHeader, 0, 0, 0, null);
}
}
@@ -1085,7 +1
166
,13 @@
@@ -1085,7 +1
250
,13 @@
fAbort = false;
fAbort = false;
fFileReceptionError = true;
fFileReceptionError = true;
writeRfbFileTransferMsg(rfbAbortFileTransfer, 0, 0, 0, null);
writeRfbFileTransferMsg(rfbAbortFileTransfer, 0, 0, 0, null);
...
@@ -2086,7 +2247,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2086,7 +2247,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
// sf@2004 - For old FT protocole only
// sf@2004 - For old FT protocole only
/*
/*
@@ -1104,7 +1
191
,7 @@
@@ -1104,7 +1
275
,7 @@
int length = is.readInt();
int length = is.readInt();
fileSize=0;
fileSize=0;
fos.close();
fos.close();
...
@@ -2095,7 +2256,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2095,7 +2256,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
viewer.ftp.refreshLocalLocation();
viewer.ftp.refreshLocalLocation();
if (fReceptionOk && !fFileReceptionError)
if (fReceptionOk && !fFileReceptionError)
{
{
@@ -1132,12 +1
219
,7 @@
@@ -1132,12 +1
303
,7 @@
try
try
{
{
String temp = text;
String temp = text;
...
@@ -2109,7 +2270,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2109,7 +2270,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
catch (IOException e)
catch (IOException e)
{
{
@@ -1197,11 +1
279
,80 @@
@@ -1197,11 +1
363
,80 @@
str += temp;
str += temp;
}
}
}
}
...
@@ -2190,7 +2351,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2190,7 +2351,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
//Internally used to receive directory content from server
//Internally used to receive directory content from server
//Here, the server sends one file/directory with it's attributes
//Here, the server sends one file/directory with it's attributes
void readFTPMsgDirectoryListContent() throws IOException
void readFTPMsgDirectoryListContent() throws IOException
@@ -1217,17 +1
368,25
@@
@@ -1217,17 +1
452,32
@@
dwReserved0,
dwReserved0,
dwReserved1;
dwReserved1;
long ftCreationTime, ftLastAccessTime, ftLastWriteTime;
long ftCreationTime, ftLastAccessTime, ftLastWriteTime;
...
@@ -2200,6 +2361,13 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2200,6 +2361,13 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
int length = 0;
int length = 0;
is.readInt();
is.readInt();
length = is.readInt();
length = is.readInt();
+
+ char[] chars = new char[4*length];
+ int char_cnt = 0;
+ for (int i = 0; i < chars.length; i++) {
+ chars[i] = '\0';
+ }
+
dwFileAttributes = is.readInt();
dwFileAttributes = is.readInt();
length -= 4;
length -= 4;
- ftCreationTime = is.readLong();
- ftCreationTime = is.readLong();
...
@@ -2219,18 +2387,50 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2219,18 +2387,50 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
length -= 8;
length -= 8;
nFileSizeHigh = is.readInt();
nFileSizeHigh = is.readInt();
length -= 4;
length -= 4;
@@ -1253,7 +1412,9 @@
@@ -1239,10 +1489,12 @@
length -= 4;
cFileName = (char) is.readUnsignedByte();
length--;
+ chars[char_cnt++] = cFileName;
while (cFileName != '\0')
{
fileName += cFileName;
cFileName = (char) is.readUnsignedByte();
+ chars[char_cnt++] = cFileName;
length--;
}
cAlternateFileName = (char) is.readByte();
@@ -1253,7 +1505,28 @@
cAlternateFileName = (char) is.readUnsignedByte();
cAlternateFileName = (char) is.readUnsignedByte();
length--;
length--;
}
}
- if (dwFileAttributes == 268435456
- if (dwFileAttributes == 268435456
+ String guessed = guess_encoding(chars);
+ if (!guessed.equals("ASCII")) {
+ System.out.println("guess: " + guessed + "\t" + fileName);
+ }
+ if (guessed.equals("UTF-8")) {
+ try {
+ byte[] bytes = new byte[char_cnt-1];
+ for (int i=0; i < char_cnt-1; i++) {
+ bytes[i] = (byte) chars[i];
+ }
+ String newstr = new String(bytes, "UTF-8");
+ fileName = newstr;
+ } catch (Exception e) {
+ System.out.println("failed to convert bytes to UTF-8 based string");
+ }
+ }
+ for (int i = 0; i < char_cnt; i++) {
+ //System.out.println("char[" + i + "]\t" + (int) chars[i]);
+ }
+ if (fileName.length() <= 0) {
+ if (fileName.length() <= 0) {
+ ;
+ ;
+ } else if (dwFileAttributes == 268435456
+ } else if (dwFileAttributes == 268435456
|| dwFileAttributes == 369098752
|| dwFileAttributes == 369098752
|| dwFileAttributes == 285212672
|| dwFileAttributes == 285212672
|| dwFileAttributes == 271056896
|| dwFileAttributes == 271056896
@@ -1263,11 +1
424
,74 @@
@@ -1263,11 +1
536
,74 @@
|| dwFileAttributes == 369623040)
|| dwFileAttributes == 369623040)
{
{
fileName = " [" + fileName + "]";
fileName = " [" + fileName + "]";
...
@@ -2310,7 +2510,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2310,7 +2510,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
// a.add(fileName);
// a.add(fileName);
@@ -1282,14 +1
506,31
@@
@@ -1282,14 +1
618,32
@@
// sf@2004
// sf@2004
a.clear();
a.clear();
...
@@ -2323,6 +2523,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2323,6 +2523,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
+ }
+ }
+ for (int i = 0; i < remoteFilesList.size(); i++) {
+ for (int i = 0; i < remoteFilesList.size(); i++) {
a.add(remoteFilesList.get(i));
a.add(remoteFilesList.get(i));
+
+ b.add(remoteFilesListInfo.get(i));
+ b.add(remoteFilesListInfo.get(i));
+ }
+ }
remoteDirsList.clear();
remoteDirsList.clear();
...
@@ -2345,7 +2546,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2345,7 +2546,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
//Internally used to signify the drive requested is not ready
//Internally used to signify the drive requested is not ready
@@ -1299,6 +1
540
,8 @@
@@ -1299,6 +1
653
,8 @@
System.out.println("Remote Drive unavailable");
System.out.println("Remote Drive unavailable");
viewer.ftp.connectionStatus.setText(" > WARNING - Remote Drive unavailable (possibly restricted access or media not present)");
viewer.ftp.connectionStatus.setText(" > WARNING - Remote Drive unavailable (possibly restricted access or media not present)");
viewer.ftp.remoteStatus.setText("WARNING: Remote Drive unavailable");
viewer.ftp.remoteStatus.setText("WARNING: Remote Drive unavailable");
...
@@ -2354,7 +2555,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2354,7 +2555,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
//Call this method to request the list of drives on the server.
//Call this method to request the list of drives on the server.
@@ -1306,12 +1
549
,11 @@
@@ -1306,12 +1
662
,11 @@
{
{
try
try
{
{
...
@@ -2372,7 +2573,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2372,7 +2573,7 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
catch (IOException e)
catch (IOException e)
{
{
@@ -1355,21 +1
597
,21 @@
@@ -1355,21 +1
710
,21 @@
int h,
int h,
boolean incremental)
boolean incremental)
throws IOException {
throws IOException {
...
@@ -2407,6 +2608,21 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
...
@@ -2407,6 +2608,21 @@ diff -Naur JavaViewer.orig/RfbProto.java JavaViewer/RfbProto.java
}
}
}
}
@@ -1482,7 +1837,13 @@
b[6] = (byte) ((text.length() >> 8) & 0xff);
b[7] = (byte) (text.length() & 0xff);
- System.arraycopy(text.getBytes(), 0, b, 8, text.length());
+ if (false && max_char(text) > 255) {
+ System.arraycopy(text.getBytes("UTF-8"), 0, b, 8, text.length());
+ } else if (max_char(text) > 127) {
+ System.arraycopy(text.getBytes("ISO-8859-1"), 0, b, 8, text.length());
+ } else {
+ System.arraycopy(text.getBytes(), 0, b, 8, text.length());
+ }
os.write(b);
// }
diff -Naur JavaViewer.orig/SSLSocketToMe.java JavaViewer/SSLSocketToMe.java
diff -Naur JavaViewer.orig/SSLSocketToMe.java JavaViewer/SSLSocketToMe.java
--- JavaViewer.orig/SSLSocketToMe.java 1969-12-31 19:00:00.000000000 -0500
--- JavaViewer.orig/SSLSocketToMe.java 1969-12-31 19:00:00.000000000 -0500
+++ JavaViewer/SSLSocketToMe.java 2008-04-15 12:54:51.000000000 -0400
+++ JavaViewer/SSLSocketToMe.java 2008-04-15 12:54:51.000000000 -0400
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment