xmlterm changes only;

UI changes. If user has started typing in a new command, double-clicking a filename copies the filename to the cursor position, rather than opening/executing the file.


git-svn-id: svn://10.0.0.236/trunk@63583 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
svn%xmlterm.org
2000-03-21 14:26:59 +00:00
parent 4f3cf73728
commit bc1e33c0b7
7 changed files with 132 additions and 90 deletions

View File

@@ -92,6 +92,11 @@ foreach my $url (@ARGV) { # for each argument
print "<IMG SRC='$scheme://${host}$pathname'>";
print "\000"; # Terminate HTML stream
} elsif (($scheme eq "file") && ($extension eq ".ps")) {
## print STDERR "PostScript local file\n";
system("ghostview $pathname&");
} elsif (($scheme eq "file") && ($extension eq ".url")) {
# URL
open INFILE, $pathname or next;
@@ -183,5 +188,3 @@ foreach my $url (@ARGV) { # for each argument
next;
}
}

View File

@@ -1,16 +1,16 @@
#!/usr/bin/perl
# xls: an XMLterm wrapper for the UNIX "ls" command
# Usage: xls [-c|--cols] [-h|help] [-t||--text] [-w|--window] <files>
# Usage: xls [-c|--cols] [-h|help] [-t||--text] <files>
use Cwd;
use Getopt::Long;
Getopt::Long::config('bundling');
&GetOptions("cols|c=i", "help|h!", "text|t!", "window|w!");
&GetOptions("cols|c=i", "help|h!", "text|t!");
if ($opt_help) {
print "Usage: xls [-c|--cols] [-t||--text] [-w|--window] [<files>]\n";
print "Usage: xls [-c|--cols] [-t||--text] [<files>]\n";
exit;
}
@@ -53,40 +53,36 @@ foreach $file (@filelist) { # for each file in the list
my ($filename, $extension) = ($1, $2);
my $sendcmd;
if ($opt_window) {
$sendcmd = "exec";
} else {
$sendcmd = "execwin";
}
my ($filetype, $fileimg, $sendcmd, $sendtxt1, $sendtxt2);
my ($filetype, $fileimg, $sendtxt1, $sendtxt2);
$sendtxt1 = $file;
if ($dir eq "/") {
$sendtxt2 = "/";
} else {
$sendtxt2 = "$dir/";
}
if (-d $file) { # directory
$filetype = "directory";
$fileimg = "$imgdir/$img{$filetype}";
$sendtxt1 = "cd $dir/$file; xls";
$sendtxt2 = "cd $file; xls";
$sendcmd = "cdxls";
} elsif (-x $file) { # executable
$filetype = "executable";
$fileimg = "$imgdir/$img{$filetype}";
$sendtxt1 = "$dir/$file";
$sendtxt2 = "./$file";
$sendcmd = "exec";
} elsif (($extension eq ".gif") ||
($extension eq ".png") ||
($extension eq ".jpg")) { # image
$filetype = "imagefile";
$fileimg = "file://$dir/$file";
$sendtxt1 = "xcat $dir/$file";
$sendtxt2 = "xcat $file";
$sendcmd = "xcat";
} elsif ($extension eq ".ps") { # postscript
$filetype = "plainfile";
$fileimg = "$imgdir/$img{$filetype}";
$sendtxt1 = "ghostview $dir/$file &";
$sendtxt2 = "ghostview $file &";
$sendcmd = "xcat";
} elsif ($extension eq ".url") { # URL
open INFILE, $file or next;
@@ -119,6 +115,8 @@ foreach $file (@filelist) { # for each file in the list
$urldesc = $urlstr if !$urldesc;
$sendcmd = "textlink"; # override send command
$sendtxt1 = "$urlstr";
$sendtxt2 = "$urlstr";
$filetype = "urlfile";
if ($nurl >= 2) {
@@ -126,20 +124,16 @@ foreach $file (@filelist) { # for each file in the list
} else {
$fileimg = "$imgdir/$img{$filetype}"; #default URL icon
}
$sendtxt1 = "$urlstr";
$sendtxt2 = "$urlstr";
} else {
$filetype = "plainfile";
$fileimg = "$imgdir/$img{$filetype}";
$sendtxt1 = "xcat $dir/$file";
$sendtxt2 = "xcat $file";
$sendcmd = "xcat";
}
} else { # plain file
$filetype = "plainfile";
$fileimg = "$imgdir/$img{$filetype}";
$sendtxt1 = "xcat $dir/$file";
$sendtxt2 = "xcat $file";
$sendcmd = "xcat";
}
my @comps = split(m./.,$file);