summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-02-22 18:31:35 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-02-23 08:06:02 -0500
commit400b08b164147447ae77669bd03fdaac74e6a499 (patch)
tree460e6b8f881dcace0fd7850b234924c0e45c845a
parent7050de664fe771d47045091f9177dc41b518a8cf (diff)
downloaddrakx-400b08b164147447ae77669bd03fdaac74e6a499.tar
drakx-400b08b164147447ae77669bd03fdaac74e6a499.tar.gz
drakx-400b08b164147447ae77669bd03fdaac74e6a499.tar.bz2
drakx-400b08b164147447ae77669bd03fdaac74e6a499.tar.xz
drakx-400b08b164147447ae77669bd03fdaac74e6a499.zip
enable to use WebKit2 with mygtk3
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/mygtk3.pm17
2 files changed, 14 insertions, 4 deletions
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: