diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-09-24 23:45:58 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-09-24 23:45:58 +0000 |
commit | 86e1754c7c6681953a5e78a83a811d4840049c42 (patch) | |
tree | a1d3857df599e67db6e79ba5ab058e31101e99b5 | |
parent | e85a87d8fa6a6eb3f65fe77944660a4bc8472fdf (diff) | |
download | control-center-86e1754c7c6681953a5e78a83a811d4840049c42.tar control-center-86e1754c7c6681953a5e78a83a811d4840049c42.tar.gz control-center-86e1754c7c6681953a5e78a83a811d4840049c42.tar.bz2 control-center-86e1754c7c6681953a5e78a83a811d4840049c42.tar.xz control-center-86e1754c7c6681953a5e78a83a811d4840049c42.zip |
use a common signal handler
-rwxr-xr-x | control-center | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/control-center b/control-center index a82a6223..6634181a 100755 --- a/control-center +++ b/control-center @@ -808,21 +808,7 @@ foreach (@tree) { )); my $view = Gtk2::WebKit::WebView->new; - $view->signal_connect('navigation-requested' => - sub { - my (undef, undef, $request) = @_; - - # get the actual program ID: - my $url = $request->get_uri; - $url =~ s!file:///!!; - $url =~ s!%20! !g; - - $tool_callbacks{$url}->(); - # FIXME: the following code is currently useless: - # should we provide a way to kill buggy embedded programs ? - return if $left_locked; - warn_on_startup(); - }); + $view->signal_connect('navigation-requested' => \&navigation_handler); # Create right notebook pages : @@ -899,6 +885,21 @@ foreach (@tree) { } build_list(); +sub navigation_handler { + my (undef, undef, $request) = @_; + + # get the actual program ID: + my $url = $request->get_uri; + $url =~ s!file:///!!; + $url =~ s!%20! !g; + + $tool_callbacks{$url}->(); + # FIXME: the following code is currently useless: + # should we provide a way to kill buggy embedded programs ? + return if $left_locked; + warn_on_startup(); + } + my %icons = ( ); |