summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2004-01-08 19:59:55 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2004-01-08 19:59:55 +0000
commit0e5fd3e7b587eb8603c1d38115361022952f833d (patch)
tree2827b71b4f42b889d827cc28a3cf37d5644515eb
parent86daa5e0c1aa18bf72d6d285560fcfc44fec8e20 (diff)
downloaddrakx-0e5fd3e7b587eb8603c1d38115361022952f833d.tar
drakx-0e5fd3e7b587eb8603c1d38115361022952f833d.tar.gz
drakx-0e5fd3e7b587eb8603c1d38115361022952f833d.tar.bz2
drakx-0e5fd3e7b587eb8603c1d38115361022952f833d.tar.xz
drakx-0e5fd3e7b587eb8603c1d38115361022952f833d.zip
- informations afford copy/paste (mac address)
- add module name to informations - perl_checker compliant
-rwxr-xr-xperl-install/standalone/drakconnect57
1 files changed, 27 insertions, 30 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 9557de490..810b43ba2 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -24,6 +24,7 @@
use strict;
use warnings;
use diagnostics;
+
use Data::Dumper;
use lib qw(/usr/lib/libDrakX);
@@ -129,7 +130,6 @@ $list->signal_connect(button_press_event => sub {
configure_lan() if $event->type eq '2button-press';
});
-
update_list();
my ($label_host, $int_state, $button_expert);
@@ -280,39 +280,33 @@ sub build_notebook {
$gui->{netc}{$_}->set_text($netc->{$_}) foreach keys %{$gui->{netc}};
if ($intf->{WIRELESS_MODE}) {
- my @wireless_left = ([ N("Operating Mode"), "WIRELESS_MODE" ],
+ gtkpack($gui->{sheet}{Wireless} = 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]} = Gtk2::Entry->new,
+ ));
+ } ([ N("Operating Mode"), "WIRELESS_MODE" ],
[ N("Netwok name (ESSID)"), "WIRELESS_ESSID" ],
[ N("Network ID"), "WIRELESS_NWID" ],
[ N("Operating frequency"), "WIRELESS_FREQ" ],
[ N("Sensitivity threshold"), "WIRELESS_SENS" ],
[ N("Bitrate (in b/s)"), "WIRELESS_RATE" ]
- );
-
- my @wireless_right = ([ N("Encryption key"), 'WIRELESS_ENC_KEY' ],
- [ N("RTS/CTS"), 'WIRELESS_RTS' ],
- [ N("Fragmentation"), 'WIRELESS_FRAG' ],
- [ N("Iwconfig command extra arguments"), 'WIRELESS_IWCONFIG' ],
- [ N("Iwspy command extra arguments"), 'WIRELESS_IWSPY' ],
- [ N("Iwpriv command extra arguments"), 'WIRELESS_IWPRIV' ]
- );
-
- gtkpack($gui->{sheet}{Wireless} = 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]} = Gtk2::Entry->new,
- ));
- } @wireless_left,
+ ),
),
Gtk2::VSeparator->new,
gtkpack_(Gtk2::VBox->new(0,0),
- map {
- (0, gtkpack_(Gtk2::VBox->new(0,0),
- 1, Gtk2::Label->new($_->[0]),
- 0, $gui->{intf}{$_->[1]} = Gtk2::Entry->new,
- ));
- } @wireless_right,
+ map {(0, gtkpack_(Gtk2::VBox->new(0,0),
+ 1, Gtk2::Label->new($_->[0]),
+ 0, $gui->{intf}{$_->[1]} = Gtk2::Entry->new,
+ ));
+ } ([ N("Encryption key"), 'WIRELESS_ENC_KEY' ],
+ [ N("RTS/CTS"), 'WIRELESS_RTS' ],
+ [ N("Fragmentation"), 'WIRELESS_FRAG' ],
+ [ N("Iwconfig command extra arguments"), 'WIRELESS_IWCONFIG' ],
+ [ N("Iwspy command extra arguments"), 'WIRELESS_IWSPY' ],
+ [ N("Iwpriv command extra arguments"), 'WIRELESS_IWPRIV' ],
+ ),
),
);
$gui->{intf}{$_}->set_text($intf->{$_}) foreach keys %{$gui->{intf}};
@@ -326,10 +320,15 @@ sub build_notebook {
$gui->{intf_bool}{MII_NOT_SUPPORTED} = Gtk2::CheckButton->new(N("Network Hotplugging")),
));
$gui->{intf_bool}{$_}->set_active($intf->{$_} eq 'yes' ? 1 : 0) foreach keys %{$gui->{intf_bool}};
-
+
#- informations box
gtkpack($gui->{sheet}{Informations} = Gtk2::VBox->new(0,0),
- Gtk2::Label->new(N("Mac Address : %s", $intf->{HWADDR})),
+ gtktext_insert(Gtk2::TextView->new,
+ join('',
+ map { "$_\n" } (N("Module name : %s", c::getNetDriver($interface) || modules::get_alias($interface)),
+ N("Mac Address : %s", c::get_hw_address($interface)),
+ ))
+ ),
);
$gui->{notebook} = Gtk2::Notebook->new;
@@ -446,8 +445,6 @@ sub update_list() {
sub apply {
my ($netc, $netcnx, $intf) = @_;
- print Dumper $intf;
-
network::network::sethostname($netc) if is_dynamic_ip($intf);
$netcnx->{type} eq 'modem' and network::modem::ppp_configure($in, $netcnx->{$netcnx->{type}});