From 460f4cff442cc42bdb005cad90cda0a28aafc934 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Oct 2004 05:02:41 +0000 Subject: (save) applying changes can be quite time expensive, especially with ppp and wifi connections thus let's show the same "wait" dialog like in the old interface --- perl-install/standalone/drakconnect | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 4ad84f8e4..3ac269d41 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -608,13 +608,27 @@ sub populate_notebook { sub save { my ($netc, $p, $apply_button) = @_; - foreach (keys %$p) { - save_notebook($netc, $p->{$_}{intf}, $p->{$_}{gui}) or return; - $p->{$_}{intf}{save} ? $p->{$_}{intf}{save}->() : apply($netc, $p->{$_}{intf}); - } + my $dialog = _create_dialog(N("Please wait")); + gtkpack($dialog->vbox, + gtkshow(Gtk2::Label->new(N("Please Wait... Applying the configuration")))); + $dialog->show_all; + gtkset_mousecursor_wait(); + + Glib::Timeout->add(200, sub { + gtkflush(); + foreach (keys %$p) { + save_notebook($netc, $p->{$_}{intf}, $p->{$_}{gui}) or return; + $p->{$_}{intf}{save} ? $p->{$_}{intf}{save}->() : apply($netc, $p->{$_}{intf}); + } + + system("/etc/rc.d/init.d/network restart"); + $dialog->response(0); + }); + $dialog->run; - system("/etc/rc.d/init.d/network restart"); $apply_button->set_sensitive(0); + gtkset_mousecursor_normal(); + $dialog->destroy; } sub save_notebook { -- cgit v1.2.1