[tepl] InfoBar: rename add_close_button() to setup_close_button()



commit cee221ea49d21275c1e67b39b5a9ec9f76b96d22
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Nov 10 15:53:39 2020 +0100

    InfoBar: rename add_close_button() to setup_close_button()
    
    Just to have a better name.

 docs/reference/api-breaks.xml    | 7 +++++++
 docs/reference/tepl-sections.txt | 2 +-
 tepl/tepl-info-bar.c             | 6 +++---
 tepl/tepl-info-bar.h             | 2 +-
 tepl/tepl-tab-saving.c           | 2 +-
 tests/test-tab.c                 | 2 +-
 6 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index 9fee448..a79ad16 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -171,6 +171,13 @@
           not a <link linkend="TeplInfoBar">TeplInfoBar</link>.
         </para>
       </listitem>
+      <listitem>
+        <para>
+          The <code>tepl_info_bar_add_close_button()</code> function has been
+          renamed to
+          <link linkend="tepl-info-bar-setup-close-button">tepl_info_bar_setup_close_button()</link>.
+        </para>
+      </listitem>
     </itemizedlist>
   </chapter>
 </part>
diff --git a/docs/reference/tepl-sections.txt b/docs/reference/tepl-sections.txt
index 3623b54..75a3a4b 100644
--- a/docs/reference/tepl-sections.txt
+++ b/docs/reference/tepl-sections.txt
@@ -243,7 +243,7 @@ tepl_info_bar_add_secondary_message
 tepl_info_bar_add_content_widget
 tepl_info_bar_get_handle_close_response
 tepl_info_bar_set_handle_close_response
-tepl_info_bar_add_close_button
+tepl_info_bar_setup_close_button
 tepl_info_bar_set_buttons_orientation
 tepl_info_bar_create_label
 <SUBSECTION Standard>
diff --git a/tepl/tepl-info-bar.c b/tepl/tepl-info-bar.c
index 06e4440..9a34e7c 100644
--- a/tepl/tepl-info-bar.c
+++ b/tepl/tepl-info-bar.c
@@ -417,16 +417,16 @@ tepl_info_bar_set_handle_close_response (TeplInfoBar *info_bar,
 }
 
 /**
- * tepl_info_bar_add_close_button:
+ * tepl_info_bar_setup_close_button:
  * @info_bar: a #TeplInfoBar.
  *
  * Convenience function to set the #GtkInfoBar:show-close-button and
  * #TeplInfoBar:handle-close-response properties to %TRUE.
  *
- * Since: 2.0
+ * Since: 6.0
  */
 void
-tepl_info_bar_add_close_button (TeplInfoBar *info_bar)
+tepl_info_bar_setup_close_button (TeplInfoBar *info_bar)
 {
        g_return_if_fail (TEPL_IS_INFO_BAR (info_bar));
 
diff --git a/tepl/tepl-info-bar.h b/tepl/tepl-info-bar.h
index 425561c..1be0117 100644
--- a/tepl/tepl-info-bar.h
+++ b/tepl/tepl-info-bar.h
@@ -73,7 +73,7 @@ void                  tepl_info_bar_set_handle_close_response         (TeplInfoBar 
*info_bar,
                                                                         gboolean     handle_close_response);
 
 _TEPL_EXTERN
-void                   tepl_info_bar_add_close_button                  (TeplInfoBar *info_bar);
+void                   tepl_info_bar_setup_close_button                (TeplInfoBar *info_bar);
 
 _TEPL_EXTERN
 void                   tepl_info_bar_set_buttons_orientation           (GtkInfoBar     *info_bar,
diff --git a/tepl/tepl-tab-saving.c b/tepl/tepl-tab-saving.c
index 213f1c7..e53453d 100644
--- a/tepl/tepl-tab-saving.c
+++ b/tepl/tepl-tab-saving.c
@@ -48,7 +48,7 @@ launch_saver_cb (GObject      *source_object,
                info_bar = tepl_info_bar_new_simple (GTK_MESSAGE_ERROR,
                                                     _("Error when saving the file."),
                                                     error->message);
-               tepl_info_bar_add_close_button (info_bar);
+               tepl_info_bar_setup_close_button (info_bar);
                tepl_tab_add_info_bar (tab, GTK_INFO_BAR (info_bar));
                gtk_widget_show (GTK_WIDGET (info_bar));
 
diff --git a/tests/test-tab.c b/tests/test-tab.c
index ce41f42..44bda6c 100644
--- a/tests/test-tab.c
+++ b/tests/test-tab.c
@@ -29,7 +29,7 @@ basic_cb (GtkButton *button,
        gtk_widget_show (entry);
        tepl_info_bar_add_content_widget (info_bar, entry);
 
-       tepl_info_bar_add_close_button (info_bar);
+       tepl_info_bar_setup_close_button (info_bar);
 
        tepl_tab_add_info_bar (tab, GTK_INFO_BAR (info_bar));
        gtk_widget_show (GTK_WIDGET (info_bar));


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