[gtk+/wip/baedert/children: 41/68] widget: Implement create_path for widgets with no-container parent
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 41/68] widget: Implement create_path for widgets with no-container parent
- Date: Wed, 7 Dec 2016 07:55:35 +0000 (UTC)
commit b136af734c1420fa6fd2d05575ff0a924141cee6
Author: Timm Bäder <mail baedert org>
Date: Fri Nov 18 10:02:50 2016 +0100
widget: Implement create_path for widgets with no-container parent
gtk/gtkwidget.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3b6737b..0ba6a4c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14592,8 +14592,14 @@ _gtk_widget_create_path (GtkWidget *widget)
parent = widget->priv->parent;
- if (parent)
+ if (parent && GTK_IS_CONTAINER (parent))
return gtk_container_get_path_for_child (GTK_CONTAINER (parent), widget);
+ else if (parent)
+ {
+ GtkWidgetPath *path = _gtk_widget_create_path (parent);
+ gtk_widget_path_append_for_widget (path, widget);
+ return path;
+ }
else
{
/* Widget is either toplevel or unparented, treat both
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]