Tidy up some is_candidate() methods.
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / layerlower.cpp
index 4db1009..b0c5bf3 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -67,20 +68,7 @@ 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<synfig::Layer::Handle>::const_iterator iter=++layers.begin(); iter!=layers.end(); ++iter)
-               ret += strprintf(", '%s'", ((*iter)->get_non_empty_description().c_str()));
-       return ret;
+       return get_layer_descriptions(layers, _("Lower Layer"), _("Lower Layers"));
 }
 
 Action::ParamVocab