From 400b08b164147447ae77669bd03fdaac74e6a499 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 22 Feb 2016 18:31:35 +0100 Subject: enable to use WebKit2 with mygtk3 --- perl-install/NEWS | 1 + perl-install/mygtk3.pm | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index bffb591d1..bede8c7aa 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,6 @@ - detect nvme devices as block devices (mga#17743) - detect partitions on nvme devices (mga#17743) +- enable to use WebKit2 with mygtk3 - drakboot: o partial fix for removing kernel from grub2 config (mga#16268) diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index da057b856..2662439ce 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -603,12 +603,21 @@ sub _gtk__TextView { $w; } + +sub _gtk__WebKit2_WebView { + my ($w, $opts, $class, $_action) = @_; + _gtk__WebKit_WebView($w, $opts, $class, $_action); +} + sub _gtk__WebKit_WebView { - my ($w, $opts, $_class, $_action) = @_; + my ($w, $opts, $class, $_action) = @_; if (!$w) { - require Gtk3::WebKit; - Gtk3::WebKit->import; # needed for initializing introspection - $w = Gtk3::WebKit::WebView->new; + $class =~ s/_([^_]*)$/::$1/; + my $base_class = "Gtk3::$class"; + $base_class =~ s/_WebView$//; + eval "require $base_class"; + $base_class->import; # needed for initializing introspection + $w = $base_class->new; } # disable contextual menu: -- cgit v1.2.1