[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/kioslave
From: Michael Pyne <mpyne () purinchu ! net>
Date: 2009-03-15 22:27:21
Message-ID: 1237156041.308308.308.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 939892 by mpyne:
Add a common CSS theme for kio documentation filters, and port kio_info and kio_man \
to use it. kio_perldoc (in kdesdk) will be ported shortly.
M +1 -0 CMakeLists.txt
A docfilter (directory)
A docfilter/CMakeLists.txt
A docfilter/kio_docfilter.css
M +46 -26 info/kde-info2html
M +0 -1 man/CMakeLists.txt
M +1 -1 man/kio_man.cpp
D man/kio_man.css
--- trunk/KDE/kdebase/runtime/kioslave/CMakeLists.txt #939891:939892
@@ -21,6 +21,7 @@
add_subdirectory( sftp )
add_subdirectory( fish )
add_subdirectory( thumbnail )
+add_subdirectory( docfilter )
if(NOT WIN32)
add_subdirectory( floppy )
--- trunk/KDE/kdebase/runtime/kioslave/info/kde-info2html #939891:939892
@@ -45,14 +45,18 @@
use strict;
# set here the full path of the info2html.conf
-push @INC, $1 if $0 =~ m!(.*/)[^/]+$!; # full path of config file is passed in \
ARGV[1] by caller but let's clean this anyway +push @INC, $1 if $0 =~ m{(.*/)[^/]+$}; \
# full path of config file is passed in ARGV[1] by caller but let's clean this anyway \
my $IMAGEDIR = "file:$ARGV[1]/"; # TV: broken, broken, not passed my $config_file = \
$ARGV[0]; +my $css_file = `kde4-config --path data --locate \
kio_docfilter/kio_docfilter.css`; +chomp $css_file;
delete $ENV{CDPATH};
delete $ENV{ENV};
require $config_file; #-- configuration settings
-my $STYLESHEET_KDE = "<link rel=\"stylesheet\" href=\"help:common/kde-default.css\" \
type=\"text/css\"/>"; +my $STYLESHEET_KDE =
+ qq(<link rel="stylesheet" href="help:common/kde-default.css" type="text/css"/>
+ <link rel="stylesheet" href="file://$css_file" type="text/css"/>);
my $LOGO_KDE = "<img src=\"help:/common/kde_logo.png\" alt=\"KDE - The K Desktop \
Environment\" width=\"296\" height=\"79\" border=\"0\">";
# the use of a query should make sure it never conflicts with a "real" path
@@ -86,6 +90,7 @@
#-- TEXT : error message if a file could not be opened
print <<EOF;
<head>
+$STYLESHEET_KDE
<title>Info: (no page found)</title>
</head>
<body>
@@ -113,7 +118,9 @@
my ($File,$Tag) = @_;
print <<EOF;
<html><head><title>Doing redirection</title>
+ $STYLESHEET_KDE
<meta http-equiv="refresh" content="0; url=info:$File/$Tag">
+ </head>
<body>
<h1>Redirecting .... </h1>
<p>If you are not automatically taken to a new page, <a \
href="info:$File/$Tag">click here</a> to continue. @@ -622,30 +629,38 @@
$UpcaseInfoFile =~ tr/a-z/A-Z/;
#-- TEXT for the header of an info node
print <<EOF;
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html>
<head>
<title>Info: ($BaseInfoFile) $LinkList[1]</title>
$STYLESHEET_KDE
+ <!-- These can't be in the .css file due to the help KIOSlave not being
+ followed. -->
+ <style>
+ #header_top { background-image: url("help:/common/top.jpg"); }
+ #header_top div { background-image: url("help:/common/top-left.jpg"); }
+ #header_top div div { background-image: url("help:/common/top-right.jpg"); }
+
+ <!-- Newer updates to kde.org, looks good -->
+ #header_bottom {
+ margin: 0 auto;
+ padding: 0.1em 0em 0.3em 0;
+ vertical-align: middle;
+ text-align: center;
+ background: #eeeeee;
+ }
+ </style>
</head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" \
alink="#0000FF"> + <body>
<!--header start-->
-<div style="background-image: url(help:/common/top-middle.png); width: 100%; height: \
131px;">
-<div style="position: absolute; right: 0px;">
-<img src="help:/common/top-right.png" style="margin: 0px" alt="" />
-</div>
-<div style="position: absolute; left: 0px;">
-<img src="help:/common/top-left.png" style="margin: 0px" alt="" />
-</div>
-<div style="position: absolute; top: 25px; right: 100px; text-align: right; \
font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px \
5px; color: #444">
-$UpcaseInfoFile: $LinkList[1]</div>
-</div>
-<div class="header" style="border: none">
+ <div id="header"><div id="header_top">
+ <div><div>
+ <img src="help:common/top-kde.jpg"> $UpcaseInfoFile: $LinkList[1]</div></div>
+ </div>
+<div class="header_bottom" style="border: none">
EOF
common_headers($LinkList, $BaseInfoFile);
print <<EOF;
-</div>
+</div></div>
<div id="contents">
<div class="chapter">
EOF
@@ -655,17 +670,21 @@
my ($LinkList, $BaseInfoFile) = @_;
my @LinkList = @{$LinkList};
print <<EOF;
- <tr><td width="33%" align="left" valign="top" class="navLeft">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr><td width="33%" align="left">
EOF
&PrintLinkInfo("Prev", $LinkList[6], $LinkList[7], $BaseInfoFile);
print <<EOF;
- </td><td width="34%" align="center" valign="top" class="navCenter">
+ </td><td width="34%" align="center">
EOF
&PrintLinkInfo("Up", $LinkList[4], $LinkList[5], $BaseInfoFile);
print <<EOF;
- </td><td width="33%" align="right" valign="top" class="navRight">
+ </td><td width="33%" align="right">
EOF
&PrintLinkInfo("Next", $LinkList[2], $LinkList[3], $BaseInfoFile);
+ print <<EOF;
+ </td></tr></table>
+EOF
}
#---------------------------------------------------------
@@ -681,16 +700,16 @@
#-- TEXT for the footer of an info node
print <<EOF;
</div>
+ <div id="footer">
+EOF
+ common_headers($LinkList, $BaseInfoFile);
+ print <<EOF;
+ <div id="footer_text">
<em>Automatically generated by a version of
<a href="$info2html::config::DOC_URL">
<b>info2html</b>
</a> modified for <a href="http://www.kde.org/">KDE</a></em>.
- <div class="bottom-nav">
-EOF
- common_headers($LinkList, $BaseInfoFile);
- print <<EOF;
- <!--<br />--><em>$LinkFile</em>
- </div>
+ </div></div>
</body>
</html>
EOF
@@ -704,6 +723,7 @@
print <<EOF;
<head>
<title>Info Files - Error Message</title>
+$STYLESHEET_KDE
</head>
<h1>Error</h1>
<body>
--- trunk/KDE/kdebase/runtime/kioslave/man/CMakeLists.txt #939891:939892
@@ -28,6 +28,5 @@
########### install files ###############
-install( FILES kio_man.css DESTINATION ${DATA_INSTALL_DIR}/kio_man )
install( FILES man.protocol kmanpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
--- trunk/KDE/kdebase/runtime/kioslave/man/kio_man.cpp #939891:939892
@@ -134,7 +134,7 @@
section_names << "1" << "2" << "3" << "3n" << "3p" << "4" << "5" << "6" << "7"
<< "8" << "9" << "l" << "n";
- QString cssPath(KStandardDirs::locate( "data", "kio_man/kio_man.css" ));
+ QString cssPath(KStandardDirs::locate( "data", "kio_docfilter/kio_docfilter.css" \
)); KUrl cssUrl(KUrl::fromPath(cssPath));
m_manCSSFile = cssUrl.url().toUtf8();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic