summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-16 17:53:42 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-16 17:53:42 +0000
commit4dae6619d14d8c5eef7df13686857ee744da457e (patch)
treed6c4eda353044fcdb7706bdd35080310d9c1897c /perl-install/interactive
parent6117d5bcf976594e1a2e533f19796af2378dbb5c (diff)
downloaddrakx-backup-do-not-use-4dae6619d14d8c5eef7df13686857ee744da457e.tar
drakx-backup-do-not-use-4dae6619d14d8c5eef7df13686857ee744da457e.tar.gz
drakx-backup-do-not-use-4dae6619d14d8c5eef7df13686857ee744da457e.tar.bz2
drakx-backup-do-not-use-4dae6619d14d8c5eef7df13686857ee744da457e.tar.xz
drakx-backup-do-not-use-4dae6619d14d8c5eef7df13686857ee744da457e.zip
(>display_help,display_release_notes,load_from_uri) switch from perl-Gtk2-Html2
to perl-Gtk2-WebKit in order to display release notes & help
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm24
1 files changed, 7 insertions, 17 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 929083396..a1de96ead 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -754,17 +754,15 @@ sub filter_widgets {
}
}
-my $help_path = "/usr/share/doc/installer-help";
+my $help_path = "/usr/share/doc/installer-help/";
sub load_from_uri {
- my ($document, $url) = @_;
+ my ($view, $url) = @_;
$url =~ s/#.*$//; # prevent segfaults on anchors
$url = get_html_file($::o, $url);
my $str = scalar(cat_($url));
c::set_tagged_utf8($str);
- $document->clear;
- $document->open_stream("text/html");
- $document->write_stream($str);
+ $view->load_html_string($str, $help_path);
}
sub get_html_file {
@@ -780,18 +778,10 @@ sub get_html_file {
sub display_help {
my ($o, $common, $mainw) = @_;
if (my $file = $common->{interactive_help_id}) {
- require Gtk2::Html2;
- my $view = Gtk2::Html2::View->new;
- my $document = Gtk2::Html2::Document->new;
- $document->signal_connect(request_url => sub {
- my ($_document, $url, $stream) = @_;
- $stream->write(join('', cat_("$help_path/$url")));
- $stream->close;
- });
- $document->signal_connect('link-clicked' => \&load_from_uri);
- $view->set_document($document);
-
- load_from_uri($document, "$file.html");
+ require Gtk2::WebKit;
+ my $view = Gtk2::WebKit::WebView->new;
+
+ load_from_uri($view, "$file.html");
my $w = ugtk2->new(N("Help"), transient => $mainw->{real_window}, modal => 1);
gtkadd($w->{rwindow},