From: dooglus Date: Mon, 14 Jan 2008 18:30:32 +0000 (+0000) Subject: Get the 'Raise Layer' action to list the layer(s) that were raised in the History... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a9d08207afd2628f4d6f520ee75ba5d2a35048d9;p=synfig.git Get the 'Raise Layer' action to list the layer(s) that were raised in the History dialog. git-svn-id: http://svn.voria.com/code@1363 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp b/synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp index a58c6b8..c8aba73 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp @@ -45,7 +45,7 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerRaise); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerRaise); ACTION_SET_NAME(Action::LayerRaise,"layer_raise"); ACTION_SET_LOCAL_NAME(Action::LayerRaise,N_("Raise Layer")); ACTION_SET_TASK(Action::LayerRaise,"raise"); @@ -64,6 +64,25 @@ Action::LayerRaise::LayerRaise() { } +synfig::String +Action::LayerRaise::get_local_name()const +{ + String ret; + + if (layers.empty()) + return _("Raise Layer"); + + ret = strprintf("%s '%s'", + (layers.size() == 1 + ? _("Raise Layer") + : _("Raise 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::LayerRaise::get_param_vocab() {