From 8a7187fba3368e678ce9a3489bd5fb735d770945 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 14 May 2008 13:54:39 -0700 Subject: [PATCH] also handle parent attributes. --- src/contrib/gtk-config-store.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/contrib/gtk-config-store.cc b/src/contrib/gtk-config-store.cc index a3a18492a..b4887b0cd 100644 --- a/src/contrib/gtk-config-store.cc +++ b/src/contrib/gtk-config-store.cc @@ -307,16 +307,20 @@ cell_tooltip_callback (GtkWidget *widget, } break; case ModelNode::NODE_ATTRIBUTE: { - TypeId tid = node->object->GetInstanceTypeId (); uint32_t attrIndex; - for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) + TypeId tid; + for (tid = node->object->GetInstanceTypeId (); tid.HasParent (); tid = tid.GetParent ()) { - if (tid.GetAttributeName (i) == node->name) + for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) { - attrIndex = i; - break; + if (tid.GetAttributeName (i) == node->name) + { + attrIndex = i; + goto out; + } } } + out: if (col == 0) { std::string tip = tid.GetAttributeHelp (attrIndex);