summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcolorsel.c4
-rw-r--r--gtk/gtkfilesel.c4
-rw-r--r--gtk/gtkfontsel.c7
-rw-r--r--gtk/gtkwidget.c6
4 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 64be1c05b..c6e455e20 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -1750,6 +1750,8 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
gint i, j;
ColorSelectionPrivate *priv;
+ gtk_widget_push_composite_child ();
+
priv = colorsel->private_data = g_new0 (ColorSelectionPrivate, 1);
priv->changing = FALSE;
priv->default_set = FALSE;
@@ -1904,6 +1906,8 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
{
gtk_widget_hide (priv->palette_frame);
}
+
+ gtk_widget_pop_composite_child ();
}
static void
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index 88e620940..8845018b8 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -603,6 +603,8 @@ gtk_file_selection_init (GtkFileSelection *filesel)
char *dir_title [2];
char *file_title [2];
+ gtk_widget_push_composite_child ();
+
dialog = GTK_DIALOG (filesel);
filesel->cmpl_state = cmpl_init_state ();
@@ -738,6 +740,8 @@ gtk_file_selection_init (GtkFileSelection *filesel)
}
gtk_widget_grab_focus (filesel->selection_entry);
+
+ gtk_widget_pop_composite_child ();
}
static gchar *
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index a2aa27469..d24fa160d 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -262,6 +262,8 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
GtkWidget *text_box;
GtkWidget *table, *label;
+ gtk_widget_push_composite_child ();
+
fontsel->size = 12 * PANGO_SCALE;
/* Create the table of font, style & size. */
@@ -410,6 +412,8 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
TRUE, TRUE, 0);
gtk_font_selection_update_preview (fontsel);
+
+ gtk_widget_pop_composite_child();
}
GtkWidget *
@@ -1017,6 +1021,8 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag)
{
GtkDialog *dialog;
+ gtk_widget_push_composite_child ();
+
dialog = GTK_DIALOG (fontseldiag);
fontseldiag->dialog_width = -1;
@@ -1058,6 +1064,7 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag)
gtk_window_set_title (GTK_WINDOW (fontseldiag),
_("Font Selection"));
+ gtk_widget_pop_composite_child ();
}
GtkWidget*
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index e2238db7b..c2eeae37a 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5284,6 +5284,12 @@ gtk_widget_get_composite_name (GtkWidget *widget)
* Makes all newly-created widgets as composite children until
* the corresponding gtk_widget_pop_composite_child() call.
*
+ * A composite child is a child that's an implementation detail of the
+ * container it's inside and should not be visible to people using the
+ * container. Composite children aren't treated differently by GTK (but
+ * see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI
+ * builders might want to treat them in a different way.
+ *
* Here is a simple example:
* <informalexample><programlisting>
* <!> gtk_widget_push_composite_child (<!>);