summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draknet47
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);