[gtk+/toplevel-embedding] Added docs to gtk_widget_set_parent_window.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/toplevel-embedding] Added docs to gtk_widget_set_parent_window.
- Date: Thu, 23 Dec 2010 17:04:27 +0000 (UTC)
commit 018f1125a9de8eea281389cbb5a6635e5ae84e66
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri Dec 24 02:09:41 2010 +0900
Added docs to gtk_widget_set_parent_window.
Also stop setting the resize mode of the window.
gtk/gtkwidget.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ed5d73f..a558e0d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9062,6 +9062,16 @@ gtk_widget_render_icon (GtkWidget *widget,
* @parent_window: the new parent window.
*
* Sets a non default parent window for @widget.
+ *
+ * For GtkWindow classes, setting a @parent_window effects whether
+ * the window is a toplevel window or can be embedded into other
+ * widgets.
+ *
+ * <note><para>
+ * For GtkWindow classes, this needs to be called before the
+ * window is realized.
+ * </para></note>
+ *
**/
void
gtk_widget_set_parent_window (GtkWidget *widget,
@@ -9087,11 +9097,8 @@ gtk_widget_set_parent_window (GtkWidget *widget,
* this is the primary entry point to allow toplevels to be
* embeddable.
*/
- if (GTK_IS_WINDOW (widget))
- {
- _gtk_window_set_is_toplevel (GTK_WINDOW (widget), FALSE);
- gtk_container_set_resize_mode (GTK_CONTAINER (widget), GTK_RESIZE_PARENT);
- }
+ if (GTK_IS_WINDOW (widget) && !GTK_IS_PLUG (widget))
+ _gtk_window_set_is_toplevel (GTK_WINDOW (widget), parent_window == NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]