mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-02 17:33:23 +00:00
Apply patch from Harald Weidner to stop error messages in Debian Etch, and perltidy '-i=2 -b'
This commit is contained in:
parent
181d21d483
commit
b7889e7236
2 changed files with 72 additions and 62 deletions
|
@ -1,6 +1,7 @@
|
||||||
???? Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.22-1
|
???? Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.22-1
|
||||||
|
|
||||||
* Update X resources class to allow use of terms other than XTerm
|
* Update X resources class to allow use of terms other than XTerm
|
||||||
|
* Apply patch from Harald Weidner to stop error messages in Debian Etch
|
||||||
|
|
||||||
2008-11-28 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.21-1
|
2008-11-28 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.21-1
|
||||||
|
|
||||||
|
|
|
@ -158,24 +158,23 @@ sub logmsg($@) {
|
||||||
|
|
||||||
# set some application defaults
|
# set some application defaults
|
||||||
sub load_config_defaults() {
|
sub load_config_defaults() {
|
||||||
$config{terminal} = "xterm";
|
$config{terminal} = "xterm";
|
||||||
$config{terminal_args} = "";
|
$config{terminal_args} = "";
|
||||||
$config{terminal_title_opt} = "-T";
|
$config{terminal_title_opt} = "-T";
|
||||||
$config{terminal_allow_send_events} =
|
$config{terminal_allow_send_events} = "-xrm '*.VT100.allowSendEvents:true'";
|
||||||
"-xrm '*.VT100.allowSendEvents:true'";
|
$config{terminal_font} = "6x13";
|
||||||
$config{terminal_font} = "6x13";
|
$config{terminal_size} = "80x24";
|
||||||
$config{terminal_size} = "80x24";
|
$config{use_hotkeys} = "yes";
|
||||||
$config{use_hotkeys} = "yes";
|
$config{key_quit} = "Control-q";
|
||||||
$config{key_quit} = "Control-q";
|
$config{key_addhost} = "Control-plus";
|
||||||
$config{key_addhost} = "Control-plus";
|
$config{key_clientname} = "Alt-n";
|
||||||
$config{key_clientname} = "Alt-n";
|
$config{key_retilehosts} = "Alt-r";
|
||||||
$config{key_retilehosts} = "Alt-r";
|
$config{key_paste} = "Control-v";
|
||||||
$config{key_paste} = "Control-v";
|
$config{mouse_paste} = "Button-2";
|
||||||
$config{mouse_paste} = "Button-2";
|
$config{auto_quit} = "yes";
|
||||||
$config{auto_quit} = "yes";
|
$config{window_tiling} = "yes";
|
||||||
$config{window_tiling} = "yes";
|
$config{window_tiling_direction} = "right";
|
||||||
$config{window_tiling_direction} = "right";
|
$config{console_position} = "";
|
||||||
$config{console_position} = "";
|
|
||||||
|
|
||||||
$config{ignore_host_errors} = "no";
|
$config{ignore_host_errors} = "no";
|
||||||
|
|
||||||
|
@ -212,9 +211,9 @@ sub load_config_defaults() {
|
||||||
|
|
||||||
$config{unmap_on_redraw} = "no"; # Debian #329440
|
$config{unmap_on_redraw} = "no"; # Debian #329440
|
||||||
|
|
||||||
$config{show_history} = 0;
|
$config{show_history} = 0;
|
||||||
$config{history_width} = 40,
|
$config{history_width} = 40;
|
||||||
$config{history_height} = 10,
|
$config{history_height} = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
# load in config file settings
|
# load in config file settings
|
||||||
|
@ -225,9 +224,9 @@ sub parse_config_file($) {
|
||||||
|
|
||||||
open( CFG, $config_file ) or die("Couldnt open $config_file: $!");
|
open( CFG, $config_file ) or die("Couldnt open $config_file: $!");
|
||||||
while (<CFG>) {
|
while (<CFG>) {
|
||||||
next if ( /^\s*$/ || /^#/ ); # ignore blank lines & commented lines
|
next if ( /^\s*$/ || /^#/ ); # ignore blank lines & commented lines
|
||||||
s/#.*//; # remove comments from remaining lines
|
s/#.*//; # remove comments from remaining lines
|
||||||
s/\s*$//; # remove trailing whitespace
|
s/\s*$//; # remove trailing whitespace
|
||||||
chomp();
|
chomp();
|
||||||
|
|
||||||
#my ($key, $value) = split(/[ ]*=[ ]*/);
|
#my ($key, $value) = split(/[ ]*=[ ]*/);
|
||||||
|
@ -419,33 +418,42 @@ sub load_keyboard_map() {
|
||||||
logmsg( 1, "Loading keymaps and keycodes" );
|
logmsg( 1, "Loading keymaps and keycodes" );
|
||||||
|
|
||||||
foreach ( 0 .. $#keyboard ) {
|
foreach ( 0 .. $#keyboard ) {
|
||||||
if ( defined( $keycodetosym{ $keyboard[$_][0] } ) ) {
|
if ( defined $keyboard[$_][0] ) {
|
||||||
$keyboardmap{ $keycodetosym{ $keyboard[$_][0] } } = 'n' . ( $_ + $min );
|
if ( defined( $keycodetosym{ $keyboard[$_][0] } ) ) {
|
||||||
|
$keyboardmap{ $keycodetosym{ $keyboard[$_][0] } } = 'n' . ( $_ + $min );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logmsg( 2, "Unknown keycode ", $keyboard[$_][0] )
|
||||||
|
if ( $keyboard[$_][0] != 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
if ( defined $keyboard[$_][1] ) {
|
||||||
logmsg( 2, "Unknown keycode ", $keyboard[$_][0] )
|
if ( defined( $keycodetosym{ $keyboard[$_][1] } ) ) {
|
||||||
if ( $keyboard[$_][0] != 0 );
|
$keyboardmap{ $keycodetosym{ $keyboard[$_][1] } } = 's' . ( $_ + $min );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logmsg( 2, "Unknown keycode ", $keyboard[$_][1] )
|
||||||
|
if ( $keyboard[$_][1] != 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( defined( $keycodetosym{ $keyboard[$_][1] } ) ) {
|
if ( defined $keyboard[$_][2] ) {
|
||||||
$keyboardmap{ $keycodetosym{ $keyboard[$_][1] } } = 's' . ( $_ + $min );
|
if ( defined( $keycodetosym{ $keyboard[$_][2] } ) ) {
|
||||||
|
$keyboardmap{ $keycodetosym{ $keyboard[$_][2] } } = 'a' . ( $_ + $min );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logmsg( 2, "Unknown keycode ", $keyboard[$_][2] )
|
||||||
|
if ( $keyboard[$_][2] != 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
if ( defined $keyboard[$_][3] ) {
|
||||||
logmsg( 2, "Unknown keycode ", $keyboard[$_][1] )
|
if ( defined( $keycodetosym{ $keyboard[$_][3] } ) ) {
|
||||||
if ( $keyboard[$_][1] != 0 );
|
$keyboardmap{ $keycodetosym{ $keyboard[$_][3] } } =
|
||||||
}
|
'sa' . ( $_ + $min );
|
||||||
if ( defined( $keycodetosym{ $keyboard[$_][2] } ) ) {
|
}
|
||||||
$keyboardmap{ $keycodetosym{ $keyboard[$_][2] } } = 'a' . ( $_ + $min );
|
else {
|
||||||
}
|
logmsg( 2, "Unknown keycode ", $keyboard[$_][3] )
|
||||||
else {
|
if ( $keyboard[$_][3] != 0 );
|
||||||
logmsg( 2, "Unknown keycode ", $keyboard[$_][2] )
|
}
|
||||||
if ( $keyboard[$_][2] != 0 );
|
|
||||||
}
|
|
||||||
if ( defined( $keycodetosym{ $keyboard[$_][3] } ) ) {
|
|
||||||
$keyboardmap{ $keycodetosym{ $keyboard[$_][3] } } = 'sa' . ( $_ + $min );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logmsg( 2, "Unknown keycode ", $keyboard[$_][3] )
|
|
||||||
if ( $keyboard[$_][3] != 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# dont know these two key combs yet...
|
# dont know these two key combs yet...
|
||||||
|
@ -603,36 +611,36 @@ sub change_main_window_title() {
|
||||||
sub update_display_text($) {
|
sub update_display_text($) {
|
||||||
my $char = shift;
|
my $char = shift;
|
||||||
|
|
||||||
warn("config{show_history}=$config{show_history}");
|
warn("config{show_history}=$config{show_history}");
|
||||||
|
|
||||||
return if(!$config{show_history});
|
return if ( !$config{show_history} );
|
||||||
|
|
||||||
logmsg( 2, "Dropping :$char: into display");
|
logmsg( 2, "Dropping :$char: into display" );
|
||||||
|
|
||||||
SWITCH: {
|
SWITCH: {
|
||||||
foreach ( $char ) {
|
foreach ($char) {
|
||||||
/^Return$/ && do {
|
/^Return$/ && do {
|
||||||
$windows{history}->insert('end', "\n");
|
$windows{history}->insert( 'end', "\n" );
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
};
|
};
|
||||||
|
|
||||||
/^BackSpace$/ && do {
|
/^BackSpace$/ && do {
|
||||||
$windows{history}->delete('end - 2 chars');
|
$windows{history}->delete('end - 2 chars');
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
};
|
};
|
||||||
|
|
||||||
/^(:?Shift|Control|Alt)_(:?R|L)$/ && do {
|
/^(:?Shift|Control|Alt)_(:?R|L)$/ && do {
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
};
|
};
|
||||||
|
|
||||||
length( $char ) > 1 && do {
|
length($char) > 1 && do {
|
||||||
$windows{history}->insert('end', chr( $keysymtocode{$char} ) )
|
$windows{history}->insert( 'end', chr( $keysymtocode{$char} ) )
|
||||||
if ($keysymtocode{$char} );
|
if ( $keysymtocode{$char} );
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
};
|
};
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$windows{history}->insert('end',$char);
|
$windows{history}->insert( 'end', $char );
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1368,7 +1376,8 @@ sub create_windows() {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $config{show_history} ) {
|
if ( $config{show_history} ) {
|
||||||
$windows{history} = $windows{main_window}->Scrolled("ROText",
|
$windows{history} = $windows{main_window}->Scrolled(
|
||||||
|
"ROText",
|
||||||
-insertborderwidth => 4,
|
-insertborderwidth => 4,
|
||||||
-width => $config{history_width},
|
-width => $config{history_width},
|
||||||
-height => $config{history_height},
|
-height => $config{history_height},
|
||||||
|
@ -1589,7 +1598,7 @@ sub key_event {
|
||||||
# look for a <Control>-d and no hosts, so quit
|
# look for a <Control>-d and no hosts, so quit
|
||||||
exit_prog() if ( $state =~ /Control/ && $keysym eq "d" and !%servers );
|
exit_prog() if ( $state =~ /Control/ && $keysym eq "d" and !%servers );
|
||||||
|
|
||||||
update_display_text( $keycodetosym{$keysymdec} )
|
update_display_text( $keycodetosym{$keysymdec} )
|
||||||
if ( $event eq "KeyPress" && $keycodetosym{$keysymdec} );
|
if ( $event eq "KeyPress" && $keycodetosym{$keysymdec} );
|
||||||
|
|
||||||
# for all servers
|
# for all servers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue