flowbox: Add gtk_flow_box_remove
This is the replacement for gtk_container_remove.
This commit is contained in:
@@ -5712,6 +5712,7 @@ gtk_revealer_get_type
|
||||
GtkFlowBox
|
||||
gtk_flow_box_new
|
||||
gtk_flow_box_insert
|
||||
gtk_flow_box_remove
|
||||
gtk_flow_box_get_child_at_index
|
||||
gtk_flow_box_get_child_at_pos
|
||||
gtk_flow_box_set_hadjustment
|
||||
|
||||
@@ -2986,16 +2986,27 @@ gtk_flow_box_add (GtkContainer *container,
|
||||
gtk_flow_box_insert (GTK_FLOW_BOX (container), child, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_flow_box_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
/**
|
||||
* gtk_flow_box_remove:
|
||||
* @box: a #GtkFlowBox
|
||||
* @widget: the child widget to remove
|
||||
*
|
||||
* Removes a child from @box.
|
||||
*/
|
||||
void
|
||||
gtk_flow_box_remove (GtkFlowBox *box,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkFlowBox *box = GTK_FLOW_BOX (container);
|
||||
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
|
||||
gboolean was_visible;
|
||||
gboolean was_selected;
|
||||
GtkFlowBoxChild *child;
|
||||
|
||||
g_return_if_fail (GTK_IS_FLOW_BOX (box));
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (box) ||
|
||||
gtk_widget_get_parent (gtk_widget_get_parent (widget)) == GTK_WIDGET (box));
|
||||
|
||||
if (GTK_IS_FLOW_BOX_CHILD (widget))
|
||||
child = GTK_FLOW_BOX_CHILD (widget);
|
||||
else
|
||||
|
||||
@@ -147,6 +147,9 @@ void gtk_flow_box_insert (GtkFlowBox
|
||||
GtkWidget *widget,
|
||||
gint position);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_flow_box_remove (GtkFlowBox *box,
|
||||
GtkWidget *widget);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkFlowBoxChild *gtk_flow_box_get_child_at_index (GtkFlowBox *box,
|
||||
gint idx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user