app: add gimp_gtk_container_clear()
... which removes all non-internal children of a GtkContainer.
(cherry picked from commit fd64aae47b)
This commit is contained in:
parent
7d9f79427f
commit
fba9de69ee
2 changed files with 17 additions and 0 deletions
|
|
@ -1611,6 +1611,21 @@ gimp_widget_set_fully_opaque (GtkWidget *widget,
|
|||
GINT_TO_POINTER (fully_opaque));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_gtk_container_clear_callback (GtkWidget *widget,
|
||||
GtkContainer *container)
|
||||
{
|
||||
gtk_container_remove (container, widget);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_gtk_container_clear (GtkContainer *container)
|
||||
{
|
||||
gtk_container_foreach (container,
|
||||
(GtkCallback) gimp_gtk_container_clear_callback,
|
||||
container);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_print_event_free (gpointer data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ gboolean gimp_widget_get_fully_opaque (GtkWidget *widget
|
|||
void gimp_widget_set_fully_opaque (GtkWidget *widget,
|
||||
gboolean fully_opaque);
|
||||
|
||||
void gimp_gtk_container_clear (GtkContainer *container);
|
||||
|
||||
const gchar * gimp_print_event (const GdkEvent *event);
|
||||
|
||||
gboolean gimp_color_profile_store_add_defaults
|
||||
|
|
|
|||
Loading…
Reference in a new issue