[libhandy] search-bar: Correctly special-case the direct internal child
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] search-bar: Correctly special-case the direct internal child
- Date: Mon, 8 Jun 2020 07:18:08 +0000 (UTC)
commit d88cf2a672b8dcd412bc42b9323fc0846882694b
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Jun 7 14:01:28 2020 +0200
search-bar: Correctly special-case the direct internal child
The search bar contains a revealer, which itself contains the tool box,
so to correctly check we are constructing the widget, we should look for
the presence of the bar's direct child: the revealer, not the tool box.
This also drop a fairly useless and wrong (column has no sense here)
comment.
src/hdy-search-bar.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/hdy-search-bar.c b/src/hdy-search-bar.c
index 1c00c820..1d206f2d 100644
--- a/src/hdy-search-bar.c
+++ b/src/hdy-search-bar.c
@@ -335,12 +335,7 @@ hdy_search_bar_add (GtkContainer *container,
HdySearchBar *self = HDY_SEARCH_BAR (container);
HdySearchBarPrivate *priv = hdy_search_bar_get_instance_private (self);
- /* When constructing the widget, we want the revealer to be added
- * as the first child of the search bar, as an implementation detail.
- * After that, the child added by the application should be added
- * to column.
- */
- if (priv->tool_box == NULL) {
+ if (priv->revealer == NULL) {
GTK_CONTAINER_CLASS (hdy_search_bar_parent_class)->add (container, child);
} else {
gtk_box_set_center_widget (GTK_BOX (priv->tool_box), child);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]