Enable tooltips and allow use the 'hint' descriptor for some types for the linkable...
[synfig.git] / synfig-studio / src / gui / trees / canvastreestore.cpp
index 57fd42a..77ffe4b 100644 (file)
@@ -210,7 +210,9 @@ CanvasTreeStore::get_value_vfunc(const Gtk::TreeModel::iterator& iter, int colum
                        if(value_desc.get_value_node())
                        {
                                lname=value_desc.get_value_node()->get_name();
-                               if (lname=="animated" || lname=="static")
+                               if (lname=="animated" || lname=="static" ||
+                               synfig::LinkableValueNode::Handle::cast_dynamic(value_desc.get_value_node())
+                               )
                                        stype+=" (" + value_desc.get_value_node()->get_local_name() + ")";
                        }
                        else if(value_desc.parent_is_layer_param())
@@ -425,12 +427,16 @@ CanvasTreeStore::set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool
                        if(linkable && do_children)
                        {
                                row[model.link_count] = linkable->link_count();
-                               for(int i=0;i<linkable->link_count();i++)
+                               LinkableValueNode::Vocab vocab(linkable->get_param_vocab());
+                               LinkableValueNode::Vocab::iterator iter(vocab.begin());
+                               for(int i=0;i<linkable->link_count();i++, iter++)
                                {
                                        Gtk::TreeRow child_row=*(append(row.children()));
                                        child_row[model.link_id] = i;
                                        child_row[model.canvas] = static_cast<Canvas::Handle>(row[model.canvas]);
                                        child_row[model.name] = linkable->link_local_name(i);
+                                       child_row[model.tooltip] = iter->get_description();
+                                       child_row[model.child_param_desc] = *iter;
                                        set_row(child_row,synfigapp::ValueDesc(linkable,i));
                                }
                        }