diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-10-05 05:02:41 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-10-05 05:02:41 +0000 |
commit | 460f4cff442cc42bdb005cad90cda0a28aafc934 (patch) | |
tree | 46dddccc3e4d6e82394088df224a918154f7c91a /perl-install | |
parent | 2fafff773df395225beed02d4c5959bc72c73e0b (diff) | |
download | drakx-backup-do-not-use-460f4cff442cc42bdb005cad90cda0a28aafc934.tar drakx-backup-do-not-use-460f4cff442cc42bdb005cad90cda0a28aafc934.tar.gz drakx-backup-do-not-use-460f4cff442cc42bdb005cad90cda0a28aafc934.tar.bz2 drakx-backup-do-not-use-460f4cff442cc42bdb005cad90cda0a28aafc934.tar.xz drakx-backup-do-not-use-460f4cff442cc42bdb005cad90cda0a28aafc934.zip |
(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
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/drakconnect | 24 |
1 files 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 { |