From 50fa53ead451a223b405b1f9543f57e6e8e94a90 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 14 Jan 2008 18:30:43 +0000 Subject: [PATCH] Get the 'Lower Layer' action to list the layer(s) that were lowered in the History dialog. git-svn-id: http://svn.voria.com/code@1364 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../trunk/src/synfigapp/actions/layerlower.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp b/synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp index 99f0156..4db1009 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp @@ -45,7 +45,7 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerLower); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerLower); ACTION_SET_NAME(Action::LayerLower,"layer_lower"); ACTION_SET_LOCAL_NAME(Action::LayerLower,N_("Lower Layer")); ACTION_SET_TASK(Action::LayerLower,"lower"); @@ -64,6 +64,25 @@ Action::LayerLower::LayerLower() { } +synfig::String +Action::LayerLower::get_local_name()const +{ + String ret; + + if (layers.empty()) + return _("Lower Layer"); + + ret = strprintf("%s '%s'", + (layers.size() == 1 + ? _("Lower Layer") + : _("Lower Layers")), + (*layers.begin())->get_non_empty_description().c_str()); + + for(std::list::const_iterator iter=++layers.begin(); iter!=layers.end(); ++iter) + ret += strprintf(", '%s'", ((*iter)->get_non_empty_description().c_str())); + return ret; +} + Action::ParamVocab Action::LayerLower::get_param_vocab() { -- 2.7.4