summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: