[gdl] Unmap dock item children correctly (fixes Gtk-Warnings)



commit 2c83ce774f4480ecf527f25adfb8f954090d8b5c
Author: Johannes Schmid <jhs gnome org>
Date:   Mon Dec 27 10:17:12 2010 +0100

    Unmap dock item children correctly (fixes Gtk-Warnings)

 docs/reference/gdl-sections.txt |  402 +++++++++++++++++++-------------------
 gdl/gdl-dock-item.c             |    3 +
 2 files changed, 204 insertions(+), 201 deletions(-)
---
diff --git a/docs/reference/gdl-sections.txt b/docs/reference/gdl-sections.txt
index dd6c41a..9474f14 100644
--- a/docs/reference/gdl-sections.txt
+++ b/docs/reference/gdl-sections.txt
@@ -1,28 +1,111 @@
 <SECTION>
-<FILE>gdl-dock</FILE>
-<TITLE>GdlDock</TITLE>
-GdlDock
-GdlDockClass
-GDL_DOCK_IS_CONTROLLER
-gdl_dock_new
-gdl_dock_new_from
-gdl_dock_add_item
-gdl_dock_add_floating_item
-gdl_dock_get_item_by_name
-gdl_dock_get_placeholder_by_name
-gdl_dock_get_named_items
-gdl_dock_object_get_toplevel
-gdl_dock_xor_rect
-gdl_dock_xor_rect_hide
-GdlDockPrivate
+<FILE>gdl-dock-placeholder</FILE>
+<TITLE>GdlDockPlaceholder</TITLE>
+GdlDockPlaceholder
+GdlDockPlaceholderClass
+gdl_dock_placeholder_new
+gdl_dock_placeholder_attach
+GdlDockPlaceholderPrivate
 <SUBSECTION Standard>
-GDL_DOCK
-GDL_IS_DOCK
-GDL_TYPE_DOCK
-gdl_dock_get_type
-GDL_DOCK_CLASS
-GDL_IS_DOCK_CLASS
-GDL_DOCK_GET_CLASS
+GDL_DOCK_PLACEHOLDER
+GDL_IS_DOCK_PLACEHOLDER
+GDL_TYPE_DOCK_PLACEHOLDER
+gdl_dock_placeholder_get_type
+GDL_DOCK_PLACEHOLDER_CLASS
+GDL_IS_DOCK_PLACEHOLDER_CLASS
+GDL_DOCK_PLACEHOLDER_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gdl-dock-bar</FILE>
+<TITLE>GdlDockBar</TITLE>
+GdlDockBarStyle
+GdlDockBar
+GdlDockBarClass
+gdl_dock_bar_new
+gdl_dock_bar_get_orientation
+gdl_dock_bar_set_orientation
+gdl_dock_bar_set_style
+gdl_dock_bar_get_style
+GdlDockBarPrivate
+<SUBSECTION Standard>
+GDL_DOCK_BAR
+GDL_IS_DOCK_BAR
+GDL_TYPE_DOCK_BAR
+gdl_dock_bar_get_type
+GDL_DOCK_BAR_CLASS
+GDL_IS_DOCK_BAR_CLASS
+GDL_DOCK_BAR_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gdl-dock-object</FILE>
+<TITLE>GdlDockObject</TITLE>
+GdlDockParamFlags
+GDL_DOCK_NAME_PROPERTY
+GDL_DOCK_MASTER_PROPERTY
+GdlDockObjectFlags
+GDL_DOCK_OBJECT_FLAGS_SHIFT
+GdlDockPlacement
+GdlDockRequest
+GdlDockObject
+GdlDockObjectClass
+GDL_DOCK_OBJECT_FLAGS
+GDL_DOCK_OBJECT_AUTOMATIC
+GDL_DOCK_OBJECT_ATTACHED
+GDL_DOCK_OBJECT_IN_REFLOW
+GDL_DOCK_OBJECT_IN_DETACH
+GDL_DOCK_OBJECT_SET_FLAGS
+GDL_DOCK_OBJECT_UNSET_FLAGS
+GDL_DOCK_OBJECT_FROZEN
+gdl_dock_object_is_compound
+gdl_dock_object_detach
+gdl_dock_object_get_parent_object
+gdl_dock_object_freeze
+gdl_dock_object_thaw
+gdl_dock_object_reduce
+gdl_dock_object_dock_request
+gdl_dock_object_dock
+gdl_dock_object_bind
+gdl_dock_object_unbind
+gdl_dock_object_is_bound
+gdl_dock_object_reorder
+gdl_dock_object_present
+gdl_dock_object_child_placement
+GDL_TYPE_DOCK_PARAM
+gdl_dock_param_get_type
+gdl_dock_object_nick_from_type
+gdl_dock_object_type_from_nick
+gdl_dock_object_set_type_for_nick
+GDL_TRACE_OBJECT
+<SUBSECTION Standard>
+GDL_DOCK_OBJECT
+GDL_IS_DOCK_OBJECT
+GDL_TYPE_DOCK_OBJECT
+gdl_dock_object_get_type
+GDL_DOCK_OBJECT_CLASS
+GDL_IS_DOCK_OBJECT_CLASS
+GDL_DOCK_OBJECT_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gdl-dock-item-grip</FILE>
+<TITLE>GdlDockItemGrip</TITLE>
+GdlDockItemGrip
+GdlDockItemGripClass
+gdl_dock_item_grip_new
+gdl_dock_item_grip_set_label
+gdl_dock_item_grip_hide_handle
+gdl_dock_item_grip_show_handle
+GdlDockItemGripPrivate
+<SUBSECTION Standard>
+GDL_DOCK_ITEM_GRIP
+GDL_IS_DOCK_ITEM_GRIP
+GDL_TYPE_DOCK_ITEM_GRIP
+gdl_dock_item_grip_get_type
+GDL_DOCK_ITEM_GRIP_CLASS
+GDL_IS_DOCK_ITEM_GRIP_CLASS
+GDL_DOCK_ITEM_GRIP_GET_CLASS
 </SECTION>
 
 <SECTION>
