Add an optional parameter to ValueDesc::get_description() to suppress reporting the...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 13 Jan 2008 22:46:34 +0000 (22:46 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 13 Jan 2008 22:46:34 +0000 (22:46 +0000)
git-svn-id: http://svn.voria.com/code@1348 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/value_desc.cpp
synfig-studio/trunk/src/synfigapp/value_desc.h

index 96f04f6..425f25b 100644 (file)
@@ -48,16 +48,19 @@ using namespace synfigapp;
 /* === M E T H O D S ======================================================= */
 
 String
-ValueDesc::get_description()const
+ValueDesc::get_description(bool show_exported_name)const
 {
        String description(_("ValueDesc"));
 
+       if (show_exported_name && !is_exported())
+               show_exported_name = false;
+
        if (parent_is_layer_param())
        {
                description = strprintf("'%s' -> %s", // layer -> parameter
                                                 get_layer()->get_non_empty_description().c_str(),
                                                 get_param_name().c_str());
-               if (is_exported())
+               if (show_exported_name)
                        description += strprintf(" (%s)", get_value_node()->get_id().c_str());
        }
        else if (parent_is_value_node())
@@ -72,10 +75,10 @@ ValueDesc::get_description()const
                                                         value_node->link_local_name(get_index()).c_str());
                else
                        description = value_node->link_local_name(get_index()); // sub-parameter
-               if (is_exported())
+               if (show_exported_name)
                        description += strprintf(" (%s)", get_value_node()->get_id().c_str());
        }
-       else if (is_exported())
+       else if (show_exported_name)
                description = strprintf(_("ValueNode (%s)"), get_value_node()->get_id().c_str());
 
        return description;
index d7767d3..509f871 100644 (file)
@@ -177,7 +177,7 @@ public:
        }
 
        synfig::String
-       get_description()const;
+       get_description(bool show_exported_name = true)const;
 }; // END of class ValueDesc
 
 }; // END of namespace synfigapp_instance