Mageia Bugzilla – Attachment 4915 Details for
Bug 12527
mgaapplet crashed (Can't locate object method "set_uri_hook" via package "Gtk3::LinkButton")
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
we could either connect to the 'activate-link' signal or just rely on default behaviour
12527.diff (text/plain), 708 bytes, created by
Thierry Vignaud
on 2014-02-02 18:56:01 CET
(
hide
)
Description:
we could either connect to the 'activate-link' signal or just rely on default behaviour
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2014-02-02 18:56:01 CET
Size:
708 bytes
patch
obsolete
>diff --git a/mgaapplet_gui.pm b/mgaapplet_gui.pm >index e5d87b2..305c529 100644 >--- a/mgaapplet_gui.pm >+++ b/mgaapplet_gui.pm >@@ -114,9 +114,8 @@ sub fill_n_run_portable_dialog { > sub new_link_button { > my ($url, $text) = @_; > my $link = Gtk3::LinkButton->new($url, $text); >- $link->set_uri_hook(sub { >- my (undef, $url) = @_; >- run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $url); >+ $link->signal_connect('activate-link' => sub { >+ run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $link->get_property('uri')); > }); > $link; > }
diff --git a/mgaapplet_gui.pm b/mgaapplet_gui.pm index e5d87b2..305c529 100644 --- a/mgaapplet_gui.pm +++ b/mgaapplet_gui.pm @@ -114,9 +114,8 @@ sub fill_n_run_portable_dialog { sub new_link_button { my ($url, $text) = @_; my $link = Gtk3::LinkButton->new($url, $text); - $link->set_uri_hook(sub { - my (undef, $url) = @_; - run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $url); + $link->signal_connect('activate-link' => sub { + run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $link->get_property('uri')); }); $link; }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12527
: 4915 |
4924