@@ -51,6 +134,41 @@ GDL_DOCK_MASTER_GET_CLASS
 </SECTION>
 
 <SECTION>
+<FILE>gdl-dock-tablabel</FILE>
+<TITLE>GdlDockTablabel</TITLE>
+GdlDockTablabel
+GdlDockTablabelClass
+gdl_dock_tablabel_new
+gdl_dock_tablabel_activate
+gdl_dock_tablabel_deactivate
+<SUBSECTION Standard>
+GDL_DOCK_TABLABEL
+GDL_IS_DOCK_TABLABEL
+GDL_TYPE_DOCK_TABLABEL
+gdl_dock_tablabel_get_type
+GDL_DOCK_TABLABEL_CLASS
+GDL_IS_DOCK_TABLABEL_CLASS
+GDL_DOCK_TABLABEL_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gdl-switcher</FILE>
+<TITLE>GdlSwitcher</TITLE>
+GdlSwitcher
+GdlSwitcherClass
+gdl_switcher_new
+gdl_switcher_insert_page
+GdlSwitcherPrivate
+<SUBSECTION Standard>
+GDL_SWITCHER
+GDL_IS_SWITCHER
+GDL_TYPE_SWITCHER
+gdl_switcher_get_type
+GDL_SWITCHER_CLASS
+GDL_IS_SWITCHER_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>gdl-dock-item</FILE>
 <TITLE>GdlDockItem</TITLE>
 GdlDockItemBehavior
@@ -100,21 +218,30 @@ GDL_DOCK_ITEM_GET_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>gdl-dock-tablabel</FILE>
-<TITLE>GdlDockTablabel</TITLE>
-GdlDockTablabel
-GdlDockTablabelClass
-gdl_dock_tablabel_new
-gdl_dock_tablabel_activate
-gdl_dock_tablabel_deactivate
+<FILE>gdl-dock-layout</FILE>
+<TITLE>GdlDockLayout</TITLE>
+GdlDockLayout
+GdlDockLayoutClass
+gdl_dock_layout_new
+gdl_dock_layout_attach
+gdl_dock_layout_load_layout
+gdl_dock_layout_save_layout
+gdl_dock_layout_delete_layout
+gdl_dock_layout_get_layouts
+gdl_dock_layout_run_manager
+gdl_dock_layout_load_from_file
+gdl_dock_layout_save_to_file
+gdl_dock_layout_is_dirty
+gdl_dock_layout_get_layouts_ui
+GdlDockLayoutPrivate
 <SUBSECTION Standard>
-GDL_DOCK_TABLABEL
-GDL_IS_DOCK_TABLABEL
-GDL_TYPE_DOCK_TABLABEL
-gdl_dock_tablabel_get_type
-GDL_DOCK_TABLABEL_CLASS
-GDL_IS_DOCK_TABLABEL_CLASS
-GDL_DOCK_TABLABEL_GET_CLASS
+GDL_DOCK_LAYOUT
+GDL_IS_DOCK_LAYOUT
+GDL_TYPE_DOCK_LAYOUT
+gdl_dock_layout_get_type
+GDL_DOCK_LAYOUT_CLASS
+GDL_IS_DOCK_LAYOUT_CLASS
+GDL_DOCK_LAYOUT_GET_CLASS
 </SECTION>
 
 <SECTION>
