summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2007-07-24 23:07:55 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2007-07-24 23:07:55 +0000
commitf5dfec967f73dd395b37f5b47d145da22f3b581e (patch)
tree7b016715a84a45d85ef1e92447e14c73c1e5e7da
parentd1f73bbee6668abed708299709f5f124727d5a2e (diff)
downloadglade-f5dfec967f73dd395b37f5b47d145da22f3b581e.tar.gz
- Now child menu items are selectable (fixed event handling for widgets that are
not in the logical hierarchy) svn path=/trunk/; revision=1512
-rw-r--r--ChangeLog8
-rw-r--r--gladeui/glade-widget.c9
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b3a04c3..48ebe728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,9 +11,11 @@
* gladeui/glade-utils.c: Made glade_util_queue_draw_nodes --> glade_util_draw_selection_nodes()
(without the idle timeout now)
- * gladeui/glade-widget.c, gladeui/glade-placeholder.c: Use glade_util_draw_selection_nodes(),
- (selection wasnt being drawn on some widgets, now it's working and there's less "flicker"
- when drag/resizing widgets too).
+ * gladeui/glade-widget.c, gladeui/glade-placeholder.c:
+ - Use glade_util_draw_selection_nodes(), (selection wasnt being drawn on some widgets,
+ now it's working and there's less "flicker" when drag/resizing widgets too).
+ - Now child menu items are selectable (fixed event handling for widgets that are
+ not in the logical hierarchy)
* gladeui/glade-project.c: Dont add objects to a project that already contains the said object.
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 8715c20d..9bd9f4ea 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -3332,9 +3332,16 @@ glade_widget_event_private (GtkWidget *widget,
GtkWidget *layout = widget;
/* Find the parenting layout container */
- while (!GLADE_IS_DESIGN_LAYOUT (layout))
+ while (layout && !GLADE_IS_DESIGN_LAYOUT (layout))
layout = layout->parent;
+ /* Event outside the logical heirarchy, could be a menuitem
+ * or other such popup window, we'll presume to send it directly
+ * to the GladeWidget that connected here.
+ */
+ if (!layout)
+ return glade_widget_event (gwidget, event);
+
/* Let the parenting GladeDesignLayout decide which GladeWidget to
* marshall this event to.
*/