summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-26 13:08:20 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-26 13:08:20 +0000
commitb9f60e4207d0f0bc31bd030be7b52fbf45607ba2 (patch)
treeb436912c7b5c6ddf841b2f696f48775bc4c9467d /perl-install/mygtk2.pm
parent47651f2396ee02915fb1edabf78cd5c525bc4bcf (diff)
downloaddrakx-b9f60e4207d0f0bc31bd030be7b52fbf45607ba2.tar
drakx-b9f60e4207d0f0bc31bd030be7b52fbf45607ba2.tar.gz
drakx-b9f60e4207d0f0bc31bd030be7b52fbf45607ba2.tar.bz2
drakx-b9f60e4207d0f0bc31bd030be7b52fbf45607ba2.tar.xz
drakx-b9f60e4207d0f0bc31bd030be7b52fbf45607ba2.zip
(_gtk__WebKit_View) add basic support for WeBkit, with ability to
disable contextual menu
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 9e4c870c8..fa024a57d 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -527,6 +527,24 @@ sub _gtk__TextView {
$w;
}
+sub _gtk__WebKit_View {
+ my ($w, $opts, $_class, $action) = @_;
+ if (!$w) {
+ $w = Gtk2::WebKit::WebView->new;
+ }
+
+ # disable contextual menu:
+ if (delete $opts->{no_popup_menu}) {
+ $w->signal_connect('populate-popup' => sub {
+ my (undef, $menu) = @_;
+ $menu->destroy if $menu;
+ 1;
+ });
+ }
+
+ $w;
+}
+
sub _gtk__ComboBox {
my ($w, $opts, $_class, $action) = @_;