[epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 25/32] Display unescaped URLs in the bookmarks editor



commit a23855f4eba346d4f9d41bf7ac8ca7d224f1a14e
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Thu Dec 11 18:53:06 2014 +0100

    Display unescaped URLs in the bookmarks editor
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710004

 src/bookmarks/ephy-bookmarks-editor.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 9db50c3..1fa1757 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1478,6 +1478,18 @@ provide_keyword_uri (EphyNode *node, GValue *value, gpointer data)
 }
 
 static void
+unescape_bookmark_uri (EphyNode *node,
+                      GValue *value,
+                      gpointer user_data)
+{
+       const char *url = g_value_get_string (value);
+       char *unescaped_url = g_uri_unescape_string (url, NULL);
+       g_value_set_string (value, unescaped_url);
+       g_free (unescaped_url);
+}
+
+
+static void
 ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
 {
        GtkTreeSelection *selection;
@@ -1628,11 +1640,12 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
        gtk_tree_view_column_set_min_width (editor->priv->title_col, 300);
        gtk_tree_view_column_set_resizable (editor->priv->title_col, TRUE);
 
-       url_col_id = ephy_node_view_add_column
+       url_col_id = ephy_node_view_add_column_full
                                  (EPHY_NODE_VIEW (bm_view), _("Address"),
                                   G_TYPE_STRING, EPHY_NODE_BMK_PROP_LOCATION,
                                   EPHY_NODE_VIEW_SORTABLE |
                                   EPHY_NODE_VIEW_ELLIPSIZED,
+                                  unescape_bookmark_uri, NULL,
                                   NULL, &(editor->priv->address_col));
        gtk_tree_view_column_set_min_width (editor->priv->address_col, 300);
        gtk_tree_view_column_set_resizable (editor->priv->address_col, TRUE);


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