From da4f7b1205b0a2a2f8c0ef3b734f7f2f36f53fe5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 26 Aug 2003 15:36:17 +0000 Subject: only write conf & install packages on exit (Ok press) if something really has been altered so that we do not write the config twice if the user already pressed the "apply" button --- perl-install/standalone/drakconnect | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index ba7c8b205..66f471dba 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -193,9 +193,7 @@ $window1->{window}->add( sensitive_buttons(0); local ($::isWizard, $::Wizard_finished) = (1, 1); eval { # For wizcancel - use Data::Dumper; print Dumper([ $intf, $netc ]); configureNetworkNet($in, $netc, $intf, @all_cards); - use Data::Dumper; print Dumper([ $intf, $netc ]); network::sethostname($intf); $button_apply->set_sensitive(1); update(); @@ -255,13 +253,15 @@ $window1->{window}->add( clicked => \&apply), gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => \&quit_global), gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { - my $dialog = _create_dialog(N("Please wait")); - gtkpack($dialog->vbox, - Gtk2::Label->new(N("Please Wait... Applying the configuration"))); - $dialog->show_all; - gtkflush(); - apply(); - $dialog->destroy; + if ($button_apply->get('sensitive')) { + my $dialog = _create_dialog(N("Please wait")); + gtkpack($dialog->vbox, + Gtk2::Label->new(N("Please Wait... Applying the configuration"))); + $dialog->show_all; + gtkflush(); + apply(); + $dialog->destroy; + } update(); quit_global(); }), -- cgit v1.2.1