summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-25 17:19:57 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-25 17:19:57 +0000
commit7974bba281048792fe491ef5cab88f246e5d470e (patch)
tree6759351984d118358472877d24311295f8788cec /lib
parenta07b65e3765f440efadd4548393e9f215eacb46d (diff)
downloaddrakx-net-7974bba281048792fe491ef5cab88f246e5d470e.tar
drakx-net-7974bba281048792fe491ef5cab88f246e5d470e.tar.gz
drakx-net-7974bba281048792fe491ef5cab88f246e5d470e.tar.bz2
drakx-net-7974bba281048792fe491ef5cab88f246e5d470e.tar.xz
drakx-net-7974bba281048792fe491ef5cab88f246e5d470e.zip
warn that connection failed after timeout (instead of just hiding wait message)
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection_manager.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index d6dd3cb..c44bb63 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -213,7 +213,15 @@ sub start_connection {
$cmanager->update_on_status_change;
if ($cmanager->{wait_message_timeout}) {
$cmanager->{wait_message} = $wait;
- Glib::Timeout->add($cmanager->{wait_message_timeout}, sub { undef $cmanager->{wait_message} });
+ Glib::Timeout->add($cmanager->{wait_message_timeout},
+ sub {
+ if ($cmanager->{wait_message}) {
+ undef $cmanager->{wait_message};
+ $cmanager->{in}->ask_warn(N("Error"), N("Connection failed."))
+ if !$cmanager->{connection}->get_status;
+ }
+ undef;
+ });
};
}