[gtk+/wip/baedert/children: 15/46] 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: 15/46] widget: Implement create_path for widgets with no-container parent
- Date: Sat, 3 Dec 2016 12:19:56 +0000 (UTC)
commit 5d58af1d805a3b1eb6e830feadd0d3c33d220898
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 e592415..6196e6a 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14671,8 +14671,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]