From b9f60e4207d0f0bc31bd030be7b52fbf45607ba2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 26 Sep 2008 13:08:20 +0000 Subject: (_gtk__WebKit_View) add basic support for WeBkit, with ability to disable contextual menu --- perl-install/NEWS | 2 ++ perl-install/mygtk2.pm | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 148f6d77f..45367c0cb 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- factorize WebKit code with mcc + Version 11.54.2 - 26 September 2008 - bootloader-config: 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) = @_; -- cgit v1.2.1