summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-08-01 17:09:29 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-08-01 17:09:29 +0000
commit19251cb4446dab80b809afcaa52f1c27e969b92d (patch)
treece07ce907a9a395782585ccc91125251d03ed031 /perl-install/standalone/drakconnect
parent834a4c9b562d33ab6791e5fcde77bfa7246af223 (diff)
downloaddrakx-backup-do-not-use-19251cb4446dab80b809afcaa52f1c27e969b92d.tar
drakx-backup-do-not-use-19251cb4446dab80b809afcaa52f1c27e969b92d.tar.gz
drakx-backup-do-not-use-19251cb4446dab80b809afcaa52f1c27e969b92d.tar.bz2
drakx-backup-do-not-use-19251cb4446dab80b809afcaa52f1c27e969b92d.tar.xz
drakx-backup-do-not-use-19251cb4446dab80b809afcaa52f1c27e969b92d.zip
perl_checker fixes
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-xperl-install/standalone/drakconnect174
1 files changed, 87 insertions, 87 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 8f60892a2..21fa2b9e9 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -35,7 +35,7 @@ use network::isdn;
use network::adsl;
use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_prog $connect_file $disconnect_file);
-my $xpm_path="/usr/share/libDrakX/pixmaps";
+my $xpm_path = "/usr/share/libDrakX/pixmaps";
$::isWizard = "@ARGV" =~ /--wizard/;
$::expert = "@ARGV" =~ /--expert/;
local $_ = join '', @ARGV;
@@ -45,12 +45,12 @@ local $_ = join '', @ARGV;
my $netcnx = {};
my $netc = {};
my $intf = {};
-my @conx_type = ('modem', 'isdn_internal', 'isdn_external', 'adsl', 'cable', 'lan' );
+my @conx_type = ('modem', 'isdn_internal', 'isdn_external', 'adsl', 'cable', 'lan');
#$::wizard_xpm = "/usr/share/pixmaps/internet.xpm";
my $in = 'interactive'->vnew('su', 'network');
-!$::isEmbedded && $in->isa('interactive::gtk') and $::isWizard=1;
+!$::isEmbedded && $in->isa('interactive::gtk') and $::isWizard = 1;
$::Wizard_pix_up = "wiz_drakconnect.png";
$::Wizard_title = "Network & Internet Configuration";
@@ -67,14 +67,14 @@ require Gtk;
init Gtk;
require my_gtk;
import my_gtk qw(:helpers :wrappers);
-my $expert_mode=0;
+my $expert_mode = 0;
network::netconnect::read_net_conf('', $netcnx, $netc);
any::load_category_no_message('net', undef);
my @all_cards = network::ethernet::conf_network_card_backend ($netc, $intf, undef, undef, undef, undef);
network::netconnect::load_conf($netcnx, $netc, $intf);
my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
-$window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
+$window1->signal_connect (delete_event => sub { Gtk->exit(0) });
$window1->set_position(1);
$window1->set_title(_("Network configuration (%d adapters)", @all_cards));
$window1->border_width(10);
@@ -87,33 +87,33 @@ $hbox1->pack_start(new Gtk::Label(_("Profile: ")),0,0,0);
my $combo1 = new Gtk::Combo;
$combo1->set_popdown_strings (network::netconnect::get_profiles());
-my $old_profile=$netcnx->{PROFILE};
+my $old_profile = $netcnx->{PROFILE};
$combo1->entry->set_text($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
$combo1->entry->set_editable(0);
$hbox1->pack_start($combo1,0,0,0);
my $button_del = new Gtk::Button(_("Del profile..."));
-$button_del->signal_connect( clicked => sub {
+$button_del->signal_connect(clicked => sub {
my $dialog = new Gtk::Dialog();
$dialog->set_position(1);
$dialog->vbox->set_border_width(10);
- $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->signal_connect (delete_event => sub { Gtk->main_quit() });
$dialog->vbox->pack_start(new Gtk::Label(_("Profile to delete:")),1,1,0);
my $combo_dialog = new Gtk::Combo;
- $combo_dialog->set_popdown_strings ( grep { ! /default/ } network::netconnect::get_profiles() );
+ $combo_dialog->set_popdown_strings (grep { ! /default/ } network::netconnect::get_profiles());
$combo_dialog->entry->set_editable(0);
$dialog->vbox->pack_start($combo_dialog,1,1,0);
my $bbox_dialog = new Gtk::HButtonBox;
$dialog->action_area->add($bbox_dialog);
$bbox_dialog->set_layout(-end);
my $button_ok = new Gtk::Button _("OK");
- $button_ok->signal_connect ( clicked => sub {
+ $button_ok->signal_connect (clicked => sub {
network::netconnect::del_profile($netcnx, $combo_dialog->entry->get_text());
- $netcnx->{PROFILE} eq $combo_dialog->entry->get_text() and $netcnx->{PROFILE}="default";
+ $netcnx->{PROFILE} eq $combo_dialog->entry->get_text() and $netcnx->{PROFILE} = "default";
Gtk->main_quit();
});
- $bbox_dialog->add($button_ok );
+ $bbox_dialog->add($button_ok);
my $button_cancel = new Gtk::Button _("Cancel");
- $button_cancel->signal_connect ( clicked => sub { Gtk->main_quit(); });
+ $button_cancel->signal_connect (clicked => sub { Gtk->main_quit() });
$bbox_dialog->add($button_cancel);
$dialog->show_all;
$dialog->set_modal(1);
@@ -126,11 +126,11 @@ $button_del->signal_connect( clicked => sub {
$hbox1->pack_start($button_del,0,0,5);
$button_del->set_sensitive(network::netconnect::get_profiles() > 1);
my $button_new = new Gtk::Button(_("New profile..."));
-$button_new->signal_connect( clicked => sub {
+$button_new->signal_connect(clicked => sub {
my $dialog = new Gtk::Dialog();
$dialog->set_position(1);
$dialog->vbox->set_border_width(10);
- $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->signal_connect (delete_event => sub { Gtk->main_quit() });
$dialog->vbox->pack_start(new Gtk::Label(_("Name of the profile to create (the new profile is created as a copy of the current one) :")),1,1,0);
my $entry_dialog = new Gtk::Entry;
$dialog->vbox->pack_start($entry_dialog,1,1,0);
@@ -138,14 +138,14 @@ $button_new->signal_connect( clicked => sub {
$dialog->action_area->add($bbox_dialog);
$bbox_dialog->set_layout(-end);
my $button_ok = new Gtk::Button _("OK");
- $button_ok->signal_connect ( clicked => sub {
+ $button_ok->signal_connect (clicked => sub {
network::netconnect::add_profile($netcnx, $entry_dialog->get_text());
$netcnx->{PROFILE} = $entry_dialog->get_text();
Gtk->main_quit();
});
- $bbox_dialog->add($button_ok );
+ $bbox_dialog->add($button_ok);
my $button_cancel = new Gtk::Button _("Cancel");
- $button_cancel->signal_connect ( clicked => sub { Gtk->main_quit(); });
+ $button_cancel->signal_connect (clicked => sub { Gtk->main_quit() });
$bbox_dialog->add($button_cancel);
$dialog->show_all;
$dialog->set_modal(1);
@@ -189,7 +189,7 @@ my $isconnected = -1;
#- print "in connected local\n";
#- my $w = $in->wait_message('', _("Testing your connection..."), 1);
#- Gtk->main_iteration while Gtk->events_pending;
-#- $isconnected=connected();
+#- $isconnected = connected();
#-}
my $label7 = new Gtk::Label(_("Status:"));
$table1->attach($label7, 0, 1, 2, 3, 'fill', 'fill',0,0);
@@ -217,7 +217,7 @@ $table1->attach($button2, 2, 3, 2, 3, 'fill', 'fill',0,0);
my $hbox_frame1_button = new Gtk::HBox(0,0);
my $button1 = new Gtk::Button(_("Configure Internet Access..."));
-$button1->signal_connect( clicked => [ \&configure_net, '', $netcnx, $netc, $intf]);
+$button1->signal_connect(clicked => [ \&configure_net, '', $netcnx, $netc, $intf]);
$hbox_frame1_button->pack_start($button1, 0, 0, 0);
$vbox_frame1->pack_start($hbox_frame1_button,0,0,0);
@@ -241,7 +241,7 @@ build_clist();
my $hbox3 = new Gtk::HBox(0,0);
my $button3 = new Gtk::Button(_("Configure Local Area Network..."));
-$button3->signal_connect( clicked => [ \&configure_lan, '', $netcnx, $netc, $intf]);
+$button3->signal_connect(clicked => [ \&configure_lan, '', $netcnx, $netc, $intf]);
$hbox3->pack_start($button3, 0, 0, 0);
$vbox2->pack_start($hbox3, 0, 0, 0);
@@ -254,7 +254,7 @@ $bbox0->set_layout(-end);
$bbox0->add(new Gtk::Label(_("Click here to launch the wizard ->")));
my $button_wizard = new Gtk::Button _("Wizard...");
-$button_wizard->signal_connect( clicked => sub {
+$button_wizard->signal_connect(clicked => sub {
$::isWizard = 1;
system("drakconnect --wizard");
# netconnect::intro('', $netcnx, $in);
@@ -262,7 +262,7 @@ $button_wizard->signal_connect( clicked => sub {
network::netconnect::load_conf($netcnx, $netc, $intf);
update();
});
-$bbox0->add($button_wizard );
+$bbox0->add($button_wizard);
$vbox1->pack_start(new Gtk::HSeparator,0,0,5);
@@ -272,34 +272,34 @@ $bbox1->set_layout(-end);
#$bbox1->set_border_width(5);
my $button_expert = new Gtk::Button _("Expert Mode");
-$button_expert->signal_connect ( clicked => sub {
- foreach($button1, $button3) { $expert_mode ? $_->hide() : $_->show() }
+$button_expert->signal_connect (clicked => sub {
+ foreach ($button1, $button3) { $expert_mode ? $_->hide() : $_->show() }
$button_expert->child->set($expert_mode ? _("Expert Mode") : _("Normal Mode"));
$expert_mode = !$expert_mode;
});
-$bbox1->add($button_expert );
+$bbox1->add($button_expert);
my $button_apply = new Gtk::Button _("Apply");
-$button_apply->signal_connect ( clicked => sub {
+$button_apply->signal_connect (clicked => sub {
apply();
});
$button_apply->set_sensitive(0);
$bbox1->add($button_apply);
my $button_cancel = new Gtk::Button _("Cancel");
-$button_cancel->signal_connect ( clicked => sub {
+$button_cancel->signal_connect (clicked => sub {
$combo1->entry->set_text($old_profile);
update();
quit_global();
});
$bbox1->add($button_cancel);
my $button_ok = new Gtk::Button _("OK");
-$button_ok->signal_connect ( clicked => sub {
+$button_ok->signal_connect (clicked => sub {
my $dialog = new Gtk::Dialog();
$dialog->set_position(1);
$dialog->vbox->set_border_width(10);
my $label = new Gtk::Label(_("Please Wait... Applying the configuration"));
- $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->signal_connect (delete_event => sub { Gtk->main_quit() });
$dialog->vbox->pack_start($label,1,1,20);
$dialog->show_all;
Gtk->main_iteration while Gtk->events_pending;
@@ -309,11 +309,11 @@ $button_ok->signal_connect ( clicked => sub {
quit_global();
});
$bbox1->add($button_ok);
-$combo1->entry->signal_connect( 'changed', sub {
+$combo1->entry->signal_connect('changed', sub {
# connected() and disconnect_backend();
network::netconnect::set_profile($netcnx, $combo1->entry->get_text());
network::netconnect::load_conf($netcnx, $netc, $intf);
- $netcnx->{$_}=$netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
+ $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
network::netconnect::set_net_conf($netcnx, $netc);
update();
$button_apply->set_sensitive(1);
@@ -335,11 +335,11 @@ sub build_clist {
foreach my $i (0..$#all_cards) {
my $ip;
if (-e "/sbin/ifconfig") {
- local $_=`LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$i"`;
+ local $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "eth$i"`;
/inet addr\:$ip_regexp/; $ip = if_($1 && $2 && $3, "$1.$2.$3.$4");
- $_=`LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`;
+ $_ = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig`;
$state = /eth$i/ ? "up" : "down";
- } else { $ip=$intf->{"eth$_"}{IPADDR}; $state = "n/a"; }
+ } else { $ip = $intf->{"eth$_"}{IPADDR}; $state = "n/a" }
$clist1->append("", "eth$i", $ip , $intf->{"eth$i"}{BOOTPROTO}, $all_cards[$i]->[1], $state);
$clist1->set_pixmap ($i, 0, gtkcreate_png("eth_card_mini2.png"));
@@ -348,7 +348,7 @@ sub build_clist {
}
sub apply {
- $old_profile=$netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default";
+ $old_profile = $netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default";
network::netconnect::save_conf($netcnx, $netc, $intf);
$netcnx->{type} eq 'modem' and any::pppConfig($in, $netcnx->{$netcnx->{type}}, '');
@@ -398,10 +398,10 @@ sub update2 {
connected_bg(\$to_update);
if (defined $to_update) {
$isconnected = $to_update;
- if($isconnected !=-1) {
+ if ($isconnected != -1) {
if ($isconnected && !in_ifconfig($netcnx->{NET_INTERFACE})) {
$warning_label1->set(_("Warning, another Internet connection has been detected, maybe using your network"));
- $isconnected=0;
+ $isconnected = 0;
} else { $warning_label1->set("") }
$label8->set($isconnected ? _("Connected") : _("Not connected"));
$button2->child->set($isconnected ? _("Disconnect...") : _("Connect..."));
@@ -426,15 +426,15 @@ sub configure_lan {
my $dialog = new Gtk::Dialog();
$dialog->set_position(1);
$dialog->vbox->set_border_width(10);
- $dialog->signal_connect ( delete_event => sub { Gtk->main_quit() });
+ $dialog->signal_connect (delete_event => sub { Gtk->main_quit() });
$dialog->vbox->pack_start(new Gtk::Label(_("You don't have any configured interface.
Configure them first by clicking on 'Configure'")),1,1,0);
my $bbox_dialog = new Gtk::HButtonBox;
$dialog->action_area->add($bbox_dialog);
$bbox_dialog->set_layout(-end);
my $button_ok = new Gtk::Button _("OK");
- $button_ok->signal_connect ( clicked => sub { Gtk->main_quit() });
- $bbox_dialog->add($button_ok );
+ $button_ok->signal_connect (clicked => sub { Gtk->main_quit() });
+ $bbox_dialog->add($button_ok);
$dialog->show_all;
$dialog->set_modal(1);
Gtk->main();
@@ -443,7 +443,7 @@ Configure them first by clicking on 'Configure'")),1,1,0);
}
$window->set_policy (1, 1, 1);
- $window->signal_connect ( delete_event => sub { Gtk->main_quit; });
+ $window->signal_connect (delete_event => sub { Gtk->main_quit });
$window->set_position(1);
$window->set_title(_("LAN configuration"));
$window->border_width(10);
@@ -458,33 +458,33 @@ Configure them first by clicking on 'Configure'")),1,1,0);
my @conf_data;
$card_tab[2*$_] = \@infos;
$card_tab[2*$_+1] = \@conf_data;
- my $vbox_local=new Gtk::VBox(0,0);
+ my $vbox_local = new Gtk::VBox(0,0);
$vbox_local->set_border_width(10);
- $vbox_local->pack_start(new Gtk::Label( _("Adapter %s: %s", $_+1 , "eth$_")),1,1,0);
- # Eth${_}Hostname=$netc->{HOSTNAME}
- # Eth${_}HostAlias=" . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
- # Eth${_}Driver=$all_cards[$_]->[1]
+ $vbox_local->pack_start(new Gtk::Label(_("Adapter %s: %s", $_+1 , "eth$_")),1,1,0);
+ # Eth${_}Hostname = $netc->{HOSTNAME}
+ # Eth${_}HostAlias = " . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
+ # Eth${_}Driver = $all_cards[$_]->[1]
@conf_data = ([_("IP address"), \$intf->{"eth$_"}{IPADDR}],
[_("Netmask"), \$intf->{"eth$_"}{NETMASK}],
[_("Boot Protocol"), \$intf->{"eth$_"}{BOOTPROTO}, ["static", "dhcp", "bootp"]],
[_("Started on boot"), \$intf->{"eth$_"}{ONBOOT} , ["yes", "no"]],
[_("DHCP client"), \$netcnx->{dhcp_client}]
);
- my $i=0;
+ my $i = 0;
foreach my $j (@conf_data) {
- $infos[2*$i]=new Gtk::HBox(0,0);
- my $l=new Gtk::Label($j->[0]);
+ $infos[2*$i] = new Gtk::HBox(0,0);
+ my $l = new Gtk::Label($j->[0]);
$l->set_justify('left');
$infos[2*$i]->pack_start($l,1,1,0);
$vbox_local->pack_start($infos[2*$i],0,0,0);
if (defined $j->[2]) {
- my $c=new Gtk::Combo();
+ my $c = new Gtk::Combo();
$c->set_popdown_strings(@{$j->[2]});
- $infos[2*$i+1]=$c->entry;
+ $infos[2*$i+1] = $c->entry;
$infos[2*$i+1]->set_editable(0);
$infos[2*$i]->pack_start($c,0,0,0);
} else {
- $infos[2*$i+1]=new Gtk::Entry();
+ $infos[2*$i+1] = new Gtk::Entry();
$infos[2*$i]->pack_start($infos[2*$i+1],0,0,0);
}
$infos[2*$i+1]->set_text(${$j->[1]});
@@ -495,8 +495,8 @@ Configure them first by clicking on 'Configure'")),1,1,0);
if (-e "$prefix/etc/sysconfig/network-scripts/ifcfg-eth$c") {
$widget_temp = gtksignal_connect(new Gtk::Button(ethisup($c) ? _("deactivate now") : _("activate now")),
clicked => sub {
- system("/sbin/if".(ethisup($c)?"down":"up")." eth$c");
- gtkbuttonset($_[0], ethisup($c)?_("deactivate now"):_("activate now"));
+ system("/sbin/if".(ethisup($c)?"down" : "up")." eth$c");
+ gtkbuttonset($_[0], ethisup($c)? _("deactivate now") : _("activate now"));
});
} else {
$widget_temp = _("This interface has not been configured yet.\nLaunch the configuration wizard in the main window");
@@ -518,14 +518,14 @@ Configure them first by clicking on 'Configure'")),1,1,0);
my $bbox1 = new Gtk::HButtonBox;
$vbox1->pack_start($bbox1,0,0,10);
$bbox1->set_layout(-end);
- my $button_ok = new Gtk::Button( _("OK") );
- $button_ok->signal_connect ( clicked => sub {
+ my $button_ok = new Gtk::Button(_("OK"));
+ $button_ok->signal_connect (clicked => sub {
foreach (0..$#all_cards) {
- my $i=0;
+ my $i = 0;
my @infos = @{$card_tab[2*$_]};
my @conf_data = @{$card_tab[2*$_+1]};
foreach my $j (@conf_data) {
- ${$j->[1]}=$infos[2*$i+1]->get_text();
+ ${$j->[1]} = $infos[2*$i+1]->get_text();
$i++;
}
}
@@ -534,8 +534,8 @@ Configure them first by clicking on 'Configure'")),1,1,0);
$window->destroy(); Gtk->main_quit;
});
$bbox1->add($button_ok);
- my $button_cancel = new Gtk::Button( _("Cancel") );
- $button_cancel->signal_connect ( clicked => sub { $window->destroy(); Gtk->main_quit });
+ my $button_cancel = new Gtk::Button(_("Cancel"));
+ $button_cancel->signal_connect (clicked => sub { $window->destroy(); Gtk->main_quit });
$bbox1->add($button_cancel);
$window->set_modal(1);
@@ -555,30 +555,30 @@ sub configure_net {
my $dialog = new Gtk::Dialog();
$dialog->set_position(1);
$dialog->vbox->set_border_width(10);
- $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->signal_connect (delete_event => sub { Gtk->main_quit() });
$dialog->vbox->pack_start(new Gtk::Label(_("You don't have any internet connection.
Create one first by clicking on 'Configure'")),1,1,0);
my $bbox_dialog = new Gtk::HButtonBox;
$dialog->action_area->add($bbox_dialog);
$bbox_dialog->set_layout(-end);
my $button_ok = new Gtk::Button _("OK");
- $button_ok->signal_connect ( clicked => sub {
+ $button_ok->signal_connect (clicked => sub {
Gtk->main_quit();
});
- $bbox_dialog->add($button_ok );
+ $bbox_dialog->add($button_ok);
$dialog->show_all;
$dialog->set_modal(1);
Gtk->main();
$dialog->destroy;
return;
}
- my $cnx={};
+ my $cnx = {};
my @infos;
- $cnx=$netcnx->{$netcnx->{type}};
- my $auto_detect={};
+ $cnx = $netcnx->{$netcnx->{type}};
+ my $auto_detect = {};
my $window = new Gtk::Window -toplevel;
$window->set_policy (1, 1, 1);
- $window->signal_connect ( delete_event => sub { Gtk->main_quit; });
+ $window->signal_connect (delete_event => sub { Gtk->main_quit });
$window->set_position(1);
$window->set_title(_("Internet connection configuration"));
$window->border_width(10);
@@ -603,7 +603,7 @@ Create one first by clicking on 'Configure'")),1,1,0);
$vbox1->pack_start($frame1,1,1,0);
my $vbox2 = new Gtk::VBox(0,0);
$frame1->add($vbox2);
- my $i=0;
+ my $i = 0;
my @conf_data = ([_("Card IRQ"), \$cnx->{irq} ],
[_("Card mem (DMA)"), \$cnx->{mem} ],
[_("Card IO"), \$cnx->{io} ],
@@ -632,32 +632,32 @@ Create one first by clicking on 'Configure'")),1,1,0);
[_("Connection timeout (in sec)"), \$cnx->{huptimeout} ]
);
foreach (@conf_data) {
- $infos[2*$i]=new Gtk::HBox(0,0);
- my $l=new Gtk::Label($_->[0]);
+ $infos[2*$i] = new Gtk::HBox(0,0);
+ my $l = new Gtk::Label($_->[0]);
$l->set_justify('left');
$infos[2*$i]->pack_start($l,1,1,0);
$vbox2->pack_start($infos[2*$i],0,0,0);
if (defined $_->[2]) {
- my $c=new Gtk::Combo();
+ my $c = new Gtk::Combo();
$c->set_popdown_strings(@{$_->[2]});
- $infos[2*$i+1]=$c->entry;
+ $infos[2*$i+1] = $c->entry;
$infos[2*$i]->pack_start($c,0,0,0);
} else {
- $infos[2*$i+1]=new Gtk::Entry();
+ $infos[2*$i+1] = new Gtk::Entry();
$infos[2*$i]->pack_start($infos[2*$i+1],0,0,0);
#hide password if Entry Password
- if ($_->[0] eq _("Account Password") || $_->[0] eq _("Password")) { $infos[2*$i+1]->set_visibility(0)};
+ if ($_->[0] eq _("Account Password") || $_->[0] eq _("Password")) { $infos[2*$i+1]->set_visibility(0) };
}
$infos[2*$i+1]->set_text(${$_->[1]});
$i++;
}
my @mask;
-@mask=(0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0) if $netcnx->{type} eq 'lan';
-@mask=(0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq'isdn_internal'&& defined $cnx->{vendor} && defined $cnx->{id};
-@mask=(1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq'isdn_internal'&&(!defined $cnx->{vendor}||!defined $cnx->{id});
-@mask=(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0) if ($netcnx->{type} eq 'modem'||$netcnx->{type} eq 'isdn_external');
-@mask=(0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0) if $netcnx->{type} =~ 'adsl';
-@mask=(0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0) if $netcnx->{type} eq 'cable';
+@mask = (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0) if $netcnx->{type} eq 'lan';
+@mask = (0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq'isdn_internal'&& defined $cnx->{vendor} && defined $cnx->{id};
+@mask = (1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1) if $netcnx->{type} eq'isdn_internal'&&(!defined $cnx->{vendor}||!defined $cnx->{id});
+@mask = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0) if ($netcnx->{type} eq 'modem'||$netcnx->{type} eq 'isdn_external');
+@mask = (0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0) if $netcnx->{type} =~ 'adsl';
+@mask = (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0) if $netcnx->{type} eq 'cable';
$vbox1->pack_start(new Gtk::HSeparator,0,0,5);
@@ -665,10 +665,10 @@ Create one first by clicking on 'Configure'")),1,1,0);
$vbox1->pack_start($bbox1,0,0,0);
$bbox1->set_layout(-end);
my $button_ok = new Gtk::Button _("OK");
- $button_ok->signal_connect ( clicked => sub {
- $i=0;
+ $button_ok->signal_connect (clicked => sub {
+ $i = 0;
foreach (@mask) {
- ${$conf_data[$i]->[1]}=$infos[2*$i+1]->get_text() if ($_);
+ ${$conf_data[$i]->[1]} = $infos[2*$i+1]->get_text() if ($_);
$i++;
}
update();
@@ -677,15 +677,15 @@ Create one first by clicking on 'Configure'")),1,1,0);
});
$bbox1->add($button_ok);
my $button_cancel = new Gtk::Button _("Cancel");
- $button_cancel->signal_connect ( clicked => sub { $window->destroy(); Gtk->main_quit });
+ $button_cancel->signal_connect (clicked => sub { $window->destroy(); Gtk->main_quit });
$bbox1->add($button_cancel);
$window->set_modal(1);
$window->show_all();
- $i=0;
+ $i = 0;
foreach (@mask) {
if ($_) { $infos[2*$i]->show }
- else { $infos[2*$i]->hide; }
+ else { $infos[2*$i]->hide }
$i++;
}
$window->set_position('center_always');