summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
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) = @_;