@@ -134,6 +261,33 @@ GDL_DOCK_NOTEBOOK_GET_CLASS
 </SECTION>
 
 <SECTION>
+<FILE>gdl-dock</FILE>
+<TITLE>GdlDock</TITLE>
+GdlDock
+GdlDockClass
+GDL_DOCK_IS_CONTROLLER
+gdl_dock_new
+gdl_dock_new_from
+gdl_dock_add_item
+gdl_dock_add_floating_item
+gdl_dock_get_item_by_name
+gdl_dock_get_placeholder_by_name
+gdl_dock_get_named_items
+gdl_dock_object_get_toplevel
+gdl_dock_xor_rect
+gdl_dock_xor_rect_hide
+GdlDockPrivate
+<SUBSECTION Standard>
+GDL_DOCK
+GDL_IS_DOCK
+GDL_TYPE_DOCK
+gdl_dock_get_type
+GDL_DOCK_CLASS
+GDL_IS_DOCK_CLASS
+GDL_DOCK_GET_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>gdl-dock-item-button-image</FILE>
 <TITLE>GdlDockItemButtonImage</TITLE>
 GdlDockItemButtonImageType
@@ -151,41 +305,6 @@ GDL_DOCK_ITEM_BUTTON_IMAGE_GET_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>gdl-switcher</FILE>
-<TITLE>GdlSwitcher</TITLE>
-GdlSwitcher
-GdlSwitcherClass
-gdl_switcher_new
-gdl_switcher_insert_page
-GdlSwitcherPrivate
-<SUBSECTION Standard>
-GDL_SWITCHER
-GDL_IS_SWITCHER
-GDL_TYPE_SWITCHER
-gdl_switcher_get_type
-GDL_SWITCHER_CLASS
-GDL_IS_SWITCHER_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gdl-dock-placeholder</FILE>
-<TITLE>GdlDockPlaceholder</TITLE>
-GdlDockPlaceholder
-GdlDockPlaceholderClass
-gdl_dock_placeholder_new
-gdl_dock_placeholder_attach
-GdlDockPlaceholderPrivate
-<SUBSECTION Standard>
-GDL_DOCK_PLACEHOLDER
-GDL_IS_DOCK_PLACEHOLDER
-GDL_TYPE_DOCK_PLACEHOLDER
-gdl_dock_placeholder_get_type
-GDL_DOCK_PLACEHOLDER_CLASS
-GDL_IS_DOCK_PLACEHOLDER_CLASS
-GDL_DOCK_PLACEHOLDER_GET_CLASS
-</SECTION>
-
-<SECTION>
 <FILE>gdl-dock-paned</FILE>
 <TITLE>GdlDockPaned</TITLE>
 GdlDockPaned
