update Tue Jun 15 12:37:00 PDT 2010
[pkgsrc.git] / misc / yelp / patches / patch-ad
1 $NetBSD: patch-ad,v 1.1 2010/02/13 12:26:15 tnn Exp $
2
3 http://git.gnome.org/browse/yelp/commit/?id=a5588114ed94d00ca64913aa5b248e09a5e13edc
4
5 --- src/yelp-window.c.orig      2009-11-19 17:09:56.000000000 +0000
6 +++ src/yelp-window.c
7 @@ -1854,14 +1854,21 @@ html_uri_selected_cb (YelpHtml  *html,
8                       gboolean   handled,
9                       gpointer   user_data)
10  {
11 +    gchar *new_uri = uri;
12      YelpWindow *window = YELP_WINDOW (user_data);
13  
14      debug_print (DB_FUNCTION, "entering\n");
15      debug_print (DB_ARG, "  uri = \"%s\"\n", uri);
16  
17 +    if (g_str_has_prefix (uri, "xref:"))
18 +        new_uri = g_strconcat (window->priv->base_uri, "#", uri + 5, NULL);
19 +
20      if (!handled) {
21 -       yelp_window_load (window, uri);
22 +       yelp_window_load (window, new_uri);
23      }
24 +
25 +    if (new_uri != uri)
26 +        g_free (new_uri);
27  }
28  
29  static gboolean