From: gustav_b Date: Fri, 31 Aug 2007 18:57:25 +0000 (+0000) Subject: Make sure gdl-dock-items created with X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=946a87d87ab78d94239cf87d386e8595382db822;p=inkscape.git Make sure gdl-dock-items created with GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER won't dock with center placement. Clean up. --- diff --git a/src/libgdl/gdl-dock-placeholder.c b/src/libgdl/gdl-dock-placeholder.c index df068d03f..11c0d3127 100644 --- a/src/libgdl/gdl-dock-placeholder.c +++ b/src/libgdl/gdl-dock-placeholder.c @@ -338,6 +338,9 @@ gdl_dock_placeholder_add (GtkContainer *container, g_return_if_fail (GDL_IS_DOCK_PLACEHOLDER (container)); g_return_if_fail (GDL_IS_DOCK_ITEM (widget)); + if (GDL_DOCK_ITEM (widget)->behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER) + pos = GDL_DOCK_TOP; + ph = GDL_DOCK_PLACEHOLDER (container); if (ph->_priv->placement_stack) pos = (GdlDockPlacement) ph->_priv->placement_stack->data; diff --git a/src/libgdl/gdl-dock.c b/src/libgdl/gdl-dock.c index 131a7bbd1..cb3e1b372 100644 --- a/src/libgdl/gdl-dock.c +++ b/src/libgdl/gdl-dock.c @@ -1077,12 +1077,14 @@ gdl_dock_refine_placement (GdlDock *dock, GdlDockItem *dock_item, if (placement == GDL_DOCK_LEFT || placement == GDL_DOCK_RIGHT) { /* Check if dock_object touches center in terms of width */ - if (GTK_WIDGET (dock)->allocation.width/2 > object_size.width) { + if (GTK_WIDGET (dock)->allocation.width/2 > object_size.width && + !(dock_item->behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER)) { return GDL_DOCK_CENTER; } } else if (placement == GDL_DOCK_TOP || placement == GDL_DOCK_BOTTOM) { /* Check if dock_object touches center in terms of height */ - if (GTK_WIDGET (dock)->allocation.height/2 > object_size.height) { + if (GTK_WIDGET (dock)->allocation.height/2 > object_size.height && + !(dock_item->behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER)) { return GDL_DOCK_CENTER; } } diff --git a/src/libgdl/layout.glade b/src/libgdl/layout.glade deleted file mode 100644 index 87b7f9fb6..000000000 --- a/src/libgdl/layout.glade +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - 4 - Layout Managment - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - 0 - False - True - GTK_PACK_END - - - - - - True - True - True - True - GTK_POS_TOP - False - False - - - - True - False - 6 - - - - 100 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - True - False - True - - - - - 0 - True - True - - - - - - True - True - _Lock dock items - True - GTK_RELIEF_NORMAL - False - False - True - - - 0 - False - False - - - - - False - True - - - - - - True - Dock items - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - tab - - - - - - True - False - 6 - - - - 100 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - True - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_END - 6 - - - - True - True - True - gtk-delete - True - GTK_RELIEF_NORMAL - - - - - - - True - True - True - GTK_RELIEF_NORMAL - - - - - True - 0.5 - 0.5 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Load - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - - - 0 - False - True - - - - - False - True - - - - - - True - Saved layouts - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - tab - - - - - 0 - True - True - - - - - - - diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h index 38d13a579..55a280767 100644 --- a/src/ui/widget/dock-item.h +++ b/src/ui/widget/dock-item.h @@ -118,8 +118,6 @@ private: void _onStateChanged(State prev_state, State new_state); bool _onDeleteEvent(GdkEventAny *event); - void _onFoo(); - sigc::connection _signal_key_press_event_connection; /** GdlDockItem signal proxy structures */