[glade] HACK: Allow GtkLayout to have children dragged into it at mouse position.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] HACK: Allow GtkLayout to have children dragged into it at mouse position.
- Date: Wed, 3 Apr 2013 07:15:02 +0000 (UTC)
commit 40442db9c98502f2f1cdb69a4f79aec1c8f5cf14
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Apr 3 16:09:19 2013 +0900
HACK: Allow GtkLayout to have children dragged into it at mouse position.
This is a hack and all GTK_IS_FIXED() GTK_IS_LAYOUT() statements
in GladeDesignView code needs to go away.
This should instead be properly handled by a general feature of
GladeWidget/GladeWidgetAdaptor.
gladeui/glade-design-view.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c
index 9171249..d7e90e6 100644
--- a/gladeui/glade-design-view.c
+++ b/gladeui/glade-design-view.c
@@ -541,7 +541,7 @@ glade_design_view_drag_motion (GtkWidget *widget,
if (priv->drag_source &&
(priv->drag_source == child || gtk_widget_is_ancestor (child, priv->drag_source) ||
(!GLADE_IS_PLACEHOLDER (child) &&
- !GTK_IS_FIXED (child) &&
+ !GTK_IS_FIXED (child) && !GTK_IS_LAYOUT (child) &&
(glade_widget_get_from_gobject (child) ||
((gwidget = glade_widget_get_from_gobject (priv->drag_source)) &&
!glade_widget_get_parent (gwidget)
@@ -551,7 +551,7 @@ glade_design_view_drag_motion (GtkWidget *widget,
if (priv->drag_adaptor &&
((GLADE_IS_PLACEHOLDER (child) && GWA_IS_TOPLEVEL (priv->drag_adaptor)) ||
- (!GLADE_IS_PLACEHOLDER (child) && !GTK_IS_FIXED (child) &&
+ (!GLADE_IS_PLACEHOLDER (child) && !GTK_IS_FIXED (child) && !GTK_IS_LAYOUT (child) &&
glade_widget_get_from_gobject (child))))
drag_action = 0;
}
@@ -702,7 +702,7 @@ glade_design_view_drag_drop (GtkWidget *widget,
if (parent != gsource)
glade_command_dnd (&widgets, parent, placeholder);
}
- else if (GTK_IS_FIXED (child))
+ else if (GTK_IS_FIXED (child) || GTK_IS_LAYOUT (child))
{
GladeWidget *parent = glade_widget_get_from_gobject (child);
@@ -727,7 +727,7 @@ glade_design_view_drag_drop (GtkWidget *widget,
placeholder,
priv->project);
}
- else if (GTK_IS_FIXED (child))
+ else if (GTK_IS_FIXED (child) || GTK_IS_LAYOUT (child))
{
GladeWidget *parent = glade_widget_get_from_gobject (child);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]