From 5f84c9b55eef50291b97f7970afa9108e0aef1eb Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 3 Oct 2000 06:05:25 +0000 Subject: $OFF_SITE_LINK_ICON: Don't define here; simply defining it overrides a definition provided by previously loaded configuration code, and testing whether it's defined isn't needed since the default was false anyway. get_link_icon(): Add support for $OFF_SITE_LINK_ICON_HEIGHT and $OFF_SITE_LINK_ICON_WIDTH, giving the dimensions of the icon being used. This can make for faster page display. Both are optional. make_my_titlegraphic(): Fix insertion of the off-site icon link. do_env_funcdesc(): Remove debugging print. handle_rfclike_reference(): Remove trailing colon from first line; it doesn't really make sense and looks bad if we add an icon to mark off-site links. --- Doc/perl/python.perl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 98603c7..476ef66 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -36,15 +36,20 @@ sub make_icon_filename($){ return "$mydir$dd$myname$myext"; } -$OFF_SITE_LINK_ICON = ''; - sub get_link_icon($){ my $url = @_[0]; if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) { # absolute URL; assume it points off-site my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" [off-site link]"); } return ''; @@ -769,7 +774,6 @@ sub do_env_funcdesc{ my $arg_list = convert_args(next_argument()); my $idx = make_str_index_entry("$function_name()" . get_indexsubitem()); - print "\n--- funcdesc arg_list:\n$arg_list\n==="; $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; return "
$idx ($arg_list)\n
" . $_ . '
'; @@ -1293,7 +1297,7 @@ sub make_my_titlegraphic() { if ($TITLE_PAGE_GRAPHIC_WIDTH); $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); - $graphic .= "\n src=\"$mydir/$myname$myext\">\n"; + $graphic .= "\n src=\"$filename\">\n"; return $graphic; } @@ -1480,7 +1484,7 @@ sub handle_rfclike_reference{ return '
' . "\n
$what $rfcnum, $title$icon:" + . "\n >$what $rfcnum, $title$icon" . "\n
$text\n
" . $_; } @@ -1498,8 +1502,8 @@ sub do_cmd_seetitle{ my $url = next_optional_argument(); my $title = next_argument(); my $text = next_argument(); - my $icon = get_link_icon($url); if ($url) { + my $icon = get_link_icon($url); return '
' . "\n
$title$icon" -- cgit v0.12