diff options
author | damien <damien@mandriva.com> | 2001-04-12 08:19:45 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-04-12 08:19:45 +0000 |
commit | 7ac401f247fda28ae9d03b8b507046566c43b513 (patch) | |
tree | cf003a18f3db34c09666cc7cf04c5f04b09a976e /perl-install/standalone | |
parent | 22941f0c1eee02b84675f6ac0e62f4c2ba07c062 (diff) | |
download | drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.gz drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.bz2 drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.xz drakx-7ac401f247fda28ae9d03b8b507046566c43b513.zip |
corrected network connection
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/draknet | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index 27a388548..f8f676dec 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -170,27 +170,38 @@ $table1->attach($label8, 1, 2, 2, 3, 'fill', 'fill',0,0); my $button2 = new Gtk::Button($c ? _("Disconnect...") : _("Connect...")); $button2->signal_connect (clicked => sub { - $::isWizard = 0; + my $dialog = new Gtk::Dialog(); + $dialog->set_position(1); + $dialog->vbox->set_border_width(10); + $dialog->vbox->pack_start(my $l = new Gtk::Label(""),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(); }); + $button_ok->set_sensitive(0); + $bbox_dialog->add($button_ok ); + $dialog->show_all; + $dialog->set_modal(1); if (!netconnect::connected('', $netc)) { - my $up; - { - my $w = $in->wait_message('', _("Opening your connection..."), 1); - netconnect::connect_backend($prefix); - sleep 5; - $up=netconnect::connected($prefix, $netc); - } - $in->ask_warn('', $up ? _("The system is now connected to Internet.") : _("The system doesn't seem to be connected to internet. -Try to reconfigure your connection.") ); + $l->set(_("Starting your connection...")); + Gtk->main_iteration while Gtk->events_pending; + netconnect::connect_backend($prefix); + sleep 5; + my $up=netconnect::connected($prefix, $netc); + $l->set($up ? _("The system is now connected to Internet.") : _("The system doesn't seem to be connected to internet. +Try to reconfigure your connection.")); } else { - my $up; - { - my $w = $in->wait_message('', _("Closing your connection..."), 1); - netconnect::disconnect_backend($prefix); - sleep 5; - $up=netconnect::connected($prefix, $netc); - } - $in->ask_warn('', $up ? _("The connection is not closed. Try to do it manually by running /etc/sysconfig/network-scripts/net_cnx_down in root.") : _("The system is now disconnected.") ); + $l->set(_("Closing your connection...")); + Gtk->main_iteration while Gtk->events_pending; + netconnect::disconnect_backend($prefix); + sleep 5; + my $up=netconnect::connected($prefix, $netc); + $l->set($up ? _("The connection is not closed. Try to do it manually by running /etc/sysconfig/network-scripts/net_cnx_down in root.") : _("The system is now disconnected.") ); } + $button_ok->set_sensitive(1); + Gtk->main(); + $dialog->destroy; update(); }); $table1->attach($button2, 2, 3, 2, 3, 'fill', 'fill',0,0); |