[yelp/gnome-2-30] Don't break on info pages with "/" in title (Edward Sheldrake)



commit 40e691bee71a6e486be030af65189c8e33ee54ba
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Apr 26 10:19:39 2010 -0500

    Don't break on info pages with "/" in title (Edward Sheldrake)

 src/yelp-window.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 401e059..67bfc09 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -1153,6 +1153,8 @@ yelp_window_load (YelpWindow *window, const gchar *uri)
            because right now we're outputting "#page_id/section_id".
          */
         faux_frag_id = g_strdup (frag_id);
+        if ( priv->current_type == YELP_RRN_TYPE_MAL )
+        {
         slash = strchr (faux_frag_id, '/');
         if (slash)
             *slash = '\0';
@@ -1170,6 +1172,7 @@ yelp_window_load (YelpWindow *window, const gchar *uri)
             g_free (slash);
             frag_id = new_frag_id;
         }
+        }
 	window_setup_window (window, type, real_uri, frag_id,
 			     (gchar *) uri, current_base, need_hist);
         priv->current_request = yelp_document_get_page (doc,
@@ -2386,7 +2389,7 @@ history_load_entry (YelpWindow *window, YelpHistoryEntry *entry)
            be scrolling to the section as well.
          */
         slash = strchr (entry->frag_id, '/');
-        if (slash)
+        if (entry->type == YELP_RRN_TYPE_MAL && slash)
             frag_id = g_strndup (entry->frag_id, slash - entry->frag_id);
         else
             frag_id = g_strdup (entry->frag_id);



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