From c371d7d68d16e1d4fce1d4a6dfd60b088bebbd09 Mon Sep 17 00:00:00 2001 From: Damien Chaumette Date: Fri, 13 Feb 2004 17:28:53 +0000 Subject: forgotten modem page, to be traduced, not yet usable (please don't hurt me) --- perl-install/standalone/drakconnect | 79 ++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 19 deletions(-) (limited to 'perl-install/standalone/drakconnect') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 4d2a57288..f95c5161c 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -260,7 +260,9 @@ sub build_tree { $intf->{device} = $netc->{autodetect}{modem}; my %l = getVarsFromSh("$::prefix/usr/share/config/kppprc"); ($intf->{dns1}, $intf->{dns2}) = split(',', $l{DNS}); - $intf->{$_->[0]} = $l{$_->[1]} foreach [ 'connection' , 'Name' ], [ 'domain', 'Domain' ], [ 'login', 'Username' ]; + $intf->{$_->[0]} = $l{$_->[1]} foreach [ 'connection' , 'Name' ], [ 'domain', 'Domain' ], [ 'login', 'Username' ], + [ 'Timeout', 'Timeout' ], [ 'UseLockFile', 'UseLockFile' ], [ 'BusyWait', 'BusyWait' ], + [ 'FlowControl', 'FlowControl' ], [ 'Speed', 'Speed' ]; /.*ATDT(\d*)/ and $intf->{phone} = $1 foreach cat_("/etc/sysconfig/network-scripts/chat-ppp0"); /NAME=(['"]?)(.*)\1/ and $intf->{login} ||= $2 foreach cat_("/etc/sysconfig/network-scripts/ifcfg-ppp0"); $_->{login} eq $intf->{login} and $intf->{passwd} = $_->{passwd} foreach @{network::tools::read_secret_backend()}; @@ -439,25 +441,64 @@ sub build_notebook { if ($intf->{pages}{N("Modem")}) { gtkpack($gui->{sheet}{N("Modem")} = Gtk2::HBox->new(0,0), - gtkpack_(Gtk2::VBox->new(0,0), - map { (0, gtkpack_(Gtk2::VBox->new(0,0), - 1, Gtk2::Label->new($_->[0]), - 0, $gui->{intf}{$_->[1]} = gtksignal_connect(Gtk2::Entry->new, - key_press_event => $apply), - ), - ); - } ([ N("Card IRQ"), 'irq' ], - [ N("Card mem (DMA)"), 'mem' ], - [ N("Card IO"), 'io' ], - [ N("Card IO_0"), 'io0' ], + if_($interface eq 'modem', + gtkpack__(Gtk2::VBox->new(0,0), + (map { (gtkpack_(Gtk2::VBox->new(0,0), + 1, Gtk2::Label->new($_->[0]), + 0, $gui->{intf}{$_->[1]} = gtksignal_connect(Gtk2::OptionMenu->new, + key_press_event => $apply), + ), + ), + } ([ N("Flow control"), 'FlowControl' ], + [ N("Line termination"), 'LineTerm' ], + [ N("Connection speed"), 'Speed' ], + )), + gtkpack(Gtk2::VBox->new(0,0), + Gtk2::Label->new(N("Dialing mode")), + gtkradio('', N("Tone dialing"), N("Pulse dialing")), + ), ), - ), - Gtk2::VSeparator->new, - gtkpack__(new Gtk2::VBox(0,0), - Gtk2::Label->new(N("Protocol")), - my @protocol_radio = gtkradio(N("Protocol"), N("European protocol (EDSS1)"), - N("Protocol for the rest of the world\nNo D-Channel (leased lines)")), - ), + Gtk2::VSeparator->new, + gtkpack__(new Gtk2::VBox(0,0), + gtksignal_connect($gui->{intf_bool}{UseLockFile} = Gtk2::CheckButton->new(N("Use lock file")), + toggled => $apply), + gtkpack(Gtk2::HBox->new(0,0), + Gtk2::Label->new(N("Modem timeout")), + $gui->{intf}{Timeout} = gtksignal_connect(Gtk2::SpinButton->new(Gtk2::Adjustment->new($intf->{Timeout}, 0, 120, 1, 5, 0), 0, 0), + value_changed => $apply), + ), + gtksignal_connect($gui->{intf_bool}{WaitForDialup} = Gtk2::CheckButton->new(N("Wait for dialup tone before dialing")), + toggled => $apply), + gtkpack(Gtk2::HBox->new(0,0), + Gtk2::Label->new(N("Busy wait")), + $gui->{intf}{BusyWait} = gtksignal_connect(Gtk2::SpinButton->new(Gtk2::Adjustment->new($intf->{BusyWait}, 0, 120, 1, 5, 0), 0, 0), + value_changed => $apply), + ), + Gtk2::Label->new(N("Modem sound")), + gtkradio('', N("Enable"), N("Disable")), + ), + ), + if_($interface eq 'isdn', + gtkpack_(Gtk2::VBox->new(0,0), + map { (0, gtkpack_(Gtk2::VBox->new(0,0), + 1, Gtk2::Label->new($_->[0]), + 0, $gui->{intf}{$_->[1]} = gtksignal_connect(Gtk2::Entry->new, + key_press_event => $apply), + ), + ); + } ([ N("Card IRQ"), 'irq' ], + [ N("Card mem (DMA)"), 'mem' ], + [ N("Card IO"), 'io' ], + [ N("Card IO_0"), 'io0' ], + ), + ), + Gtk2::VSeparator->new, + gtkpack__(new Gtk2::VBox(0,0), + Gtk2::Label->new(N("Protocol")), + my @protocol_radio = gtkradio('', N("European protocol (EDSS1)"), + N("Protocol for the rest of the world\nNo D-Channel (leased lines)")), + ), + ), ); $protocol_radio[0]->signal_connect(toggled => sub { $gui->{intf_radio}{protocol} = 2; $apply->() }); $protocol_radio[1]->signal_connect(toggled => sub { $gui->{intf_radio}{protocol} = 3; $apply->() }); -- cgit v1.2.1