[yelp] Enable syntax highlighting



commit 45d80fbeceb9f1741213c6582884e5ade48d081f
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Dec 8 21:51:07 2010 -0500

    Enable syntax highlighting

 configure.ac                   |    2 ++
 libyelp/yelp-view.c            |    8 +++-----
 stylesheets/db2html.xsl.in     |    5 -----
 stylesheets/mal2html.xsl.in    |    4 ----
 stylesheets/yelp-common.xsl.in |   12 +++++-------
 5 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c48fac2..7ee78d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,8 @@ XSL_ICONS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/icons.xsl"
 AC_SUBST(XSL_ICONS)
 XSL_HTML="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/html.xsl"
 AC_SUBST(XSL_HTML)
+XSL_JSDIR="`$PKG_CONFIG --variable=jsdir yelp-xsl`"
+AC_SUBST(XSL_JSDIR)
 
 XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
 AC_SUBST(XSL_GETTEXT)
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index 5c60557..4178974 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -78,7 +78,7 @@ static void        view_populate_popup            (YelpView           *view,
                                                    gpointer            data);
 static void        view_script_alert              (YelpView           *view,
                                                    WebKitWebFrame     *frame,
-                                                   gchar             **message,
+                                                   gchar              *message,
                                                    gpointer            data);
 static gboolean    view_navigation_requested      (WebKitWebView             *view,
                                                    WebKitWebFrame            *frame,
@@ -363,6 +363,7 @@ yelp_view_class_init (YelpViewClass *klass)
     nautilus_sendto = g_find_program_in_path ("nautilus-sendto");
 
     websettings = webkit_web_settings_new ();
+    g_object_set (websettings, "enable-universal-access-from-file-uris", TRUE, NULL);
     g_signal_connect (settings,
                       "fonts-changed",
                       G_CALLBACK (settings_set_fonts),
@@ -1188,7 +1189,7 @@ view_populate_popup (YelpView *view,
 static void
 view_script_alert (YelpView        *view,
                    WebKitWebFrame  *frame,
-                   gchar          **message,
+                   gchar           *message,
                    gpointer         data)
 {
     printf ("\n\n===ALERT===\n%s\n\n", message);
@@ -1231,9 +1232,6 @@ view_resource_request (WebKitWebView         *view,
     gchar last;
     gchar *newpath;
 
-    debug_print (DB_FUNCTION, "entering\n");
-    debug_print (DB_ARG, "    uri=\"%s\"\n", requri);
-
     if (!g_str_has_prefix (requri, BOGUS_URI))
         return;
 
diff --git a/stylesheets/db2html.xsl.in b/stylesheets/db2html.xsl.in
index 5a87e22..c44950f 100644
--- a/stylesheets/db2html.xsl.in
+++ b/stylesheets/db2html.xsl.in
@@ -37,9 +37,4 @@
   </xsl:choose>
 </xsl:template>
 
-<!-- == db2html.division.head.extra == -->
-<xsl:template name="db2html.division.head.extra">
-  <xsl:call-template name="yelp.common.javascript"/>
-</xsl:template>
-
 </xsl:stylesheet>
diff --git a/stylesheets/mal2html.xsl.in b/stylesheets/mal2html.xsl.in
index fb623e2..0d45cba 100644
--- a/stylesheets/mal2html.xsl.in
+++ b/stylesheets/mal2html.xsl.in
@@ -80,8 +80,4 @@ body, div.body {
 </xsl:if>
 </xsl:template>
 
-<xsl:template name="html.head.custom">
-  <xsl:call-template name="yelp.common.javascript"/>
-</xsl:template>
-
 </xsl:stylesheet>
diff --git a/stylesheets/yelp-common.xsl.in b/stylesheets/yelp-common.xsl.in
index e773a79..3d469e7 100644
--- a/stylesheets/yelp-common.xsl.in
+++ b/stylesheets/yelp-common.xsl.in
@@ -11,6 +11,9 @@
 
 <xsl:param name="html.extension" select="''"/>
 
+<xsl:param name="html.syntax.highlight" select="true()"/>
+<xsl:param name="html.js.root" select="'file://@XSL_JSDIR@/'"/>
+
 <!-- == html.output == -->
 <xsl:template name="html.output">
   <xsl:param name="node" select="."/>
@@ -83,14 +86,10 @@ div.body {
   border: none;
 }
 </xsl:text>
-<xsl:call-template name="yelp.css.custom"/>
 </xsl:template>
 
-<xsl:template name="yelp.css.custom"/>
-
-<xsl:template name="yelp.common.javascript">
-<script type="text/javascript" language="javascript" src="@DATADIR@/jquery-1.4.2.min.js"/>
-<script type="text/javascript" language="javascript" src="@DATADIR@/jquery-ui-1.8.custom.min.js"/>
+<!-- == html.js.custom == -->
+<xsl:template name="html.js.custom">
 <script type="text/javascript" language="javascript">
 <xsl:text>
 $(document).ready (function () {
@@ -111,5 +110,4 @@ $(document).ready (function () {
 </script>
 </xsl:template>
 
-
 </xsl:stylesheet>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]