[epiphany] Display decoded URIs in the bookmarks editor



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

    Display decoded URIs 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 91a1349..9b0e958 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1479,6 +1479,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;
@@ -1629,11 +1641,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]