summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-13 16:41:11 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-13 16:41:11 +0000
commit18e5b1cac3868ec9c7bdd0455848786c829ab433 (patch)
tree63ed386dccb9f1e958eb67128cf39d69c47410a1
parent25fcdece9b0621520341db13374250dbb7d6e4cc (diff)
downloaddrakx-net-18e5b1cac3868ec9c7bdd0455848786c829ab433.tar
drakx-net-18e5b1cac3868ec9c7bdd0455848786c829ab433.tar.gz
drakx-net-18e5b1cac3868ec9c7bdd0455848786c829ab433.tar.bz2
drakx-net-18e5b1cac3868ec9c7bdd0455848786c829ab433.tar.xz
drakx-net-18e5b1cac3868ec9c7bdd0455848786c829ab433.zip
allow to start connection if the type can't get networks
-rw-r--r--lib/network/connection_manager.pm31
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index 74c490b..beebf45 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -120,20 +120,25 @@ sub configure_connection {
sub start_connection {
my ($cmanager) = @_;
- $cmanager->{connection} && $cmanager->{connection}{network} or return;
- if ($cmanager->{connection}->selected_network_is_configured || configure_connection($cmanager)) {
- gtkset_mousecursor_wait($cmanager->{gui}{w}{window}->window);
- my $_wait = $cmanager->{in}->wait_message(N("Please wait"), N("Connecting..."));
- #- settings have to be rewritten only if they are impacted by choices from the main window
- if ($cmanager->{connection}->can('get_networks')) {
- load_settings($cmanager);
- $cmanager->{connection}->write_settings($cmanager->{net});
- }
- $cmanager->{connection}->prepare_connection if $cmanager->{connection}->can('prepare_connection');
- $cmanager->{connection}->disconnect;
- $cmanager->{connection}->connect($cmanager->{in}, $cmanager->{net});
- gtkset_mousecursor_normal($cmanager->{gui}{w}{window}->window);
+ $cmanager->{connection} or return;
+ if ($cmanager->{connection}->can('get_networks')) {
+ $cmanager->{connection}{network} &&
+ ($cmanager->{connection}->selected_network_is_configured ||
+ configure_connection($cmanager))
+ or return;
+ }
+
+ gtkset_mousecursor_wait($cmanager->{gui}{w}{window}->window);
+ my $_wait = $cmanager->{in}->wait_message(N("Please wait"), N("Connecting..."));
+ #- settings have to be rewritten only if they are impacted by choices from the main window
+ if ($cmanager->{connection}->can('get_networks')) {
+ load_settings($cmanager);
+ $cmanager->{connection}->write_settings($cmanager->{net});
}
+ $cmanager->{connection}->prepare_connection if $cmanager->{connection}->can('prepare_connection');
+ $cmanager->{connection}->disconnect;
+ $cmanager->{connection}->connect($cmanager->{in}, $cmanager->{net});
+ gtkset_mousecursor_normal($cmanager->{gui}{w}{window}->window);
update_on_status_change($cmanager);
}