@@ -202,135 +321,6 @@ GDL_DOCK_PANED_GET_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>gdl-dock-bar</FILE>
-<TITLE>GdlDockBar</TITLE>
-GdlDockBarStyle
-GdlDockBar
-GdlDockBarClass
-gdl_dock_bar_new
-gdl_dock_bar_get_orientation
-gdl_dock_bar_set_orientation
-gdl_dock_bar_set_style
-gdl_dock_bar_get_style
-GdlDockBarPrivate
-<SUBSECTION Standard>
-GDL_DOCK_BAR
-GDL_IS_DOCK_BAR
-GDL_TYPE_DOCK_BAR
-gdl_dock_bar_get_type
-GDL_DOCK_BAR_CLASS
-GDL_IS_DOCK_BAR_CLASS
-GDL_DOCK_BAR_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gdl-dock-item-grip</FILE>
-<TITLE>GdlDockItemGrip</TITLE>
-GdlDockItemGrip
-GdlDockItemGripClass
-gdl_dock_item_grip_new
-gdl_dock_item_grip_set_label
-gdl_dock_item_grip_hide_handle
-gdl_dock_item_grip_show_handle
-GdlDockItemGripPrivate
-<SUBSECTION Standard>
-GDL_DOCK_ITEM_GRIP
-GDL_IS_DOCK_ITEM_GRIP
-GDL_TYPE_DOCK_ITEM_GRIP
-gdl_dock_item_grip_get_type
-GDL_DOCK_ITEM_GRIP_CLASS
-GDL_IS_DOCK_ITEM_GRIP_CLASS
-GDL_DOCK_ITEM_GRIP_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gdl-dock-object</FILE>
-<TITLE>GdlDockObject</TITLE>
-GdlDockParamFlags
-GDL_DOCK_NAME_PROPERTY
-GDL_DOCK_MASTER_PROPERTY
-GdlDockObjectFlags
-GDL_DOCK_OBJECT_FLAGS_SHIFT
-GdlDockPlacement
-GdlDockRequest
-GdlDockObject
-GdlDockObjectClass
-GDL_DOCK_OBJECT_FLAGS
-GDL_DOCK_OBJECT_AUTOMATIC
-GDL_DOCK_OBJECT_ATTACHED
-GDL_DOCK_OBJECT_IN_REFLOW
-GDL_DOCK_OBJECT_IN_DETACH
-GDL_DOCK_OBJECT_SET_FLAGS
-GDL_DOCK_OBJECT_UNSET_FLAGS
-GDL_DOCK_OBJECT_FROZEN
-gdl_dock_object_is_compound
-gdl_dock_object_detach
-gdl_dock_object_get_parent_object
-gdl_dock_object_freeze
-gdl_dock_object_thaw
-gdl_dock_object_reduce
-gdl_dock_object_dock_request
-gdl_dock_object_dock
-gdl_dock_object_bind
-gdl_dock_object_unbind
-gdl_dock_object_is_bound
-gdl_dock_object_reorder
-gdl_dock_object_present
-gdl_dock_object_child_placement
-GDL_TYPE_DOCK_PARAM
-gdl_dock_param_get_type
-gdl_dock_object_nick_from_type
-gdl_dock_object_type_from_nick
-gdl_dock_object_set_type_for_nick
-GDL_TRACE_OBJECT
-<SUBSECTION Standard>
-GDL_DOCK_OBJECT
-GDL_IS_DOCK_OBJECT
-GDL_TYPE_DOCK_OBJECT
-gdl_dock_object_get_type
-GDL_DOCK_OBJECT_CLASS
-GDL_IS_DOCK_OBJECT_CLASS
-GDL_DOCK_OBJECT_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>gdl-dock-layout</FILE>
-<TITLE>GdlDockLayout</TITLE>
-GdlDockLayout
-GdlDockLayoutClass
-gdl_dock_layout_new
-gdl_dock_layout_attach
-gdl_dock_layout_load_layout
-gdl_dock_layout_save_layout
-gdl_dock_layout_delete_layout
-gdl_dock_layout_get_layouts
-gdl_dock_layout_run_manager
-gdl_dock_layout_load_from_file
-gdl_dock_layout_save_to_file
-gdl_dock_layout_is_dirty
-gdl_dock_layout_get_layouts_ui
-GdlDockLayoutPrivate
-<SUBSECTION Standard>
-GDL_DOCK_LAYOUT
-GDL_IS_DOCK_LAYOUT
-GDL_TYPE_DOCK_LAYOUT
-gdl_dock_layout_get_type
-GDL_DOCK_LAYOUT_CLASS
-GDL_IS_DOCK_LAYOUT_CLASS
-GDL_DOCK_LAYOUT_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>libgdlmarshal</FILE>
-gdl_marshal_VOID__VOID
-gdl_marshal_VOID__INT_INT
-gdl_marshal_VOID__UINT_UINT
-gdl_marshal_VOID__BOOLEAN
-gdl_marshal_VOID__OBJECT_ENUM_BOXED
-gdl_marshal_VOID__BOXED
-</SECTION>
-
-<SECTION>
 <FILE>libgdltypebuiltins</FILE>
 GDL_TYPE_DOCK_PARAM_FLAGS
 gdl_dock_param_flags_get_type
@@ -348,3 +338,13 @@ GDL_TYPE_DOCK_BAR_STYLE
 gdl_dock_bar_style_get_type
 </SECTION>
 
+<SECTION>
+<FILE>libgdlmarshal</FILE>
+gdl_marshal_VOID__VOID
+gdl_marshal_VOID__INT_INT
+gdl_marshal_VOID__UINT_UINT
+gdl_marshal_VOID__BOOLEAN
+gdl_marshal_VOID__OBJECT_ENUM_BOXED
+gdl_marshal_VOID__BOXED
+</SECTION>
+
diff --git a/gdl/gdl-dock-item.c b/gdl/gdl-dock-item.c
index 0975e66..5ff57c7 100644
--- a/gdl/gdl-dock-item.c
+++ b/gdl/gdl-dock-item.c
@@ -916,6 +916,9 @@ gdl_dock_item_unmap (GtkWidget *widget)
 
     gdk_window_hide (gtk_widget_get_window (widget));
 
+    if (item->child)
+	gtk_widget_unmap (item->child);
+
     if (item->_priv->grip)
         gtk_widget_unmap (item->_priv->grip);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]