added OpenSearch plugin. (closes: #516894)

* data/gnome-library-search.xml, data/xslt/db2html.xsl,
data/xslt/gtk-doc.xsl, data/xslt/heading.xsl, data/xslt/html2html.xsl,
data/xslt/indexes.xsl,j src/lgo.py: added OpenSearch plugin.
(closes: #516894)


svn path=/trunk/; revision=377
This commit is contained in:
Frederic Peters 2008-02-16 21:21:33 +00:00
parent 570d922267
commit 4a909e45b4
8 changed files with 37 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2008-02-16 Frederic Peters <fpeters@0d.be>
* data/gnome-library-search.xml, data/xslt/db2html.xsl,
data/xslt/gtk-doc.xsl, data/xslt/heading.xsl, data/xslt/html2html.xsl,
data/xslt/indexes.xsl,j src/lgo.py: added OpenSearch plugin.
(closes: #516894)
2008-02-16 Frederic Peters <fpeters@0d.be>
* data/overlay.xml.in: updated gdl description.

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- GNOME Library Search -->
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>GNOME Library</ShortName>
<Description>Search GNOME Documentation Library</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEAAACxABrSO9dQAAAcBJREFUOE9jYKAV4OXjY+Lh5fUCYlGQHTw8PBHc3NyngPiIi6urOE57hUVE5YRERBUEhITDBQSF/oeGha0RFBaxA7L/gvhCwiL/z5w5U4fTAFEJyVOm5ha3FZVV0oDs/9NnzDgNpPtBbBAuKCz6DwQ2GAZIyykEyiurBkvKyq/1Cwz6v2XbNpv0rOwnnz59qgKKNUrJyv/Pys37/+3bt1astsspqy01s7L9tnzlKr0TJ0/uraytF4yIiQ9W1tAJ1zUyDT546PAyoM1ROJ1uYmWrXlFd9+XQkaPBSpq68xU1dL4B8X8k/NonKFQVb6S19/QbaxqZv1LRNfqPDc9fvHQeXgPUjCzmAvF/bDgpK///9x8/0vEaoG5mdxaI/yNjXWvn/5Nmzv377dt33FEHM1Xd0nkFEP+H4aDEjP9Xbtw6Dww8U3VrV2GCiVbN1t1VzdbjPwjrufj9f//h45K8ujYBIP8uSCwsvWAhQUP0PULmqtr7/gdhU7/oPlUHvwwYf8veg2cJGnDr/kPumKLaParOwf9VnILguHPmwr9Ar/gQNACkAKiQefO+I4Wds5fcnrRo9f+Dp85fA4r5E6WZVEUAwP7UJzhr+SEAAAAASUVORK5CYII=</Image>
<Url type="text/html" method="GET" template="http://www.google.com/custom?domains=library.gnome.org&amp;sitesearch=library.gnome.org&amp;q={searchTerms}"/>
</OpenSearchDescription>

View File

@ -188,9 +188,7 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
<!-- FIXME: when we override db2html.css, do this there -->
<xsl:template name="db2html.division.head.extra">
<xsl:if test="not($libgo.tarball)">
<link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<xsl:call-template name="libgo.head"/>
</xsl:if>
</xsl:template>

View File

@ -58,9 +58,9 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
<meta name="generator"
content="GTK-Doc V{$gtkdoc.version} (XML mode)"/>
</xsl:if>
<link rel="stylesheet" href="/skin/lgo.css" type="text/css"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<xsl:call-template name="libgo.head"/>
<!-- copied from the html.head template in the docbook stylesheets
we don't want links for all refentrys, thats just too much

View File

@ -131,5 +131,12 @@
</div>
</xsl:template>
<xsl:template name="libgo.head">
<link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<link rel="search" type="application/opensearchdescription+xml"
href="/gnome-library-search.xml" title="GNOME Library Search" />
</xsl:template>
</xsl:stylesheet>

View File

@ -113,14 +113,12 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
<xsl:if test="$libgo.h2hmode = 'gtkmm'">
<xsl:apply-templates select="html:head/html:link[@rel = 'stylesheet']"/>
</xsl:if>
<link rel="stylesheet" href="/skin/lgo.css" type="text/css" />
<xsl:call-template name="libgo.head"/>
<xsl:if test="$libgo.extracss">
<link rel="stylesheet" href="/skin/{$libgo.extracss}" type="text/css" />
</xsl:if>
<xsl:apply-templates select="html:head/html:title"/>
<xsl:apply-templates select="html:head/html:link[@rel != 'stylesheet']"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
</head>
<body>
<xsl:call-template name="libgo.header" />

View File

@ -225,9 +225,7 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
<html lang="{$lang}">
<head>
<title><xsl:value-of select="title" /> - GNOME Library</title>
<link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<xsl:call-template name="libgo.head"/>
<script type="text/javascript" src="/js/strings.js" />
</head>
<body class="with-star">
@ -464,9 +462,7 @@ along with libgo; if not, write to the Free Software Foundation, Inc.,
</xsl:otherwise>
</xsl:choose>
</title>
<link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<xsl:call-template name="libgo.head"/>
<script type="text/javascript" src="/js/strings.js" />
<xsl:if test="$filename = 'references'">
<xsl:if test="$libgo.dbm_support">
@ -598,15 +594,13 @@ $('#symbol').autocomplete('/symbols/lookup/',
<html lang="{@lang}">
<head>
<title>GNOME Library</title>
<link rel="stylesheet" type="text/css" href="/skin/lgo.css"/>
<xsl:call-template name="libgo.head"/>
<xsl:comment>[if IE]&gt;
&lt;style&gt;
div.body-sidebar { width: 100%; }
&lt;/style&gt;
&lt;![endif]</xsl:comment><xsl:text>
</xsl:text>
<link rel="icon" type="image/png" href="/skin/gnome-16.png"/>
<link rel="SHORTCUT ICON" type="image/png" href="/skin/gnome-16.png"/>
<script type="text/javascript" src="/js/strings.js" />
</head>
<body class="with-star">

View File

@ -1387,6 +1387,12 @@ class Lgo:
if not os.path.exists(os.path.join(self.config.output_dir, 'skin/icons')):
os.makedirs(os.path.join(self.config.output_dir, 'skin/icons'))
src = os.path.join(data_dir, 'gnome-library-search.xml')
dst = os.path.join(self.config.output_dir, 'gnome-library-search.xml')
if not os.path.exists(dst) or \
os.stat(src)[stat.ST_MTIME] > os.stat(dst)[stat.ST_MTIME]:
open(dst, 'w').write(open(src, 'r').read())
for src in glob.glob('%s/*.js' % self.javascript_dir):
dst = os.path.join(self.config.output_dir, 'js', os.path.basename(src))
if not os.path.exists(dst) or \