[epiphany] Standardize on "decoded" terminology for URIs, not "unescaped"



commit 0dd2a628df11599023d675a9e6144f82cbdc2130
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Feb 8 18:15:18 2016 -0600

    Standardize on "decoded" terminology for URIs, not "unescaped"
    
    A bit more precise
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761660

 embed/ephy-web-view.c                    |    6 +++---
 lib/ephy-uri-helpers.c                   |    2 +-
 lib/ephy-uri-helpers.h                   |    2 +-
 lib/widgets/ephy-download-widget.c       |    6 +++---
 src/bookmarks/ephy-bookmark-properties.c |    8 ++++----
 src/bookmarks/ephy-bookmarks-editor.c    |   10 +++++-----
 src/ephy-history-window.c                |    8 ++++----
 7 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 389a665..9a58433 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -848,7 +848,7 @@ ephy_web_view_set_address (EphyWebView *view,
   view->address = g_strdup (address);
 
   g_free (view->display_address);
-  view->display_address = ephy_uri_safe_unescape (view->address);
+  view->display_address = ephy_uri_decode (view->address);
 
   is_blank = address == NULL ||
              strcmp (address, "about:blank") == 0;
@@ -1485,7 +1485,7 @@ ephy_web_view_set_loading_message (EphyWebView *view,
     char *decoded_address;
     char *title;
 
-    decoded_address = ephy_uri_safe_unescape (address);
+    decoded_address = ephy_uri_decode (address);
     title = ephy_embed_utils_get_title_from_address (decoded_address);
 
     if (title != NULL && title[0] != '\0') {
@@ -2530,7 +2530,7 @@ ephy_web_view_set_link_message (EphyWebView *view,
   g_free (view->link_message);
 
   if (address) {
-    decoded_address = ephy_uri_safe_unescape (address);
+    decoded_address = ephy_uri_decode (address);
     view->link_message = ephy_embed_utils_link_message_parse (decoded_address);
     g_free (decoded_address);
   } else {
diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
index bcc08a2..1ffa9c9 100644
--- a/lib/ephy-uri-helpers.c
+++ b/lib/ephy-uri-helpers.c
@@ -248,7 +248,7 @@ bail:
 }
 
 char *
-ephy_uri_safe_unescape (const char *uri_string)
+ephy_uri_decode (const char *uri_string)
 {
   char *decoded_uri;
 
diff --git a/lib/ephy-uri-helpers.h b/lib/ephy-uri-helpers.h
index 31f2aa4..2603b47 100644
--- a/lib/ephy-uri-helpers.h
+++ b/lib/ephy-uri-helpers.h
@@ -24,7 +24,7 @@
 G_BEGIN_DECLS
 
 char *ephy_remove_tracking_from_uri (const char *uri);
-char *ephy_uri_safe_unescape (const char *uri);
+char *ephy_uri_decode (const char *uri);
 
 G_END_DECLS
 
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index c9cc59b..77cb30d 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -62,7 +62,7 @@ get_destination_basename_from_download (EphyDownload *ephy_download)
   WebKitDownload *download;
   const char *dest;
   char *basename;
-  char *unescaped;
+  char *decoded;
 
   download = ephy_download_get_webkit_download (ephy_download);
   dest = webkit_download_get_destination (download);
@@ -70,10 +70,10 @@ get_destination_basename_from_download (EphyDownload *ephy_download)
     return NULL;
 
   basename = g_filename_display_basename (dest);
-  unescaped = ephy_uri_safe_unescape (basename);
+  decoded = ephy_uri_decode (basename);
   g_free (basename);
 
-  return unescaped;
+  return decoded;
 }
 
 /* modified from telepathy-account-widgets/tpaw-time.c */
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 901c997..4549539 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -335,7 +335,7 @@ ephy_bookmark_properties_constructor (GType                  type,
 
        gboolean      lockdown;
        const char   *tmp;
-       char         *unescaped_url;
+       char         *decoded_url;
        GtkWidget    *entry;
 
        object = G_OBJECT_CLASS (ephy_bookmark_properties_parent_class)->constructor (type,
@@ -365,9 +365,9 @@ ephy_bookmark_properties_constructor (GType                  type,
 
        gtk_editable_set_editable (GTK_EDITABLE (properties->adress_entry), !lockdown);
        tmp = ephy_node_get_property_string (properties->bookmark, EPHY_NODE_BMK_PROP_LOCATION);
-       unescaped_url = ephy_uri_safe_unescape (tmp);
-       gtk_entry_set_text (properties->adress_entry, unescaped_url);
-       g_free (unescaped_url);
+       decoded_url = ephy_uri_decode (tmp);
+       gtk_entry_set_text (properties->adress_entry, decoded_url);
+       g_free (decoded_url);
 
        entry = ephy_topics_entry_new (properties->bookmarks, properties->bookmark);
        gtk_editable_set_editable (GTK_EDITABLE (entry), !lockdown);
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index cc490af..3bc4a86 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1481,12 +1481,12 @@ provide_keyword_uri (EphyNode *node, GValue *value, gpointer data)
 }
 
 static void
-unescape_bookmark_uri (EphyNode *node,
-                      GValue *value,
-                      gpointer user_data)
+decode_bookmark_uri (EphyNode *node,
+                    GValue *value,
+                    gpointer user_data)
 {
        const char *url = g_value_get_string (value);
-       g_value_take_string (value, ephy_uri_safe_unescape (url));
+       g_value_take_string (value, ephy_uri_decode (url));
 }
 
 
@@ -1646,7 +1646,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
                                   G_TYPE_STRING, EPHY_NODE_BMK_PROP_LOCATION,
                                   EPHY_NODE_VIEW_SORTABLE |
                                   EPHY_NODE_VIEW_ELLIPSIZED,
-                                  unescape_bookmark_uri, NULL,
+                                  decode_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);
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index a35d688..41fdc85 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -767,18 +767,18 @@ convert_location_data_func (GtkTreeViewColumn *column,
 {
        int col_id = GPOINTER_TO_INT (user_data);
        char *url;
-       char *unescaped_url;
+       char *decoded_url;
 
        gtk_tree_model_get (model, iter,
                            col_id,
                            &url,
                            -1);
-       unescaped_url = ephy_uri_safe_unescape (url);
+       decoded_url = ephy_uri_decode (url);
 
-       g_object_set (renderer, "text", unescaped_url, NULL);
+       g_object_set (renderer, "text", decoded_url, NULL);
 
        g_free (url);
-       g_free (unescaped_url);
+       g_free (decoded_url);
 }
 
 GtkWidget *


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