Show a better entry in the history dialog when renaming a layer.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 12 Jan 2008 00:54:17 +0000 (00:54 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 12 Jan 2008 00:54:17 +0000 (00:54 +0000)
git-svn-id: http://svn.voria.com/code@1332 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 3bd636c..4dc570b 100644 (file)
@@ -44,7 +44,7 @@ using namespace Action;
 
 /* === M A C R O S ========================================================= */
 
-ACTION_INIT(Action::LayerSetDesc);
+ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerSetDesc);
 ACTION_SET_NAME(Action::LayerSetDesc,"layer_set_desc");
 ACTION_SET_LOCAL_NAME(Action::LayerSetDesc,N_("Set Layer Description"));
 ACTION_SET_TASK(Action::LayerSetDesc,"set_desc");
@@ -65,6 +65,16 @@ Action::LayerSetDesc::LayerSetDesc()
 {
 }
 
+synfig::String
+Action::LayerSetDesc::get_local_name()const
+{
+       return strprintf("%s: '%s' -> '%s'",
+                                        _("Set Layer Description"),
+                                        /* TRANSLATORS: this is the string used in the history dialog when renaming a layer to/from its default name */
+                                        old_description.empty() ? _("[default]") : old_description.c_str(),
+                                        new_description.empty() ? _("[default]") : new_description.c_str());
+}
+
 Action::ParamVocab
 Action::LayerSetDesc::get_param_vocab()
 {