[libhandy] header-group: Rename get_header_bars() into get_children()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] header-group: Rename get_header_bars() into get_children()
- Date: Fri, 10 Jul 2020 18:43:06 +0000 (UTC)
commit 847b8f394839f7bd6aac870d66e9da0619913f8f
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Jul 9 10:55:06 2020 +0200
header-group: Rename get_header_bars() into get_children()
This will help introducing a custom child type.
debian/libhandy-1-0.symbols | 2 +-
glade/glade-hdy-header-group.c | 2 +-
src/hdy-header-group.c | 4 ++--
src/hdy-header-group.h | 3 ++-
tests/test-header-group.c | 10 +++++-----
5 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/debian/libhandy-1-0.symbols b/debian/libhandy-1-0.symbols
index 9be8eb8f..3f03ba8d 100644
--- a/debian/libhandy-1-0.symbols
+++ b/debian/libhandy-1-0.symbols
@@ -165,8 +165,8 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
hdy_header_bar_set_title@LIBHANDY_1_0 0.0.10
hdy_header_bar_set_transition_duration@LIBHANDY_1_0 0.0.10
hdy_header_group_add_header_bar@LIBHANDY_1_0 0.0.3
+ hdy_header_group_get_children@LIBHANDY_1_0 0.83.0
hdy_header_group_get_decorate_all@LIBHANDY_1_0 0.83.0
- hdy_header_group_get_header_bars@LIBHANDY_1_0 0.0.4~
hdy_header_group_get_type@LIBHANDY_1_0 0.0.3
hdy_header_group_new@LIBHANDY_1_0 0.0.3
hdy_header_group_remove_header_bar@LIBHANDY_1_0 0.0.4~
diff --git a/glade/glade-hdy-header-group.c b/glade/glade-hdy-header-group.c
index 3d2fefdc..95f7fb45 100644
--- a/glade/glade-hdy-header-group.c
+++ b/glade/glade-hdy-header-group.c
@@ -140,7 +140,7 @@ glade_hdy_header_group_set_property (GladeWidgetAdaptor *adaptor,
/* remove old widgets */
if ((sg_widgets =
- hdy_header_group_get_header_bars (HDY_HEADER_GROUP (object))) != NULL) {
+ hdy_header_group_get_children (HDY_HEADER_GROUP (object))) != NULL) {
/* copy since we are modifying an internal list */
sg_widgets = g_slist_copy (sg_widgets);
for (slist = sg_widgets; slist; slist = slist->next)
diff --git a/src/hdy-header-group.c b/src/hdy-header-group.c
index dd38693b..fec90289 100644
--- a/src/hdy-header-group.c
+++ b/src/hdy-header-group.c
@@ -193,7 +193,7 @@ hdy_header_group_remove_header_bar (HdyHeaderGroup *self,
/**
- * hdy_header_group_get_header_bars:
+ * hdy_header_group_get_children:
* @self: a #HdyHeaderGroup
*
* Returns the list of headerbars associated with @self.
@@ -202,7 +202,7 @@ hdy_header_group_remove_header_bar (HdyHeaderGroup *self,
* headerbars. The list is owned by libhandy and should not be modified.
**/
GSList *
-hdy_header_group_get_header_bars (HdyHeaderGroup *self)
+hdy_header_group_get_children (HdyHeaderGroup *self)
{
g_return_val_if_fail (HDY_IS_HEADER_GROUP (self), NULL);
diff --git a/src/hdy-header-group.h b/src/hdy-header-group.h
index c0a88cd0..ad937ce5 100644
--- a/src/hdy-header-group.h
+++ b/src/hdy-header-group.h
@@ -23,7 +23,8 @@ HdyHeaderGroup *hdy_header_group_new (void);
void hdy_header_group_add_header_bar (HdyHeaderGroup *self,
GtkHeaderBar *header_bar);
-GSList *hdy_header_group_get_header_bars (HdyHeaderGroup *self);
+GSList *hdy_header_group_get_children (HdyHeaderGroup *self);
+
void hdy_header_group_remove_header_bar (HdyHeaderGroup *self,
GtkHeaderBar *header_bar);
diff --git a/tests/test-header-group.c b/tests/test-header-group.c
index ef7edba7..6e17f8e9 100644
--- a/tests/test-header-group.c
+++ b/tests/test-header-group.c
@@ -43,19 +43,19 @@ test_hdy_header_group_add_remove (void)
bar1 = GTK_HEADER_BAR (gtk_header_bar_new ());
bar2 = GTK_HEADER_BAR (gtk_header_bar_new ());
- g_assert_cmpint (g_slist_length (hdy_header_group_get_header_bars (hg)), ==, 0);
+ g_assert_cmpint (g_slist_length (hdy_header_group_get_children (hg)), ==, 0);
hdy_header_group_add_header_bar (hg, GTK_HEADER_BAR (bar1));
- g_assert_cmpint (g_slist_length (hdy_header_group_get_header_bars (hg)), ==, 1);
+ g_assert_cmpint (g_slist_length (hdy_header_group_get_children (hg)), ==, 1);
hdy_header_group_add_header_bar (hg, GTK_HEADER_BAR (bar2));
- g_assert_cmpint (g_slist_length (hdy_header_group_get_header_bars (hg)), ==, 2);
+ g_assert_cmpint (g_slist_length (hdy_header_group_get_children (hg)), ==, 2);
hdy_header_group_remove_header_bar (hg, GTK_HEADER_BAR (bar2));
- g_assert_cmpint (g_slist_length (hdy_header_group_get_header_bars (hg)), ==, 1);
+ g_assert_cmpint (g_slist_length (hdy_header_group_get_children (hg)), ==, 1);
hdy_header_group_remove_header_bar (hg, GTK_HEADER_BAR (bar1));
- g_assert_cmpint (g_slist_length (hdy_header_group_get_header_bars (hg)), ==, 0);
+ g_assert_cmpint (g_slist_length (hdy_header_group_get_children (hg)), ==, 0);
g_object_unref (hg);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]