[devhelp] DhLink: rename get_book_name() to get_book_title()



commit a37b31417b8cb0d992dde8528897090b908ff3eb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Dec 8 20:58:04 2017 +0100

    DhLink: rename get_book_name() to get_book_title()
    
    In the XML file the 'name' <book> attribute is actually the ID, so the
    function name was misleading. With "book ID" and "book title", there is
    no ambiguity.

 docs/reference/api-breaks.xml       |    6 ++++++
 docs/reference/devhelp-sections.txt |    2 +-
 src/dh-assistant-view.c             |    2 +-
 src/dh-link.c                       |    6 +++---
 src/dh-link.h                       |    2 +-
 5 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index 8e86230..3e066b6 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -174,6 +174,12 @@
           <link linkend="dh-book-cmp-by-id">dh_book_cmp_by_id()</link>.
         </para>
       </listitem>
+      <listitem>
+        <para>
+          <code>dh_link_get_book_name()</code> has been renamed to
+          <link linkend="dh-link-get-book-title">dh_link_get_book_title()</link>.
+        </para>
+      </listitem>
     </itemizedlist>
   </refsect1>
 </part>
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 0d0f29c..dc2cdc0 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -119,7 +119,7 @@ dh_link_get_name
 dh_link_match_relative_url
 dh_link_belongs_to_page
 dh_link_get_uri
-dh_link_get_book_name
+dh_link_get_book_title
 dh_link_get_book_id
 dh_link_compare
 dh_link_type_to_string
diff --git a/src/dh-assistant-view.c b/src/dh-assistant-view.c
index 2c2e21f..d15fb7f 100644
--- a/src/dh-assistant-view.c
+++ b/src/dh-assistant-view.c
@@ -398,7 +398,7 @@ dh_assistant_view_set_link (DhAssistantView *view,
                         dh_link_get_uri (link),
                         dh_link_get_name (link),
                         _("Book:"),
-                        dh_link_get_book_name (link),
+                        dh_link_get_book_title (link),
                         buf);
                 g_free (buf);
 
diff --git a/src/dh-link.c b/src/dh-link.c
index 827f5f8..b00d92b 100644
--- a/src/dh-link.c
+++ b/src/dh-link.c
@@ -434,13 +434,13 @@ dh_link_get_uri (DhLink *link)
 }
 
 /**
- * dh_link_get_book_name:
+ * dh_link_get_book_title:
  * @link: a #DhLink.
  *
- * Returns: the name of the book that the @link is contained in.
+ * Returns: the title of the book that the @link is contained in.
  */
 const gchar *
-dh_link_get_book_name (DhLink *link)
+dh_link_get_book_title (DhLink *link)
 {
         g_return_val_if_fail (link != NULL, NULL);
 
diff --git a/src/dh-link.h b/src/dh-link.h
index 806b2e3..68356fa 100644
--- a/src/dh-link.h
+++ b/src/dh-link.h
@@ -101,7 +101,7 @@ gboolean     dh_link_belongs_to_page    (DhLink        *link,
 
 gchar *      dh_link_get_uri            (DhLink        *link);
 
-const gchar *dh_link_get_book_name      (DhLink        *link);
+const gchar *dh_link_get_book_title     (DhLink        *link);
 
 const gchar *dh_link_get_book_id        (DhLink        *link);
 


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