From: dooglus Date: Fri, 11 Jan 2008 09:43:21 +0000 (+0000) Subject: Use the new Layer::get_non_empty_description() method to show the description (or... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=62999c94c88e5c867f88eb39fd8653680df0ad50;p=synfig.git Use the new Layer::get_non_empty_description() method to show the description (or local name if empty) of the moved layer in the history dialog. git-svn-id: http://svn.voria.com/code@1325 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp b/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp index 3c0fdf4..4d67c77 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/layermove.cpp @@ -44,7 +44,7 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerMove); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerMove); ACTION_SET_NAME(Action::LayerMove,"layer_move"); ACTION_SET_LOCAL_NAME(Action::LayerMove,N_("Move Layer")); ACTION_SET_TASK(Action::LayerMove,"move"); @@ -66,6 +66,15 @@ Action::LayerMove::LayerMove(): { } +synfig::String +Action::LayerMove::get_local_name()const +{ + if (layer) + return strprintf("%s '%s'", _("Move Layer"), layer->get_non_empty_description().c_str()); + else + return _("Move Layer"); +} + Action::ParamVocab Action::LayerMove::get_param_vocab() {