diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2004-12-31 12:41:38 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2004-12-31 12:41:38 +0000 |
commit | ad1f2db02bd12943111c1f483b98a875edb639d7 (patch) | |
tree | 4c7e2e0fd5caac7a32bb31a9e1344f1f79dbf854 | |
parent | 15a9315d04631786dee815113db26abcad28f7cd (diff) | |
download | yelp-ad1f2db02bd12943111c1f483b98a875edb639d7.tar.gz |
- Put the GtkTreeStore in the YelpInfoPagerPriv - Return "Top" in
* src/yelp-info-pager.c:
- Put the GtkTreeStore in the YelpInfoPagerPriv
- Return "Top" in resolve_frag, just so something will show up
* src/yelp-window.c:
- Set sections in the "start" callback
* stylesheets/info2html.xsl:
- s/Document/Section/
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/yelp-info-pager.c | 18 | ||||
-rw-r--r-- | src/yelp-window.c | 3 | ||||
-rw-r--r-- | stylesheets/info2html.xsl | 6 |
4 files changed, 28 insertions, 11 deletions
@@ -1,3 +1,15 @@ +2004-12-31 Shaun McCance <shaunm@gnome.org> + + * src/yelp-info-pager.c: + - Put the GtkTreeStore in the YelpInfoPagerPriv + - Return "Top" in resolve_frag, just so something will show up + + * src/yelp-window.c: + - Set sections in the "start" callback + + * stylesheets/info2html.xsl: + - s/Document/Section/ + 2004-12-31 Davyd Madeley <davyd@madeley.id.au> * src/yelp-info-pager.c: diff --git a/src/yelp-info-pager.c b/src/yelp-info-pager.c index 3ee48ac9..5e0d1f76 100644 --- a/src/yelp-info-pager.c +++ b/src/yelp-info-pager.c @@ -44,7 +44,7 @@ #define INFO_STYLESHEET INFO_STYLESHEET_PATH"info2html.xsl" struct _YelpInfoPagerPriv { - gpointer unused; + GtkTreeStore *tree; }; static void info_pager_class_init (YelpInfoPagerClass *klass); @@ -147,9 +147,10 @@ info_pager_parse (YelpPager *pager) xmlDocPtr doc; xmlNodePtr node; GError *error; - GtkTreeStore *tree; + YelpInfoPagerPriv *priv; g_return_val_if_fail (YELP_IS_INFO_PAGER (pager), FALSE); + priv = YELP_INFO_PAGER (pager)->priv; doc_info = yelp_pager_get_doc_info (pager); filename = yelp_doc_info_get_filename (doc_info); @@ -158,10 +159,10 @@ info_pager_parse (YelpPager *pager) /* DO STUFF HERE */ /* parse into a GtkTreeStore */ - tree = yelp_info_parser_parse_file (filename); + priv->tree = yelp_info_parser_parse_file (filename); /* create the XML file */ - doc = yelp_info_parser_parse_tree (tree); + doc = yelp_info_parser_parse_tree (priv->tree); g_object_unref (pager); @@ -188,13 +189,14 @@ info_pager_params (YelpPager *pager) static const gchar * info_pager_resolve_frag (YelpPager *pager, const gchar *frag_id) { - /* DO SOMETHING ELSE HERE */ - return NULL; + /* MUST DO THIS RIGHTLY */ + return "Top"; } static GtkTreeModel * info_pager_get_sections (YelpPager *pager) { - /* RETURN THE TREE STORE HERE */ - return NULL; + g_return_val_if_fail (YELP_IS_INFO_PAGER (pager), NULL); + + return YELP_INFO_PAGER (pager)->priv->tree; } diff --git a/src/yelp-window.c b/src/yelp-window.c index 5aca956e..6ab5199a 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -1513,6 +1513,9 @@ pager_start_cb (YelpPager *pager, d (g_print ("pager_start_cb\n")); d (g_print (" page_id=\"%s\"\n", page_id)); + window_set_sections (window, + yelp_pager_get_sections (pager)); + if (!page_id && (window->priv->current_frag && strcmp (window->priv->current_frag, ""))) { window_disconnect (window); diff --git a/stylesheets/info2html.xsl b/stylesheets/info2html.xsl index 28b49223..44b82c55 100644 --- a/stylesheets/info2html.xsl +++ b/stylesheets/info2html.xsl @@ -45,9 +45,9 @@ </style> </head> <body> - <xsl:if test="Documnet"> + <xsl:if test="Section"> <ul> - <xsl:for-each select="Document"> + <xsl:for-each select="Section"> <li> <xsl:value-of select="@name"/> </li> @@ -55,7 +55,7 @@ </ul> </xsl:if> <pre class="body"> - <xsl:value-of select="node()[not(self::Document)]"/> + <xsl:value-of select="node()[not(self::Section)]"/> </pre> </body> </html> |