[gdl] Do not display placeholder objects
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdl] Do not display placeholder objects
- Date: Sun, 29 Jul 2012 20:40:50 +0000 (UTC)
commit 35c3a9eb87c9b109699ea30b7d49cabd0f0d51cd
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sun Jul 29 22:39:50 2012 +0200
Do not display placeholder objects
gdl/gdl-dock-item.c | 2 +-
gdl/gdl-dock.c | 13 ++++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/gdl/gdl-dock-item.c b/gdl/gdl-dock-item.c
index f60fd56..c686ad5 100644
--- a/gdl/gdl-dock-item.c
+++ b/gdl/gdl-dock-item.c
@@ -739,7 +739,7 @@ gdl_dock_item_set_property (GObject *g_object,
gtk_widget_hide (GTK_WIDGET (item));
} else {
GDL_DOCK_OBJECT_SET_FLAGS (item, GDL_DOCK_ATTACHED);
- if (!GDL_DOCK_ITEM_ICONIFIED (item))
+ if (!GDL_DOCK_ITEM_ICONIFIED (item) && !gdl_dock_item_is_placeholder (item))
gtk_widget_show (GTK_WIDGET (item));
}
break;
diff --git a/gdl/gdl-dock.c b/gdl/gdl-dock.c
index 9a8e14b..25675ca 100644
--- a/gdl/gdl-dock.c
+++ b/gdl/gdl-dock.c
@@ -1308,11 +1308,14 @@ gdl_dock_add_item (GdlDock *dock,
/* Check if a placeholder widget already exist in the same dock */
placeholder = gdl_dock_master_get_object (GDL_DOCK_OBJECT_GET_MASTER (dock), GDL_DOCK_OBJECT (item)->name);
- if ((placeholder != NULL) &&
- gdl_dock_item_is_closed (placeholder) &&
- (gdl_dock_object_get_toplevel (placeholder) == dock))
- parent = gdl_dock_object_get_parent_object (placeholder);
-
+ if ((placeholder != item) && (placeholder != NULL)) {
+ if (gdl_dock_object_get_toplevel (placeholder) == dock) {
+ parent = gdl_dock_object_get_parent_object (placeholder);
+ } else {
+ gtk_widget_destroy (GTK_WIDGET (placeholder));
+ }
+ }
+
if (parent && gdl_dock_object_child_placement (parent, placeholder, &place))
{
gdl_dock_object_freeze (GDL_DOCK_OBJECT (parent));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]