[devhelp] DhLink: rename instance variable filename -> relative_url



commit 8ef3bb58fd3ab29f00bc8f0c1a1d94d4ea17d885
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat May 13 10:20:29 2017 +0200

    DhLink: rename instance variable filename -> relative_url
    
    It can contain an anchor so it is strange to call it a filename.

 src/dh-link.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/dh-link.c b/src/dh-link.c
index ac4077e..fa22363 100644
--- a/src/dh-link.c
+++ b/src/dh-link.c
@@ -45,7 +45,7 @@ struct _DhLink {
 
         gchar       *name;
         gchar       *name_collation_key;
-        gchar       *filename;
+        gchar       *relative_url;
 
         DhLink      *book;
         DhLink      *page;
@@ -65,7 +65,7 @@ link_free (DhLink *link)
         g_free (link->base_path);
         g_free (link->book_id);
         g_free (link->name);
-        g_free (link->filename);
+        g_free (link->relative_url);
         g_free (link->name_collation_key);
 
         if (link->book) {
@@ -137,7 +137,7 @@ dh_link_new (DhLinkType   type,
         }
 
         link->name = g_strdup (name);
-        link->filename = g_strdup (relative_url);
+        link->relative_url = g_strdup (relative_url);
 
         if (book != NULL) {
                 link->book = dh_link_ref (book);
@@ -300,7 +300,7 @@ dh_link_get_file_name (DhLink *link)
          */
         if (link->page != NULL ||
             link->type == DH_LINK_TYPE_PAGE) {
-                return link->filename;
+                return link->relative_url;
         }
 
         return "";
@@ -345,7 +345,7 @@ dh_link_get_uri (DhLink *link)
         else
                 base_path = link->book->base_path;
 
-        filename = g_build_filename (base_path, link->filename, NULL);
+        filename = g_build_filename (base_path, link->relative_url, NULL);
 
         anchor = strrchr (filename, '#');
         if (anchor != NULL) {


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