From ecc347144009a3e518949c13dca084bc469fda62 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 10 Jan 2008 23:22:28 +0000 Subject: [PATCH] Tidied up the appearance of the action local name as it appears in the history dialog. git-svn-id: http://svn.voria.com/code@1319 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../trunk/src/synfigapp/actions/valuedescset.cpp | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp b/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp index 8796b6f..01f38ae 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp @@ -83,31 +83,28 @@ Action::ValueDescSet::get_local_name()const { } else if(value_desc.parent_is_layer_param()) - { - if(value_desc.get_layer()->get_description().empty()) - name=value_desc.get_layer()->get_local_name(); - else - name=value_desc.get_layer()->get_description(); - name+="->"+value_desc.get_param_name(); - } + name = strprintf(_("'%s' -> %s"), + (value_desc.get_layer()->get_description().empty() + ? value_desc.get_layer()->get_local_name() + : value_desc.get_layer()->get_description()).c_str(), + value_desc.get_param_name().c_str()); else if(value_desc.parent_is_value_node()) { synfig::LinkableValueNode::Handle value_node(synfig::LinkableValueNode::Handle::cast_reinterpret(value_desc.get_parent_value_node())); - name=value_node->link_local_name(value_desc.get_index()); - synfig::Node* node; for(node=value_node.get();!node->parent_set.empty() && !dynamic_cast(node);node=*node->parent_set.begin()); Layer::Handle parent_layer(dynamic_cast(node)); if(parent_layer) - { - if(parent_layer->get_description().empty()) - name=parent_layer->get_local_name()+"=>"+name; - else - name=parent_layer->get_description()+"=>"+name; - } + name = strprintf(_("'%s' => %s"), + (parent_layer->get_description().empty() + ? parent_layer->get_local_name() + : parent_layer->get_description()).c_str(), + value_node->link_local_name(value_desc.get_index()).c_str()); + else + name = value_node->link_local_name(value_desc.get_index()); } - return strprintf(_("Set %s"),name.c_str()); + return strprintf(_("Set %s"), name.c_str()); } Action::ParamVocab -- 2.7.4