[gtk+] Revert "inspector: Stop adding event controllers to the object tree"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "inspector: Stop adding event controllers to the object tree"
- Date: Thu, 18 Jan 2018 04:49:58 +0000 (UTC)
commit 182272c0ab5dd37248afcae489f14a33c6a06972
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 17 23:49:17 2018 -0500
Revert "inspector: Stop adding event controllers to the object tree"
This reverts commit 8f3cb2658a79d20912b6f2ec96bc7e6bbdaeb067.
This didn't quite work out, since being in the object tree is
a prerequisite for showing up in the property editor.
gtk/inspector/object-tree.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index 5588603..d4a491d 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -141,8 +141,31 @@ object_tree_widget_forall (GObject *object,
ObjectTreeForallFunc forall_func,
gpointer forall_data)
{
+ struct {
+ GtkPropagationPhase phase;
+ const gchar *name;
+ } phases[] = {
+ { GTK_PHASE_CAPTURE, "capture" },
+ { GTK_PHASE_TARGET, "target" },
+ { GTK_PHASE_BUBBLE, "bubble" },
+ { GTK_PHASE_NONE, "" }
+ };
+ gint i;
GtkWidget *child;
+ for (i = 0; i < G_N_ELEMENTS (phases); i++)
+ {
+ GList *list, *l;
+
+ list = _gtk_widget_list_controllers (GTK_WIDGET (object), phases[i].phase);
+ for (l = list; l; l = l->next)
+ {
+ GObject *controller = l->data;
+ forall_func (controller, phases[i].name, forall_data);
+ }
+ g_list_free (list);
+ }
+
if (gtk_widget_is_toplevel (GTK_WIDGET (object)))
{
GObject *clock;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]