summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-02 00:17:27 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-02 00:17:27 +0000
commitd1adcc54ef9cfb44275614ab3312888855c500ba (patch)
tree8bafca729f39539ade3136764583ae5a610f691b /perl-install/interactive/gtk.pm
parent1d9fa0556f1b4d0d7ea8d5001021a0f9eee1645c (diff)
downloaddrakx-backup-do-not-use-d1adcc54ef9cfb44275614ab3312888855c500ba.tar
drakx-backup-do-not-use-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.gz
drakx-backup-do-not-use-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.bz2
drakx-backup-do-not-use-d1adcc54ef9cfb44275614ab3312888855c500ba.tar.xz
drakx-backup-do-not-use-d1adcc54ef9cfb44275614ab3312888855c500ba.zip
(load_from_uri,get_html_file) handle anchors in HTML help IDs
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm11
1 files changed, 5 insertions, 6 deletions
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 {