Show the layer name in the history dialog when adding a new layer from the 'new layer...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 10 Jan 2008 23:22:51 +0000 (23:22 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 10 Jan 2008 23:22:51 +0000 (23:22 +0000)
git-svn-id: http://svn.voria.com/code@1320 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/actions/layeradd.cpp

index 9275d0a..f1e55f1 100644 (file)
@@ -44,7 +44,7 @@ using namespace Action;
 
 /* === M A C R O S ========================================================= */
 
-ACTION_INIT(Action::LayerAdd);
+ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerAdd);
 ACTION_SET_NAME(Action::LayerAdd,"layer_add");
 ACTION_SET_LOCAL_NAME(Action::LayerAdd,N_("Add Layer"));
 ACTION_SET_TASK(Action::LayerAdd,"add");
@@ -63,6 +63,15 @@ Action::LayerAdd::LayerAdd()
 {
 }
 
+synfig::String
+Action::LayerAdd::get_local_name()const
+{
+       if (layer)
+               return strprintf("%s '%s'", _("Add Layer"), layer->get_local_name().c_str());
+       else
+               return _("Add Layer");
+}
+
 Action::ParamVocab
 Action::LayerAdd::get_param_vocab()
 {