diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2003-12-30 02:09:05 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2003-12-30 02:09:05 +0000 |
commit | 5e563d8d2432d7e33ae9beca97b73eaf45e4dca1 (patch) | |
tree | 325da61b806edb9ed2c5cc6c45020b90f46c6381 | |
parent | 7ccc7613ba9ca06c499ffbf545e553370380ed55 (diff) | |
download | yelp-5e563d8d2432d7e33ae9beca97b73eaf45e4dca1.tar.gz |
- Consider #index to be equal to no fragment.
* src/yelp-uri.c:
- Consider #index to be equal to no fragment.
* src/yelp-window.c:
- Some improvement to the history mechanism.
* stylesheets/db2html-division.xsl:
- Pull titles from articleinfo and bookinfo when necessary.
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | src/yelp-uri.c | 10 | ||||
-rw-r--r-- | src/yelp-window.c | 35 | ||||
-rw-r--r-- | stylesheets/ChangeLog | 45 | ||||
-rw-r--r-- | stylesheets/db2html-division.xsl | 23 |
5 files changed, 103 insertions, 30 deletions
@@ -1,5 +1,13 @@ 2003-12-29 Shaun McCance <shaunm@gnome.org> + * src/yelp-uri.c: + - Consider #index to be equal to no fragment. + + * src/yelp-window.c: + - Some improvement to the history mechanism. + +2003-12-29 Shaun McCance <shaunm@gnome.org> + * src/yelp-db-pager.c: - Transpose Titlepage and Contents. @@ -596,12 +604,12 @@ * src/yelp-window.c: Added self to About -2003-08-27 Shaun McCance <shaunm@wolfram.com> +2003-08-27 Shaun McCance <shaunm@gnome.org> * src/yelp-main.c - Fix from alexl for rather nasty problem when DISPLAY is set. -2003-08-26 Shaun McCance <shaunm@wolfram.com> +2003-08-26 Shaun McCance <shaunm@gnome.org> * src/yelp-cache.c * src/yelp-cache.h @@ -612,11 +620,11 @@ - Big speedup to transformation of large DocBook documents by generating navigation links in C from ScrollKeeper info. -2003-08-26 Shaun McCance <shaunm@wolfram.com> +2003-08-26 Shaun McCance <shaunm@gnome.org> * README: Updated README so it's correct -2003-08-18 Shaun McCance <shaunm@wolfram.com> +2003-08-18 Shaun McCance <shaunm@gnome.org> * src/yelp-window.c: declare variables at top of block @@ -645,7 +653,7 @@ * configure.in: Added "ne" to ALL_LINGUAS. -2003-08-13 Shaun McCance <shaunm@wolfram.com> +2003-08-13 Shaun McCance <shaunm@gnome.org> * src/yelp-view-toc.c - Re-added a closing ul tag that was accidentally removed @@ -668,7 +676,7 @@ * src/info2html/html.c - patch from Shaun re bug #89838 -2003-07-24 Shaun McCance <shaunm@wolfram.com> +2003-07-24 Shaun McCance <shaunm@gnome.org> * src/yelp-db2html.c: - Change parameters passed to stylesheets. diff --git a/src/yelp-uri.c b/src/yelp-uri.c index 55f42742..f9621e03 100644 --- a/src/yelp-uri.c +++ b/src/yelp-uri.c @@ -559,12 +559,18 @@ yelp_uri_equal_fragment (YelpURI *uri1, YelpURI *uri2) if (uri1->priv->frag == NULL) { if (uri2->priv->frag == NULL) return TRUE; + else if (!strcmp (uri2->priv->frag, "index")) + return TRUE; else return FALSE; } - if (uri2->priv->frag == NULL) - return FALSE; + if (uri2->priv->frag == NULL) { + if (!strcmp (uri1->priv->frag, "index")) + return TRUE; + else + return FALSE; + } if (!strcmp (uri1->priv->frag, uri2->priv->frag)) return TRUE; diff --git a/src/yelp-window.c b/src/yelp-window.c index 2f07dd3b..348643eb 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -80,6 +80,8 @@ static GtkWidget * window_create_toolbar (YelpWindow *window); static GdkPixbuf * window_load_icon (void); static void window_set_sections (YelpWindow *window, GtkTreeModel *sections); +static void window_handle_uri (YelpWindow *window, + YelpURI *uri); static gboolean window_handle_pager_uri (YelpWindow *window, YelpURI *uri); static gboolean window_handle_html_uri (YelpWindow *window, @@ -366,13 +368,17 @@ yelp_window_open_uri (YelpWindow *window, { YelpWindowPriv *priv; GError *error = NULL; - gboolean handled = FALSE; + YelpURI *cur_uri; g_return_if_fail (YELP_IS_WINDOW (window)); g_return_if_fail (YELP_IS_URI (uri)); priv = window->priv; + cur_uri = yelp_history_get_current (window->priv->history); + if (cur_uri && yelp_uri_equal (cur_uri, uri)) + return; + yelp_history_goto (window->priv->history, uri); if (!yelp_uri_exists (uri)) { @@ -390,6 +396,22 @@ yelp_window_open_uri (YelpWindow *window, return; } + window_handle_uri (window, uri); +} + +void +window_handle_uri (YelpWindow *window, + YelpURI *uri) +{ + YelpWindowPriv *priv; + GError *error = NULL; + gboolean handled = FALSE; + + g_return_if_fail (YELP_IS_WINDOW (window)); + g_return_if_fail (YELP_IS_URI (uri)); + + priv = window->priv; + switch (yelp_uri_get_resource_type (uri)) { case YELP_URI_TYPE_DOCBOOK_XML: case YELP_URI_TYPE_MAN: @@ -823,8 +845,13 @@ window_handle_pager_uri (YelpWindow *window, else { GtkWidget *menu_item; gchar *loading = _("Loading..."); + GdkCursor *cursor = gdk_cursor_new (GDK_WATCH); + yelp_html_clear (priv->html_view); + gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor); + gdk_cursor_unref (cursor); + menu_item = gtk_item_factory_get_item_by_action (priv->item_factory, YELP_WINDOW_GO_PREVIOUS); @@ -1034,6 +1061,8 @@ pager_page_cb (YelpPager *pager, uri = yelp_window_get_current_uri (window); if (yelp_pager_uri_is_page (pager, page_id, uri)) { + gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL); + window_disconnect (window); page = (YelpPage *) yelp_pager_get_page (pager, page_id); @@ -1048,6 +1077,8 @@ pager_error_cb (YelpPager *pager, YelpWindow *window = YELP_WINDOW (user_data); GError *error = yelp_pager_get_error (pager); + gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL); + window_disconnect (window); window_error (window, error); @@ -1331,7 +1362,7 @@ window_history_action (YelpWindow *window, } if (uri) { - yelp_window_open_uri (window, uri); + window_handle_uri (window, uri); } } diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog index a5547731..60605f8a 100644 --- a/stylesheets/ChangeLog +++ b/stylesheets/ChangeLog @@ -1,5 +1,10 @@ 2003-12-29 Shaun McCance <shaunm@gnome.org> + * db2html-division.xsl: + - Pull titles from articleinfo and bookinfo when necessary. + +2003-12-29 Shaun McCance <shaunm@gnome.org> + * db2html-header.xsl - Implement @label attribute. @@ -254,7 +259,7 @@ * l10n.xml: Added Previous, Next, Contents translation for Serbian. -2003-09-04 Shaun McCance <shaunm@wolfram.com> +2003-09-04 Shaun McCance <shaunm@gnome.org> * l10n.xml: - Updated Italian translation from Luca Ferretti @@ -263,59 +268,59 @@ * l10n.xml: Added Serbian translation. -2003-08-31 Shaun McCance <shaunm@wolfram.com> +2003-08-31 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Fixed bad anchor tag on certain headers. -2003-08-12 Shaun McCance <shaunm@wolfram.com> +2003-08-12 Shaun McCance <shaunm@gnome.org> * yelp-functions.xsl: - Fixed stupid bad syntax in yelp:get-admon.class -2003-07-31 Shaun McCance <shaunm@wolfram.com> +2003-07-31 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Fix for the thing where parts got two TOCs. -2003-07-29 Shaun McCance <shaunm@wolfram.com> +2003-07-29 Shaun McCance <shaunm@gnome.org> * yelp-functions.xsl: - Abilitity to get title from refmeta/refentrytitle. Probably a few more things along this line are needed. -2003-07-24 Shaun McCance <shaunm@wolfram.com> +2003-07-24 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Remove compatibility with old param names. -2003-07-21 Shaun McCance <shaunm@wolfram.com> +2003-07-21 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: * yelp-functions.xsl: - Fix dumb bug where singleton subsections didn't get processed. -2003-07-21 Shaun McCance <shaunm@wolfram.com> +2003-07-21 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Revert current to 1.48 until I can investigate more thoroughly. - Put in compatibility with old param names until I can get the changes pushed through in C. -2003-07-20 Shaun McCance <shaunm@wolfram.com> +2003-07-20 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Fix linking problem to toc and title-page introduced in previous commit. -2003-07-20 Shaun McCance <shaunm@wolfram.com> +2003-07-20 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Remove unused params. - Change toc and title-page filenames on file chunking to be the same as the current GDP stylesheets. -2003-07-20 Shaun McCance <shaunm@wolfram.com> +2003-07-20 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Support for chunking to files. @@ -331,27 +336,27 @@ but titles didn't. - Changed gdb_ [sic] to yelp_. -2003-07-15 Shaun McCance <shaunm@wolfram.com> +2003-07-15 Shaun McCance <shaunm@gnome.org> * yelp-functions.xsl: Speed improvement -2003-07-11 Shaun McCance <shaunm@wolfram.com> +2003-07-11 Shaun McCance <shaunm@gnome.org> * yelp-custom.xsl: Put xsl: prefix on use-attribute-sets, so it'll actually work. -2003-07-10 Shaun McCance <shaunm@wolfram.com> +2003-07-10 Shaun McCance <shaunm@gnome.org> * yelp-functions.xsl: Only link Previous and Next to divisions that have the id attribute. Yelp and SK currently arent' capable of working with id-less divisions, so we shouldn't link to them with Previous and Next. -2003-07-07 Shaun McCance <shaunm@wolfram.com> +2003-07-07 Shaun McCance <shaunm@gnome.org> * yelp-custom.xsl: Initial work on header spacing -2003-07-07 Shaun McCance <shaunm@wolfram.com> +2003-07-07 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: * yelp-functions.xsl: @@ -359,7 +364,7 @@ link in the User Guide and reducing the chance of other subtle bugs resulting from this stuff. -2003-07-02 Shaun McCance <shaunm@wolfram.com> +2003-07-02 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Minor navbar fixes and tweaks. @@ -369,20 +374,20 @@ rather than if it's the first legalnotice. More changes to come to fix some of the heading's spacing in the title page. -2003-07-02 Shaun McCance <shaunm@wolfram.com> +2003-07-02 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: - Insert blank <tr> when there's no previous/next link, for alignment. - Make Contents not link to itself in the up link on the bottom navbar. -2003-07-01 Shaun McCance <shaunm@wolfram.com> +2003-07-01 Shaun McCance <shaunm@gnome.org> * yelp-customization.xsl: * yelp-functions.xsl: - Retooled navbar code to make it cleaner and to generate the location of previous and next links only once per node. -2003-06-29 Shaun Mccance <shaunm@wolfram.com> +2003-06-29 Shaun Mccance <shaunm@gnome.org> * yelp-customization.xsl: Transparently thread parts when there is no id attribute, rather than when there's only one chapter, for diff --git a/stylesheets/db2html-division.xsl b/stylesheets/db2html-division.xsl index cf4038d0..26fbfed3 100644 --- a/stylesheets/db2html-division.xsl +++ b/stylesheets/db2html-division.xsl @@ -1,4 +1,19 @@ <?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- --> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY is-info "( + (name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or + (name(.) = 'bibliographyinfo') or (name(.) = 'bookinfo') or + (name(.) = 'chapterinfo') or (name(.) = 'glossaryinfo') or + (name(.) = 'indexinfo') or (name(.) = 'partinfo') or + (name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or + (name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or + (name(.) = 'refsect2info') or (name(.) = 'refsect3info') or + (name(.) = 'refsectioninfo') or (name(.) = 'sect1info') or + (name(.) = 'sect2info') or (name(.) = 'sect3info') or + (name(.) = 'sect4info') or (name(.) = 'sect5info') or + (name(.) = 'sectioninfo') or (name(.) = 'setinfo') or + (name(.) = 'setindexinfo'))"> +]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> @@ -19,6 +34,14 @@ </xsl:param> <div class="{name(.)}"> <xsl:call-template name="anchor"/> + <xsl:if test="not(title) and *[&is-info;]/title"> + <xsl:for-each select="*[&is-info;]/title"> + <xsl:call-template name="title.h"> + <xsl:with-param name="depth_chunk" select="$depth_chunk"/> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> + </xsl:call-template> + </xsl:for-each> + </xsl:if> <xsl:choose> <xsl:when test="$depth_chunk < $chunk_depth"> <xsl:apply-templates mode="sans.divisions.mode"> |