diff options
author | Shaun McCance <shaunm@gnome.org> | 2010-12-08 21:51:07 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2010-12-08 21:51:07 -0500 |
commit | 45d80fbeceb9f1741213c6582884e5ade48d081f (patch) | |
tree | a53d3e95b5aa92d89e94778e70861e1b6751b3c9 | |
parent | e9dab4a3d96e4925cf0132a3200f764fac1d6746 (diff) | |
download | yelp-45d80fbeceb9f1741213c6582884e5ade48d081f.tar.gz |
Enable syntax highlighting
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libyelp/yelp-view.c | 8 | ||||
-rw-r--r-- | stylesheets/db2html.xsl.in | 5 | ||||
-rw-r--r-- | stylesheets/mal2html.xsl.in | 4 | ||||
-rw-r--r-- | stylesheets/yelp-common.xsl.in | 12 |
5 files changed, 10 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index c48fac26..7ee78d04 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 5c60557f..41789740 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 5a87e22a..c44950f9 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 fb623e2c..0d45cba3 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 e773a79b..3d469e7d 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> |