diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-02 00:17:27 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-02 00:17:27 +0000 |
commit | d1adcc54ef9cfb44275614ab3312888855c500ba (patch) | |
tree | 8bafca729f39539ade3136764583ae5a610f691b | |
parent | 1d9fa0556f1b4d0d7ea8d5001021a0f9eee1645c (diff) | |
download | drakx-d1adcc54ef9cfb44275614ab3312888855c500ba.tar drakx-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.gz drakx-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.bz2 drakx-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.xz drakx-d1adcc54ef9cfb44275614ab3312888855c500ba.zip |
(load_from_uri,get_html_file) handle anchors in HTML help IDs
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/interactive/gtk.pm | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 9a304d6f3..893308677 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,5 @@ - keep soft links in HTML help directory +- handle anchors in HTML help IDs Version 11.64 - 1 October 2008 diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index c97b842ce..0a1cef4a2 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -772,22 +772,21 @@ sub is_help_file_exist { sub load_from_uri { my ($view, $url) = @_; - $url = get_html_file($::o, $url); - my $str = scalar(cat_($url)); - c::set_tagged_utf8($str); - $view->load_html_string($str, $help_path); + $view->open(get_html_file($::o, $url)); } sub get_html_file { my ($o, $url) = @_; - $url =~ s/#.*//; + my $anchor; + ($url, $anchor) = $url =~ /(.*)#(.*)/ if $url =~ /#/; $url .= '.html' if $url !~ /\.html$/; - find { -e $_ } map { "$help_path/${_}" } + $url = find { -e $_ } map { "$help_path/${_}" } map { my $id = $_; require lang; map { ("$_/$id") } map { $_, lc($_) } (split ':', lang::getLANGUAGE($o->{locale}{lang})), ''; } $url; + $anchor ? "$url#$anchor" : $url; } sub display_help { |