Skip to content
Snippets Groups Projects
Commit a0fe18b9 authored by Adrien Plazas's avatar Adrien Plazas Committed by Guido Gunther
Browse files

action-row: Handle show_all()

This avoids an empty image, an empty subtitle and an empty prefixes box
to be visible when calling show_all(), as they are handled by the row
itself.
parent 4c19b0bb
No related branches found
No related tags found
1 merge request!187action-row: Handle show_all()
Pipeline #3449 passed
......@@ -169,6 +169,22 @@ hdy_action_row_dispose (GObject *object)
priv->previous_parent = NULL;
}
static void
hdy_action_row_show_all (GtkWidget *widget)
{
HdyActionRow *self = HDY_ACTION_ROW (widget);
HdyActionRowPrivate *priv;
g_return_if_fail (HDY_IS_ACTION_ROW (self));
priv = hdy_action_row_get_instance_private (self);
gtk_container_foreach (GTK_CONTAINER (priv->prefixes),
(GtkCallback) gtk_widget_show_all,
NULL);
GTK_WIDGET_CLASS (hdy_action_row_parent_class)->show_all (widget);
}
static void
hdy_action_row_add (GtkContainer *container,
GtkWidget *child)
......@@ -246,6 +262,8 @@ hdy_action_row_class_init (HdyActionRowClass *klass)
object_class->set_property = hdy_action_row_set_property;
object_class->dispose = hdy_action_row_dispose;
widget_class->show_all = hdy_action_row_show_all;
container_class->add = hdy_action_row_add;
container_class->forall = hdy_action_row_forall;
......
......@@ -17,12 +17,14 @@
<child>
<object class="GtkBox" id="prefixes">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="spacing">12</property>
<property name="visible">False</property>
</object>
</child>
<child>
<object class="GtkImage" id="image">
<property name="no_show_all">True</property>
<property name="pixel_size">32</property>
<property name="valign">center</property>
</object>
......@@ -33,6 +35,7 @@
<property name="halign">start</property>
<property name="margin_bottom">8</property>
<property name="margin_top">8</property>
<property name="no_show_all">True</property>
<property name="orientation">vertical</property>
<property name="valign">center</property>
<property name="visible">True</property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment